diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 161fc727d94d..e2fc1ef63ba3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -50,6 +50,7 @@ updates: - /packages/path_provider/path_provider/example/android/app - /packages/path_provider/path_provider_android/example/android/app - /packages/pigeon/example/app/android/app + - /packages/pigeon/example/native_interop_app/android/app - /packages/pigeon/platform_tests/test_plugin/example/android/app - /packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/app - /packages/quick_actions/quick_actions_android/example/android/app diff --git a/analysis_options.yaml b/analysis_options.yaml index daadedd6d5fb..47db3f10e484 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -23,6 +23,8 @@ analyzer: # Ignore generated files - '**/*.pb.dart' - '**/*.g.dart' + - '**/*.jni.dart' + - '**/*.ffi.dart' - '**/*.mocks.dart' # Mockito @GenerateMocks formatter: diff --git a/packages/pigeon/.gitignore b/packages/pigeon/.gitignore index ae69a69b6322..b301922facf9 100644 --- a/packages/pigeon/.gitignore +++ b/packages/pigeon/.gitignore @@ -11,3 +11,4 @@ local.properties gradle-wrapper.jar bin/pigeon.dart.dill **/subdirectory/does/not/exist/** +*.g.o diff --git a/packages/pigeon/CHANGELOG.md b/packages/pigeon/CHANGELOG.md index 916106ed846e..a845341fbb65 100644 --- a/packages/pigeon/CHANGELOG.md +++ b/packages/pigeon/CHANGELOG.md @@ -1,3 +1,8 @@ +## 27.4.0 + +* [swift] [kotlin] Adds experimental support for FFI and JNI. +* Exposes missing PigeonOptions and language-specific configurations as command-line arguments. + ## 27.3.0 * Adds support for sharing constants across platforms. diff --git a/packages/pigeon/README.md b/packages/pigeon/README.md index 126c20df46ae..0bc9a3a6fcb5 100644 --- a/packages/pigeon/README.md +++ b/packages/pigeon/README.md @@ -80,9 +80,42 @@ the threading model for handling HostApi methods can be selected with the ### Multi-Instance Support -Host and Flutter APIs now support the ability to provide a unique message channel suffix string +Host and Flutter APIs support the ability to provide a unique message channel suffix string to the api to allow for multiple instances to be created and operate in parallel. +### Communication Options: Method Channels vs. Native Interop + +Pigeon supports two distinct models for communication between Dart and native code: + +1. **Method Channels (Message-Passing)**: The standard Flutter communication model. It serializes data into binary buffers via `StandardMessageCodec` and transmits them asynchronously over platform channels. +2. **Native Interop (Direct FFI & JNI)\*Experimental\***: A direct, memory-bound function call model utilizing Dart FFI (for Swift/Objective-C on iOS/macOS) and JNI (for Kotlin/Java on Android). + +#### Quick Comparison + +| Feature | Method Channels | Native Interop | +| :--- | :--- | :--- | +| **Communication Mechanism** | Asynchronous message passing over platform channels | Direct memory-bound function calls (Dart FFI / JNI) | +| **Platform Support** | All supported platforms (Android, iOS, macOS, Windows, Linux) | Android, iOS, and macOS | +| **Serialization Overhead** | High (serialization and multiple copies) | Low (minimal copying) | +| **Latency** | Higher (requires message loop scheduling) | Extremely low (direct execution) | +| **Synchronous Host Calls** | Not supported | Fully supported | +| **Setup Complexity** | Simple | Complex (requires external tools) | +| **Code Generation Steps** | Single-step (running Pigeon generates everything) | Multi-step (requires running Pigeon, then running generated config scripts) | + +#### When to Choose Which Model + +- **Consider Method Channels if**: + - Your plugin targets Windows or Linux (Native Interop is not supported on these platforms). + - Your plugin primarily passes simple data objects or has low-frequency communication. + - You want a simpler setup with no external dependencies or additional command-line tools. + - Your data classes contain many nested fields or custom collections where conversion overhead might offset performance gains. There are plans to address this issue in the future. +- **Consider Native Interop if**: + - Your plugin targets only Android, iOS, and/or macOS. + - Your plugin handles high-frequency messaging, large typed arrays (e.g., image processing, sensor data streams), or latency-sensitive communication where serialization overhead is a bottleneck. + - You need synchronous execution for platform APIs on the host thread. + +For detailed information on setup, prerequisites, and instructions on how to use Native Interop, see the [Native Interop Guide](./native_interop_guide.md). + ### Constants Pigeon supports generating top-level constants in the generated files. Constants can be defined at the top level of the Pigeon file: diff --git a/packages/pigeon/example/app/README.md b/packages/pigeon/example/app/README.md index 9bc223a17ab0..4463e2d97baa 100644 --- a/packages/pigeon/example/app/README.md +++ b/packages/pigeon/example/app/README.md @@ -1,10 +1,10 @@ -# pigeon_example_app +# Pigeon Method Channel Example Application -This demonstrates using Pigeon for platform communication directly in an -application, rather than in a plugin. +This demonstrates using standard Method Channel-based platform communication generated by Pigeon directly in an application, rather than in a plugin. To update the generated code, run: ```sh cd ../.. dart tool/generate.dart ``` + diff --git a/packages/pigeon/example/app/android/app/src/main/kotlin/dev/flutter/pigeon_example_app/NativeInteropExample.kt b/packages/pigeon/example/app/android/app/src/main/kotlin/dev/flutter/pigeon_example_app/NativeInteropExample.kt new file mode 100644 index 000000000000..af8153023e1b --- /dev/null +++ b/packages/pigeon/example/app/android/app/src/main/kotlin/dev/flutter/pigeon_example_app/NativeInteropExample.kt @@ -0,0 +1,11 @@ +// 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. + +package dev.flutter.pigeon_example_app + +// #docregion concurrency-style +suspend fun echoAsync(value: String): String { + return value +} +// #enddocregion concurrency-style diff --git a/packages/pigeon/example/app/android/settings.gradle.kts b/packages/pigeon/example/app/android/settings.gradle.kts index 575dbbe6c4c6..a8be9bb7583e 100644 --- a/packages/pigeon/example/app/android/settings.gradle.kts +++ b/packages/pigeon/example/app/android/settings.gradle.kts @@ -21,7 +21,7 @@ pluginManagement { plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" id("com.android.application") version "9.1.0" apply false - id("org.jetbrains.kotlin.android") version "2.4.0" apply false + id("org.jetbrains.kotlin.android") version "2.3.20" apply false id("com.google.cloud.artifactregistry.gradle-plugin") version "2.2.1" } diff --git a/packages/pigeon/example/app/ios/Runner/EventChannelMessages.g.swift b/packages/pigeon/example/app/ios/Runner/EventChannelMessages.g.swift index 16d0bad07c6b..8bd3014af3e2 100644 --- a/packages/pigeon/example/app/ios/Runner/EventChannelMessages.g.swift +++ b/packages/pigeon/example/app/ios/Runner/EventChannelMessages.g.swift @@ -55,19 +55,19 @@ enum EventChannelMessagesPigeonInternal { case is (Void, Void): return true - case (let lhsArray, let rhsArray) as ([Any?], [Any?]): + case (let lhsArray, let rhsArray) as ([Double], [Double]): guard lhsArray.count == rhsArray.count else { return false } for (index, element) in lhsArray.enumerated() { - if !deepEquals(element, rhsArray[index]) { + if !doubleEquals(element, rhsArray[index]) { return false } } return true - case (let lhsArray, let rhsArray) as ([Double], [Double]): + case (let lhsArray, let rhsArray) as ([Any?], [Any?]): guard lhsArray.count == rhsArray.count else { return false } for (index, element) in lhsArray.enumerated() { - if !doubleEquals(element, rhsArray[index]) { + if !deepEquals(element, rhsArray[index]) { return false } } diff --git a/packages/pigeon/example/app/ios/Runner/Messages.g.swift b/packages/pigeon/example/app/ios/Runner/Messages.g.swift index 59f44d8d0094..6d3c0fb78f5d 100644 --- a/packages/pigeon/example/app/ios/Runner/Messages.g.swift +++ b/packages/pigeon/example/app/ios/Runner/Messages.g.swift @@ -33,7 +33,7 @@ final class PigeonError: Error { var localizedDescription: String { return - "PigeonError(code: \(code), message: \(message ?? ""), details: \(details ?? "")" + "PigeonError(code: \(code), message: \(message ?? ""), details: \(details ?? ""))" } } @@ -110,19 +110,19 @@ enum MessagesPigeonInternal { case is (Void, Void): return true - case (let lhsArray, let rhsArray) as ([Any?], [Any?]): + case (let lhsArray, let rhsArray) as ([Double], [Double]): guard lhsArray.count == rhsArray.count else { return false } for (index, element) in lhsArray.enumerated() { - if !deepEquals(element, rhsArray[index]) { + if !doubleEquals(element, rhsArray[index]) { return false } } return true - case (let lhsArray, let rhsArray) as ([Double], [Double]): + case (let lhsArray, let rhsArray) as ([Any?], [Any?]): guard lhsArray.count == rhsArray.count else { return false } for (index, element) in lhsArray.enumerated() { - if !doubleEquals(element, rhsArray[index]) { + if !deepEquals(element, rhsArray[index]) { return false } } diff --git a/packages/pigeon/example/app/ios/Runner/NativeInteropExample.swift b/packages/pigeon/example/app/ios/Runner/NativeInteropExample.swift new file mode 100644 index 000000000000..810047f7909e --- /dev/null +++ b/packages/pigeon/example/app/ios/Runner/NativeInteropExample.swift @@ -0,0 +1,17 @@ +// 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 Foundation + +// #docregion callback-style +func echoAsync(_ value: String, completion: @escaping (Result) -> Void) { + completion(.success(value)) +} +// #enddocregion callback-style + +// #docregion concurrency-style +func echoAsync(_ value: String) async throws -> String { + return value +} +// #enddocregion concurrency-style diff --git a/packages/pigeon/example/app/lib/src/messages.g.dart b/packages/pigeon/example/app/lib/src/messages.g.dart index 573e95b06106..4d7a625a2ea3 100644 --- a/packages/pigeon/example/app/lib/src/messages.g.dart +++ b/packages/pigeon/example/app/lib/src/messages.g.dart @@ -210,8 +210,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/example/app/pubspec.yaml b/packages/pigeon/example/app/pubspec.yaml index ddf85c844bc2..7e5a6883ea82 100644 --- a/packages/pigeon/example/app/pubspec.yaml +++ b/packages/pigeon/example/app/pubspec.yaml @@ -26,3 +26,41 @@ dev_dependencies: flutter: uses-material-design: true + +dependency_overrides: + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: 27890daeab690209603a979c7fbb54b22a3c878f + ffigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffigen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + jni: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jni + ref: 27890daeab690209603a979c7fbb54b22a3c878f + jnigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jnigen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + objective_c: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/objective_c + ref: 27890daeab690209603a979c7fbb54b22a3c878f + swift2objc: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swift2objc + ref: 27890daeab690209603a979c7fbb54b22a3c878f + swiftgen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swiftgen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + diff --git a/packages/pigeon/example/native_interop_app/.gitignore b/packages/pigeon/example/native_interop_app/.gitignore new file mode 100644 index 000000000000..6c319542b342 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/.gitignore @@ -0,0 +1,46 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.build/ +.buildlog/ +.history +.svn/ +.swiftpm/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/pigeon/example/native_interop_app/.metadata b/packages/pigeon/example/native_interop_app/.metadata new file mode 100644 index 000000000000..f25b3d475615 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/.metadata @@ -0,0 +1,45 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled. + +version: + revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + channel: stable + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + - platform: android + create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + - platform: ios + create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + - platform: linux + create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + - platform: macos + create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + - platform: web + create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + - platform: windows + create_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + base_revision: 4d9e56e694b656610ab87fcf2efbcd226e0ed8cf + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/pigeon/example/native_interop_app/.pluginToolsConfig.yaml b/packages/pigeon/example/native_interop_app/.pluginToolsConfig.yaml new file mode 100644 index 000000000000..3b6017b7609a --- /dev/null +++ b/packages/pigeon/example/native_interop_app/.pluginToolsConfig.yaml @@ -0,0 +1,4 @@ +buildFlags: + _pluginToolsConfigGlobalKey: + - "--no-tree-shake-icons" + - "--dart-define=buildmode=testing" diff --git a/packages/pigeon/example/native_interop_app/README.md b/packages/pigeon/example/native_interop_app/README.md new file mode 100644 index 000000000000..94a3e833355f --- /dev/null +++ b/packages/pigeon/example/native_interop_app/README.md @@ -0,0 +1,10 @@ +# Pigeon Native Interop Example Application + +This demonstrates using Pigeon's Native Interop feature (direct FFI and JNI function calls) for platform communication directly in an application, rather than in a plugin. + +To update the generated code, run: +```sh +cd ../.. +dart tool/generate.dart +``` + diff --git a/packages/pigeon/example/native_interop_app/android/.gitignore b/packages/pigeon/example/native_interop_app/android/.gitignore new file mode 100644 index 000000000000..55afd919c659 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/to/reference-keystore +key.properties +**/*.keystore +**/*.jks diff --git a/packages/pigeon/example/native_interop_app/android/app/build.gradle.kts b/packages/pigeon/example/native_interop_app/android/app/build.gradle.kts new file mode 100644 index 000000000000..8de6e84fc142 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/android/app/build.gradle.kts @@ -0,0 +1,39 @@ +plugins { + id("com.android.application") + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "dev.flutter.pigeon_example_app" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + + defaultConfig { + applicationId = "dev.flutter.pigeon_example_app" + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + signingConfig = signingConfigs.getByName("debug") + } + } +} + +kotlin { + compilerOptions { + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 + } +} + +flutter { + source = "../.." +} diff --git a/packages/pigeon/example/native_interop_app/android/app/src/debug/AndroidManifest.xml b/packages/pigeon/example/native_interop_app/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 000000000000..399f6981d5d3 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/pigeon/example/native_interop_app/android/app/src/main/AndroidManifest.xml b/packages/pigeon/example/native_interop_app/android/app/src/main/AndroidManifest.xml new file mode 100644 index 000000000000..7e5151b29f64 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + diff --git a/packages/pigeon/example/native_interop_app/android/app/src/main/kotlin/dev/flutter/pigeon_example_app/MainActivity.kt b/packages/pigeon/example/native_interop_app/android/app/src/main/kotlin/dev/flutter/pigeon_example_app/MainActivity.kt new file mode 100644 index 000000000000..158218171617 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/android/app/src/main/kotlin/dev/flutter/pigeon_example_app/MainActivity.kt @@ -0,0 +1,23 @@ +// 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. + +package dev.flutter.pigeon_example_app + +import io.flutter.embedding.android.FlutterActivity +import io.flutter.embedding.engine.FlutterEngine + +private class PigeonApiImplementation : NativeInteropExampleApi() { + override fun doSomething() { + // Do nothing or print + } +} + +class MainActivity : FlutterActivity() { + override fun configureFlutterEngine(flutterEngine: FlutterEngine) { + super.configureFlutterEngine(flutterEngine) + + val api = PigeonApiImplementation() + NativeInteropExampleApiRegistrar().register(api) + } +} diff --git a/packages/pigeon/example/native_interop_app/android/app/src/main/kotlin/dev/flutter/pigeon_example_app/NativeInteropExample.g.kt b/packages/pigeon/example/native_interop_app/android/app/src/main/kotlin/dev/flutter/pigeon_example_app/NativeInteropExample.g.kt new file mode 100644 index 000000000000..17bbcac5a0dc --- /dev/null +++ b/packages/pigeon/example/native_interop_app/android/app/src/main/kotlin/dev/flutter/pigeon_example_app/NativeInteropExample.g.kt @@ -0,0 +1,85 @@ +// 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") + +package dev.flutter.pigeon_example_app + +import android.util.Log +import androidx.annotation.Keep + +private object NativeInteropExamplePigeonUtils { + + fun wrapResult(result: Any?): List { + return listOf(result) + } + + fun wrapError(exception: Throwable): List { + return if (exception is FlutterError) { + listOf(exception.code, exception.message, exception.details) + } else { + listOf( + exception.javaClass.simpleName, + exception.toString(), + "Cause: " + exception.cause + ", Stacktrace: " + Log.getStackTraceString(exception)) + } + } +} + +/** + * 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 FlutterError( + val code: String, + override val message: String? = null, + val details: Any? = null +) : RuntimeException() + +private const val defaultInstanceName = "PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u" +val NativeInteropExampleApiInstances: MutableMap = + mutableMapOf() + +@Keep +abstract class NativeInteropExampleApi { + abstract fun doSomething() +} + +@Keep +class NativeInteropExampleApiRegistrar : NativeInteropExampleApi() { + var api: NativeInteropExampleApi? = null + + fun register( + api: NativeInteropExampleApi?, + name: String = defaultInstanceName + ): NativeInteropExampleApiRegistrar { + if (api != null) { + this.api = api + NativeInteropExampleApiInstances[name] = this + } else { + NativeInteropExampleApiInstances.remove(name) + } + return this + } + + @Keep + fun getInstance(name: String): NativeInteropExampleApiRegistrar? { + return NativeInteropExampleApiInstances[name] + } + + override fun doSomething() { + api?.let { + try { + return it.doSomething() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropExampleApi has not been set") + } +} diff --git a/packages/pigeon/example/native_interop_app/android/app/src/main/kotlin/dev/flutter/pigeon_example_app/NativeInteropExample.kt b/packages/pigeon/example/native_interop_app/android/app/src/main/kotlin/dev/flutter/pigeon_example_app/NativeInteropExample.kt new file mode 100644 index 000000000000..b36e46557f0a --- /dev/null +++ b/packages/pigeon/example/native_interop_app/android/app/src/main/kotlin/dev/flutter/pigeon_example_app/NativeInteropExample.kt @@ -0,0 +1,17 @@ +// 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. + +package dev.flutter.pigeon_example_app + +// #docregion callback-style +fun echoAsync(value: String, callback: (Result) -> Unit) { + callback(Result.success(value)) +} +// #enddocregion callback-style + +// #docregion concurrency-style +suspend fun echoAsync(value: String): String { + return value +} +// #enddocregion concurrency-style diff --git a/packages/pigeon/example/native_interop_app/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/pigeon/example/native_interop_app/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 000000000000..f74085f3f6a2 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/pigeon/example/native_interop_app/android/app/src/main/res/drawable/launch_background.xml b/packages/pigeon/example/native_interop_app/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 000000000000..304732f88420 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/pigeon/example/native_interop_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/pigeon/example/native_interop_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 000000000000..db77bb4b7b09 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/pigeon/example/native_interop_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/pigeon/example/native_interop_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 000000000000..17987b79bb8a Binary files /dev/null and b/packages/pigeon/example/native_interop_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/pigeon/example/native_interop_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/pigeon/example/native_interop_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 000000000000..09d4391482be Binary files /dev/null and b/packages/pigeon/example/native_interop_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/pigeon/example/native_interop_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/pigeon/example/native_interop_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 000000000000..d5f1c8d34e7a Binary files /dev/null and b/packages/pigeon/example/native_interop_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/pigeon/example/native_interop_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/pigeon/example/native_interop_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 000000000000..4d6372eebdb2 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/pigeon/example/native_interop_app/android/app/src/main/res/values-night/styles.xml b/packages/pigeon/example/native_interop_app/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 000000000000..06952be745f9 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/pigeon/example/native_interop_app/android/app/src/main/res/values/styles.xml b/packages/pigeon/example/native_interop_app/android/app/src/main/res/values/styles.xml new file mode 100644 index 000000000000..cb1ef88056ed --- /dev/null +++ b/packages/pigeon/example/native_interop_app/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/pigeon/example/native_interop_app/android/app/src/profile/AndroidManifest.xml b/packages/pigeon/example/native_interop_app/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 000000000000..399f6981d5d3 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/packages/pigeon/example/native_interop_app/android/build.gradle.kts b/packages/pigeon/example/native_interop_app/android/build.gradle.kts new file mode 100644 index 000000000000..a8bde37d0c72 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/android/build.gradle.kts @@ -0,0 +1,33 @@ +allprojects { + repositories { + // See https://github.com/flutter/flutter/blob/master/docs/ecosystem/Plugins-and-Packages-repository-structure.md#gradle-structure for more info. + val artifactRepoKey = "ARTIFACT_HUB_REPOSITORY" + val artifactRepoUrl = System.getenv(artifactRepoKey) + if (artifactRepoUrl != null) { + println("Using artifact hub") + maven { + url = uri(artifactRepoUrl) + } + } + google() + mavenCentral() + } +} + +val newBuildDir: Directory = + rootProject.layout.buildDirectory + .dir("../../build") + .get() +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/packages/pigeon/example/native_interop_app/android/gradle.properties b/packages/pigeon/example/native_interop_app/android/gradle.properties new file mode 100644 index 000000000000..6146589810a7 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/android/gradle.properties @@ -0,0 +1,7 @@ +org.gradle.jvmargs=-Xmx4G +android.useAndroidX=true + +# This builtInKotlin flag was added automatically by Flutter migrator +android.builtInKotlin=false +# This newDsl flag was added automatically by Flutter migrator +android.newDsl=false diff --git a/packages/pigeon/example/native_interop_app/android/gradle/wrapper/gradle-wrapper.properties b/packages/pigeon/example/native_interop_app/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000000..ee1de602cad7 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-all.zip + diff --git a/packages/pigeon/example/native_interop_app/android/settings.gradle.kts b/packages/pigeon/example/native_interop_app/android/settings.gradle.kts new file mode 100644 index 000000000000..a8be9bb7583e --- /dev/null +++ b/packages/pigeon/example/native_interop_app/android/settings.gradle.kts @@ -0,0 +1,28 @@ +pluginManagement { + val flutterSdkPath = + run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + flutterSdkPath + } + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +// 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 "9.1.0" apply false + id("org.jetbrains.kotlin.android") version "2.3.20" apply false + id("com.google.cloud.artifactregistry.gradle-plugin") version "2.2.1" +} + +include(":app") diff --git a/packages/pigeon/example/native_interop_app/ffigen_config.dart b/packages/pigeon/example/native_interop_app/ffigen_config.dart new file mode 100644 index 000000000000..514a21037965 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ffigen_config.dart @@ -0,0 +1,125 @@ +// Autogenerated from Pigeon, do not edit directly. +// See also: https://pub.dev/packages/pigeon +// ignore_for_file: depend_on_referenced_packages + +import 'dart:io'; + +import 'package:ffigen/ffigen.dart' as fg; +import 'package:path/path.dart' as path; +import 'package:pub_semver/pub_semver.dart'; +import 'package:swift2objc/swift2objc.dart'; +import 'package:swiftgen/src/config.dart'; +import 'package:swiftgen/swiftgen.dart'; + +Future main(List args) async { + Directory.current = Platform.script.resolve('.').toFilePath(); + Uri sdk; + if (args.isNotEmpty) { + sdk = Uri.directory(args[0]); + } else { + sdk = await _getAppleSdk(); + } + final bool isValidSdk = + File(path.join(sdk.toFilePath(), 'SDKSettings.json')).existsSync() || + File(path.join(sdk.toFilePath(), 'SDKSettings.plist')).existsSync(); + if (!isValidSdk) { + sdk = await _getAppleSdk(); + } + + final classes = { + 'NativeInteropExamplePigeonInternalNull', + 'NativeInteropExamplePigeonTypedData', + 'NativeInteropExampleNumberWrapper', + 'NativeInteropExampleApi', + 'NativeInteropExampleApiSetup', + 'PigeonError', + }; + final enums = {'NativeInteropExamplePigeonInternalNumberType'}; + var targetTriple = ''; + if (targetTriple.isEmpty) { + try { + targetTriple = sdk.path.toLowerCase().contains('macosx') + ? await macOSX64TargetTripleLatest + : await iOSArm64TargetTripleLatest; + } catch (_) { + targetTriple = sdk.path.toLowerCase().contains('macosx') + ? 'x86_64-apple-macosx' + : 'arm64-apple-ios'; + } + } + + await SwiftGenerator( + target: Target(triple: targetTriple, sdk: sdk), + inputs: [ + ObjCCompatibleSwiftFileInput( + files: [Uri.file('ios/Runner/NativeInteropExample.g.swift')], + ), + ], + include: (Declaration d) => classes.contains(d.name) || enums.contains(d.name), + output: Output( + module: 'Runner', + dartFile: Uri.file('lib/src/native_interop_example.g.ffi.dart'), + objectiveCFile: Uri.file('ios/Runner_objc_gen/NativeInteropExample.g.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(13, 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) { + // Assign declarations to their destination module. Foundation classes starting with 'NS' + // return null so ffigen treats them as external system framework types (provided by + // package:objective_c) rather than generating local module wrappers for them. + // Specific types (like NSURLCredential) return 'Runner' so ffigen generates the + // explicit Dart FFI bindings required by this plugin. + + return decl.originalName.startsWith('NS') ? null : 'Runner'; + }, + ), + protocols: fg.Protocols( + include: (fg.Declaration decl) => classes.contains(decl.originalName), + module: (fg.Declaration decl) { + // Assign declarations to their destination module. Foundation classes starting with 'NS' + // return null so ffigen treats them as external system framework types (provided by + // package:objective_c) rather than generating local module wrappers for them. + // Specific types (like NSURLCredential) return 'Runner' so ffigen generates the + // explicit Dart FFI bindings required by this plugin. + + return decl.originalName.startsWith('NS') ? null : 'Runner'; + }, + ), + ), + ), + ).generate(logger: null, tempDirectory: Uri.directory('ios/Runner_objc_gen')); +} + +Future _getAppleSdk() async { + try { + final ProcessResult result = await Process.run('xcrun', [ + '--sdk', + 'iphoneos', + '--show-sdk-path', + ]); + if (result.exitCode == 0) { + final String sdkPath = result.stdout.toString().trim(); + if (sdkPath.isNotEmpty && + (File(path.join(sdkPath, 'SDKSettings.json')).existsSync() || + File(path.join(sdkPath, 'SDKSettings.plist')).existsSync())) { + return Uri.directory(sdkPath); + } + } + } catch (_) {} + return iOSSdk; +} diff --git a/packages/pigeon/example/native_interop_app/integration_test/example_app_test.dart b/packages/pigeon/example/native_interop_app/integration_test/example_app_test.dart new file mode 100644 index 000000000000..230b93fd91a0 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/integration_test/example_app_test.dart @@ -0,0 +1,18 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter_test/flutter_test.dart'; +import 'package:integration_test/integration_test.dart'; +import 'package:pigeon_native_interop_app/main.dart'; + +void main() { + IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + + testWidgets('gets host language', (WidgetTester tester) async { + await tester.pumpWidget(const MyApp()); + await tester.pumpAndSettle(); + + expect(find.textContaining('Called doSomething() successfully!'), findsOneWidget); + }); +} diff --git a/packages/pigeon/example/native_interop_app/ios/.gitignore b/packages/pigeon/example/native_interop_app/ios/.gitignore new file mode 100644 index 000000000000..7a7f9873ad7d --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/packages/pigeon/example/native_interop_app/ios/Flutter/AppFrameworkInfo.plist b/packages/pigeon/example/native_interop_app/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 000000000000..391a902b2beb --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + + diff --git a/packages/pigeon/example/native_interop_app/ios/Flutter/Debug.xcconfig b/packages/pigeon/example/native_interop_app/ios/Flutter/Debug.xcconfig new file mode 100644 index 000000000000..ec97fc6f3021 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/packages/pigeon/example/native_interop_app/ios/Flutter/Release.xcconfig b/packages/pigeon/example/native_interop_app/ios/Flutter/Release.xcconfig new file mode 100644 index 000000000000..c4855bfe2000 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/packages/pigeon/example/native_interop_app/ios/Podfile b/packages/pigeon/example/native_interop_app/ios/Podfile new file mode 100644 index 000000000000..17adeb14132e --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Podfile @@ -0,0 +1,40 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '13.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/packages/pigeon/example/native_interop_app/ios/Runner.xcodeproj/project.pbxproj b/packages/pigeon/example/native_interop_app/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000000..3a0bc3c060d5 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,520 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3368472729F02D040090029A /* NativeInteropExample.g.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3368472629F02D040090029A /* NativeInteropExample.g.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3368472629F02D040090029A /* NativeInteropExample.g.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NativeInteropExample.g.swift; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; 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 = ""; }; + 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 5AC2660E9756DE131CECB642 /* Pods */ = { + isa = PBXGroup; + children = ( + ); + path = Pods; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */, + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 5AC2660E9756DE131CECB642 /* Pods */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 3368472629F02D040090029A /* NativeInteropExample.g.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + packageProductDependencies = ( + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */, + ); + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + packageReferences = ( + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */, + ); + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3368472729F02D040090029A /* NativeInteropExample.g.swift in Sources */, + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + 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; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.pigeonExampleApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + 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; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + 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; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.pigeonExampleApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.pigeonExampleApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCLocalSwiftPackageReference section */ + 781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "FlutterGeneratedPluginSwiftPackage" */ = { + isa = XCLocalSwiftPackageReference; + relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; + }; +/* End XCLocalSwiftPackageReference section */ + +/* Begin XCSwiftPackageProductDependency section */ + 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = { + isa = XCSwiftPackageProductDependency; + productName = FlutterGeneratedPluginSwiftPackage; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/pigeon/example/native_interop_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/pigeon/example/native_interop_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000000..919434a6254f --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/pigeon/example/native_interop_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/pigeon/example/native_interop_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000000..18d981003d68 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/pigeon/example/native_interop_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/pigeon/example/native_interop_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000000..f9b0d7c5ea15 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/pigeon/example/native_interop_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/pigeon/example/native_interop_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 000000000000..c3fedb29c990 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/pigeon/example/native_interop_app/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/pigeon/example/native_interop_app/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000000..21a3cc14c74e --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/packages/pigeon/example/native_interop_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/pigeon/example/native_interop_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000000..18d981003d68 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/pigeon/example/native_interop_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/pigeon/example/native_interop_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 000000000000..f9b0d7c5ea15 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/AppDelegate.swift b/packages/pigeon/example/native_interop_app/ios/Runner/AppDelegate.swift new file mode 100644 index 000000000000..0f25821e4580 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner/AppDelegate.swift @@ -0,0 +1,37 @@ +// 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 UIKit + +private class PigeonApiImplementation: NativeInteropExampleApi { + func doSomething() throws { + // Do nothing + } +} + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} + +// TODO(stuartmorgan): Once 3.33+ reaches stable, remove this subclass and move the setup to +// AppDelegate.register(...). This approach is only used because this example needs to support +// both stable and master, and 3.32 doesn't have FlutterPluginRegistrant, while 3.33+ can't use +// the older application(didFinishLaunchingWithOptions) approach. +@objc class ExampleViewController: FlutterViewController { + override func awakeFromNib() { + super.awakeFromNib() + + let api = PigeonApiImplementation() + NativeInteropExampleApiSetup.register(api: api) + + } +} diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000000..d36b1fab2d9d --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 000000000000..dc9ada4725e9 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 000000000000..7353c41ecf9c Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 000000000000..797d452e4589 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 000000000000..6ed2d933e112 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 000000000000..4cd7b0099ca8 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 000000000000..fe730945a01f Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 000000000000..321773cd857a Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 000000000000..797d452e4589 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 000000000000..502f463a9bc8 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 000000000000..0ec303439225 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 000000000000..0ec303439225 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 000000000000..e9f5fea27c70 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 000000000000..84ac32ae7d98 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 000000000000..8953cba09064 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 000000000000..0467bf12aa4d Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 000000000000..0bedcf2fd467 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 000000000000..9da19eacad3b Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 000000000000..9da19eacad3b Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 000000000000..9da19eacad3b Binary files /dev/null and b/packages/pigeon/example/native_interop_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/pigeon/example/native_interop_app/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 000000000000..f2e259c7c939 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Base.lproj/Main.storyboard b/packages/pigeon/example/native_interop_app/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 000000000000..5c266a12dd93 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Info.plist b/packages/pigeon/example/native_interop_app/ios/Runner/Info.plist new file mode 100644 index 000000000000..b6439ae077fb --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Pigeon Example App + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + pigeon_example_app + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/NativeInteropExample.g.swift b/packages/pigeon/example/native_interop_app/ios/Runner/NativeInteropExample.g.swift new file mode 100644 index 000000000000..87d2988071ac --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner/NativeInteropExample.g.swift @@ -0,0 +1,368 @@ +// 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 PigeonError: 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 + "PigeonError(code: \(code ?? ""), message: \(message ?? ""), details: \(details ?? ""))" + } +} + +// A wrapper around NSNumber that preserves the original primitive/enum type across FFI. +@objc class NativeInteropExampleNumberWrapper: 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: NativeInteropExampleNumberWrapper, rhs: NativeInteropExampleNumberWrapper) + -> Bool + { + return lhs.number == rhs.number && lhs.type == rhs.type + } + + override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? NativeInteropExampleNumberWrapper else { + return false + } + return self == other + } + + override var hash: Int { + return number.hashValue ^ type.hashValue + } + +} + +private func wrapNumber(number: Any) -> NativeInteropExampleNumberWrapper { + switch number { + case let value as Int: + return NativeInteropExampleNumberWrapper(number: NSNumber(value: value), type: 1) + case let value as Int64: + return NativeInteropExampleNumberWrapper(number: NSNumber(value: value), type: 1) + case let value as Double: + return NativeInteropExampleNumberWrapper(number: NSNumber(value: value), type: 2) + case let value as Float: + return NativeInteropExampleNumberWrapper(number: NSNumber(value: value), type: 2) + case let value as Bool: + return NativeInteropExampleNumberWrapper(number: NSNumber(value: value), type: 3) + + default: + return NativeInteropExampleNumberWrapper(number: NSNumber(value: 0), type: 0) + } +} + +private func unwrapNumber(wrappedNumber: NativeInteropExampleNumberWrapper) -> Any { + switch wrappedNumber.type { + case 1: + return wrappedNumber.number.int64Value + case 2: + return wrappedNumber.number.doubleValue + case 3: + return wrappedNumber.number.boolValue + default: + return wrappedNumber.number.int64Value + } +} +// Enum to represent the Dart TypedData types +enum NativeInteropExamplePigeonInternalNumberType: Int { + case uint8 = 0 + case int32 = 1 + case int64 = 2 + case float32 = 3 + case float64 = 4 +} + +@objc public class NativeInteropExamplePigeonTypedData: 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 = NativeInteropExamplePigeonInternalNumberType.uint8.rawValue + } + + public init(_ data: [Int32]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = NativeInteropExamplePigeonInternalNumberType.int32.rawValue + } + + public init(_ data: [Int64]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = NativeInteropExamplePigeonInternalNumberType.int64.rawValue + } + + public init(_ data: [Float32]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = NativeInteropExamplePigeonInternalNumberType.float32.rawValue + } + + public init(_ data: [Float64]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = NativeInteropExamplePigeonInternalNumberType.float64.rawValue + } + + /// Returns the data as a [UInt8] array, if the type is .uint8 + public func toUint8Array() -> [UInt8]? { + guard type == NativeInteropExamplePigeonInternalNumberType.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 == NativeInteropExamplePigeonInternalNumberType.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 == NativeInteropExamplePigeonInternalNumberType.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 == NativeInteropExamplePigeonInternalNumberType.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 == NativeInteropExamplePigeonInternalNumberType.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 + } +} + +enum NativeInteropExamplePigeonInternal { + static let defaultInstanceName = "PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u" + static 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 NativeInteropExamplePigeonInternalNull + } +} + +private func nilOrValue(_ value: Any?) -> T? { + if value is NSNull { return nil } + return value as! T? +} + +@objc class NativeInteropExamplePigeonInternalNull: NSObject {} + +class _PigeonFfiCodec { + static func readValue(value: NSObject?, type: String? = nil, type2: String? = nil) -> Any? { + if NativeInteropExamplePigeonInternal.isNullish(value) { + return nil + } + if let typedData = value as? NativeInteropExamplePigeonTypedData { + switch typedData.type { + case NativeInteropExamplePigeonInternalNumberType.uint8.rawValue: + return typedData.toUint8Array() + case NativeInteropExamplePigeonInternalNumberType.int32.rawValue: + return typedData.toInt32Array() + case NativeInteropExamplePigeonInternalNumberType.int64.rawValue: + return typedData.toInt64Array() + case NativeInteropExamplePigeonInternalNumberType.float32.rawValue: + return typedData.toFloat32Array() + case NativeInteropExamplePigeonInternalNumberType.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 + } + + 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 NativeInteropExampleNumberWrapper { + return unwrapNumber(wrappedNumber: value as! NativeInteropExampleNumberWrapper) + } + if value is NSString { + return value as! NSString + + } + return value + } + + static func writeValue(value: Any?, isObject: Bool = false) -> Any? { + if NativeInteropExamplePigeonInternal.isNullish(value) { + return NativeInteropExamplePigeonInternalNull() + } + if let uint8Array = value as? [UInt8] { + return isObject ? NativeInteropExamplePigeonTypedData(uint8Array) : uint8Array as NSArray + } + if let int32Array = value as? [Int32] { + return isObject ? NativeInteropExamplePigeonTypedData(int32Array) : int32Array as NSArray + } + if let int64Array = value as? [Int64] { + return isObject ? NativeInteropExamplePigeonTypedData(int64Array) : int64Array as NSArray + } + if let float32Array = value as? [Float32] { + return isObject ? NativeInteropExamplePigeonTypedData(float32Array) : float32Array as NSArray + } + if let float64Array = value as? [Double] { + return isObject ? NativeInteropExamplePigeonTypedData(float64Array) : float64Array as NSArray + } + if value is Bool || value is Double || value is Int || value is Int64 { + 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 + } + + } + if value is [Any] { + let list = value as! [Any] + let res: NSMutableArray = NSMutableArray(capacity: list.count) + for item in list { + res.add( + NativeInteropExamplePigeonInternal.isNullish(item) + ? NativeInteropExamplePigeonInternalNull() + : writeValue(value: item, isObject: true) as! NSObject) + } + return res + } + if value is [AnyHashable: Any] { + let dict = value as! [AnyHashable: Any] + let res: NSMutableDictionary = NSMutableDictionary(capacity: dict.count) + for (key, value) in dict { + res.setObject( + NativeInteropExamplePigeonInternal.isNullish(key) + ? NativeInteropExamplePigeonInternalNull() + : 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 + + } + return value + } +} + +class NativeInteropExampleApiInstanceTracker { + static var instancesOfNativeInteropExampleApi = [String: NativeInteropExampleApiSetup?]() +} + +/// Generated protocol from Pigeon that represents a handler of messages from Flutter. +protocol NativeInteropExampleApi { + func doSomething() throws +} + +/// Generated setup class from Pigeon to register implemented NativeInteropExampleApi classes. +@objc class NativeInteropExampleApiSetup: NSObject { + private var api: NativeInteropExampleApi? + override init() {} + static func register( + api: NativeInteropExampleApi?, + name: String = NativeInteropExamplePigeonInternal.defaultInstanceName + ) { + if let api = api { + let wrapper = NativeInteropExampleApiSetup() + wrapper.api = api + NativeInteropExampleApiInstanceTracker.instancesOfNativeInteropExampleApi[name] = wrapper + } else { + NativeInteropExampleApiInstanceTracker.instancesOfNativeInteropExampleApi.removeValue( + forKey: name) + } + } + @objc static func getInstance(name: String) -> NativeInteropExampleApiSetup? { + return NativeInteropExampleApiInstanceTracker.instancesOfNativeInteropExampleApi[name] ?? nil + } + @objc func doSomething(wrappedError: PigeonError) { + do { + return try api!.doSomething() + } catch let error as PigeonError { + 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 + } +} diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/NativeInteropExample.swift b/packages/pigeon/example/native_interop_app/ios/Runner/NativeInteropExample.swift new file mode 100644 index 000000000000..810047f7909e --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner/NativeInteropExample.swift @@ -0,0 +1,17 @@ +// 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 Foundation + +// #docregion callback-style +func echoAsync(_ value: String, completion: @escaping (Result) -> Void) { + completion(.success(value)) +} +// #enddocregion callback-style + +// #docregion concurrency-style +func echoAsync(_ value: String) async throws -> String { + return value +} +// #enddocregion concurrency-style diff --git a/packages/pigeon/example/native_interop_app/ios/Runner/Runner-Bridging-Header.h b/packages/pigeon/example/native_interop_app/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 000000000000..ba04211afd0a --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1,5 @@ +// 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 "GeneratedPluginRegistrant.h" diff --git a/packages/pigeon/example/native_interop_app/ios/Runner_objc_gen/Messages.g.m b/packages/pigeon/example/native_interop_app/ios/Runner_objc_gen/Messages.g.m new file mode 100644 index 000000000000..be67dbcd281d --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner_objc_gen/Messages.g.m @@ -0,0 +1,84 @@ +#import +#import +#include +#import "../../example/native_interop_app/ios/Runner_objc_gen/Runner.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 *_x6jxzu_MessageFlutterApiBridge(void) { return @protocol(MessageFlutterApiBridge); } + +typedef id (^_ProtocolTrampoline)(void *sel, id arg1, id arg2); +__attribute__((visibility("default"))) __attribute__((used)) id +_x6jxzu_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 void (^_ListenerTrampoline)(id arg0); +__attribute__((visibility("default"))) __attribute__((used)) _ListenerTrampoline +_x6jxzu_wrapListenerBlock_xtuoz7(_ListenerTrampoline block) NS_RETURNS_RETAINED { + return ^void(id arg0) { + objc_retainBlock(block); + block((__bridge id)(__bridge_retained void *)(arg0)); + }; +} + +typedef void (^_BlockingTrampoline)(void *waiter, id arg0); +__attribute__((visibility("default"))) __attribute__((used)) _ListenerTrampoline +_x6jxzu_wrapBlockingBlock_xtuoz7(_BlockingTrampoline block, _BlockingTrampoline 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)); + }); +} +#undef BLOCKING_BLOCK_IMPL + +#pragma clang diagnostic pop diff --git a/packages/pigeon/example/native_interop_app/ios/Runner_objc_gen/Runner.h b/packages/pigeon/example/native_interop_app/ios/Runner_objc_gen/Runner.h new file mode 100644 index 000000000000..6296ccc3f655 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner_objc_gen/Runner.h @@ -0,0 +1,396 @@ +// Generated by Apple Swift version 6.1.2 effective-5.10 (swiftlang-6.1.2.1.2 +// clang-1700.0.13.5) +#ifndef RUNNER_SWIFT_H +#define RUNNER_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 = "Runner", generated_declaration))), \ + apply_to = \ + any(function, enum, objc_interface, objc_category, objc_protocol)) +#pragma pop_macro("any") +#endif + +#if defined(__OBJC__) + +@class NSString; +@class PigeonError; +/// Generated setup class from Pigeon to register implemented +/// NativeInteropExampleApi classes. +SWIFT_CLASS("_TtC6Runner28NativeInteropExampleApiSetup") +@interface NativeInteropExampleApiSetup : NSObject +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; ++ (NativeInteropExampleApiSetup* _Nullable)getInstanceWithName: + (NSString* _Nonnull)name SWIFT_WARN_UNUSED_RESULT; +- (void)doSomethingWithWrappedError:(PigeonError* _Nonnull)wrappedError; +@end + +@class NSNumber; +SWIFT_CLASS("_TtC6Runner33NativeInteropExampleNumberWrapper") +@interface NativeInteropExampleNumberWrapper : 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("_TtC6Runner38NativeInteropExamplePigeonInternalNull") +@interface NativeInteropExamplePigeonInternalNull : NSObject +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +@class NSData; +SWIFT_CLASS("_TtC6Runner35NativeInteropExamplePigeonTypedData") +@interface NativeInteropExamplePigeonTypedData : 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 + +/// Error class for passing custom error details to Dart side. +SWIFT_CLASS("_TtC6Runner11PigeonError") +@interface PigeonError : 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 + +#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/example/native_interop_app/ios/Runner_objc_gen/my_plugin.h b/packages/pigeon/example/native_interop_app/ios/Runner_objc_gen/my_plugin.h new file mode 100644 index 000000000000..7b331ac38017 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/ios/Runner_objc_gen/my_plugin.h @@ -0,0 +1,400 @@ +// Generated by Apple Swift version 6.1.2 effective-5.10 (swiftlang-6.1.2.1.2 +// clang-1700.0.13.5) +#ifndef MY_PLUGIN_SWIFT_H +#define MY_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 = "my_plugin", \ + generated_declaration))), \ + apply_to = any(function, enum, objc_interface, \ + objc_category, objc_protocol)) +#pragma pop_macro("any") +#endif + +#if defined(__OBJC__) + +@class NSString; +@class PigeonError; +/// Generated setup class from Pigeon to register implemented +/// NativeInteropExampleApi classes. +SWIFT_CLASS("_TtC9my_plugin28NativeInteropExampleApiSetup") +SWIFT_AVAILABILITY(macos, introduced = 10.15) +SWIFT_AVAILABILITY(ios, introduced = 13) +@interface NativeInteropExampleApiSetup : NSObject +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; ++ (NativeInteropExampleApiSetup* _Nullable)getInstanceWithName: + (NSString* _Nonnull)name SWIFT_WARN_UNUSED_RESULT; +- (void)doSomethingWithWrappedError:(PigeonError* _Nonnull)wrappedError; +@end + +@class NSNumber; +SWIFT_CLASS("_TtC9my_plugin33NativeInteropExampleNumberWrapper") +@interface NativeInteropExampleNumberWrapper : 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("_TtC9my_plugin38NativeInteropExamplePigeonInternalNull") +@interface NativeInteropExamplePigeonInternalNull : NSObject +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +@class NSData; +SWIFT_CLASS("_TtC9my_plugin35NativeInteropExamplePigeonTypedData") +SWIFT_AVAILABILITY(macos, introduced = 10.15) +SWIFT_AVAILABILITY(ios, introduced = 13) +@interface NativeInteropExamplePigeonTypedData : 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 + +/// Error class for passing custom error details to Dart side. +SWIFT_CLASS("_TtC9my_plugin11PigeonError") +@interface PigeonError : 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 + +#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/example/native_interop_app/jnigen_config.dart b/packages/pigeon/example/native_interop_app/jnigen_config.dart new file mode 100644 index 000000000000..2a479300cde0 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/jnigen_config.dart @@ -0,0 +1,31 @@ +// Autogenerated from Pigeon, do not edit directly. +// See also: https://pub.dev/packages/pigeon +// ignore_for_file: depend_on_referenced_packages + +import 'dart:io'; +import 'package:jnigen/jnigen.dart'; +import 'package:logging/logging.dart'; + +void main() async { + Directory.current = Platform.script.resolve('.').toFilePath(); + await generateJniBindings( + Config( + androidSdkConfig: AndroidSdkConfig(addGradleDeps: true, androidExample: './'), + summarizerOptions: SummarizerOptions(backend: SummarizerBackend.asm), + outputConfig: OutputConfig( + dartConfig: DartCodeOutputConfig( + path: Uri.file('lib/src/native_interop_example.g.jni.dart'), + structure: OutputStructure.singleFile, + ), + ), + logLevel: Level.ALL, + classPath: [Uri.directory('build/app/tmp/kotlin-classes/release')], + + classes: [ + 'dev.flutter.pigeon_example_app.FlutterError', + 'dev.flutter.pigeon_example_app.NativeInteropExampleApi', + 'dev.flutter.pigeon_example_app.NativeInteropExampleApiRegistrar', + ], + ), + ); +} diff --git a/packages/pigeon/example/native_interop_app/lib/main.dart b/packages/pigeon/example/native_interop_app/lib/main.dart new file mode 100644 index 000000000000..f3eb25f439b5 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/lib/main.dart @@ -0,0 +1,85 @@ +// 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 'dart:io' show Platform; + +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +import 'src/native_interop_example.g.dart'; + +void main() { + WidgetsFlutterBinding.ensureInitialized(); + runApp(const MyApp()); +} + +class MyApp extends StatelessWidget { + const MyApp({super.key}); + + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Pigeon Demo', + theme: ThemeData( + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + useMaterial3: true, + ), + home: const MyHomePage(title: 'Pigeon Demo'), + ); + } +} + +class MyHomePage extends StatefulWidget { + const MyHomePage({super.key, required this.title}); + + final String title; + + @override + State createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + final NativeInteropExampleApi _api = (Platform.isAndroid || Platform.isIOS || Platform.isMacOS) + ? NativeInteropExampleApi.createWithNativeInteropApi() + : NativeInteropExampleApi(); + String? _hostCallResult; + + @override + void initState() { + super.initState(); + _api + .doSomething() + .then((_) { + setState(() { + _hostCallResult = 'Called doSomething() successfully!'; + }); + }) + .onError((PlatformException error, StackTrace _) { + setState(() { + _hostCallResult = 'Failed to call doSomething(): ${error.message}'; + }); + }); + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + backgroundColor: Theme.of(context).colorScheme.inversePrimary, + title: Text(widget.title), + ), + body: Center( + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text(_hostCallResult ?? 'Waiting for host language...'), + if (_hostCallResult == null) const CircularProgressIndicator(), + ], + ), + ), + ); + } +} diff --git a/packages/pigeon/example/native_interop_app/lib/src/native_interop_example.g.dart b/packages/pigeon/example/native_interop_app/lib/src/native_interop_example.g.dart new file mode 100644 index 000000000000..17c200d42691 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/lib/src/native_interop_example.g.dart @@ -0,0 +1,556 @@ +// 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, omit_local_variable_types, omit_obvious_local_variable_types + +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 './native_interop_example.g.ffi.dart' as ffi_bridge; +import './native_interop_example.g.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; +} + +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 { + 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 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 { + throw ArgumentError.value(value); + } + } +} + +class _PigeonFfiCodec { + static Object? readValue(ObjCObject? value, [Type? type, Type? type2]) { + if (value == null || ffi_bridge.NativeInteropExamplePigeonInternalNull.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; + } + + return numValue.longValue; + } else if (NSString.isA(value)) { + return NSString.as(value).toDartString(); + } else if (ffi_bridge.NativeInteropExamplePigeonTypedData.isA(value)) { + return _getValueFromPigeonTypedData(value as ffi_bridge.NativeInteropExamplePigeonTypedData); + } 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.NativeInteropExampleNumberWrapper.isA(value)) { + return _convertNumberWrapperToDart(ffi_bridge.NativeInteropExampleNumberWrapper.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.NativeInteropExamplePigeonInternalNull() 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) { + final NSMutableArray res = NSMutableArray(); + for (final Object? entry in value) { + res.addObject( + entry == null + ? ffi_bridge.NativeInteropExamplePigeonInternalNull() + : writeValue(entry, 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 { + throw ArgumentError.value(value); + } + } +} + +ffi_bridge.NativeInteropExamplePigeonTypedData _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.NativeInteropExamplePigeonTypedData.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.NativeInteropExamplePigeonTypedData.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.NativeInteropExamplePigeonTypedData.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.NativeInteropExamplePigeonTypedData.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.NativeInteropExamplePigeonTypedData.alloc().initWithData(nsData, type: 4); + } + throw ArgumentError.value(value); +} + +Object? _getValueFromPigeonTypedData(ffi_bridge.NativeInteropExamplePigeonTypedData value) { + final NSData data = value.data; + final Pointer bytes = data.bytes; + return switch (value.type) { + 0 => Uint8List.fromList(bytes.cast().asTypedList(data.length)), + 1 => Int32List.fromList(bytes.cast().asTypedList(data.length ~/ 4)), + 2 => Int64List.fromList(bytes.cast().asTypedList(data.length ~/ 8)), + 3 => Float32List.fromList(bytes.cast().asTypedList(data.length ~/ 4)), + 4 => Float64List.fromList(bytes.cast().asTypedList(data.length ~/ 8)), + _ => throw ArgumentError.value(value), + }; +} + +Object? _convertNumberWrapperToDart(ffi_bridge.NativeInteropExampleNumberWrapper value) { + switch (value.type) { + case 1: + return value.number.longValue; + case 2: + return value.number.doubleValue; + case 3: + return value.number.boolValue; + default: + throw ArgumentError.value(value); + } +} + +ffi_bridge.NativeInteropExampleNumberWrapper _convertToFfiNumberWrapper(Object value) { + switch (value) { + case int _: + return ffi_bridge.NativeInteropExampleNumberWrapper.alloc().initWithNumber( + NSNumber.alloc().initWithLong(value), + type: 1, + ); + case double _: + return ffi_bridge.NativeInteropExampleNumberWrapper.alloc().initWithNumber( + NSNumber.alloc().initWithDouble(value), + type: 2, + ); + case bool _: + return ffi_bridge.NativeInteropExampleNumberWrapper.alloc().initWithNumber( + NSNumber.alloc().initWithLong(value ? 1 : 0), + type: 3, + ); + 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.PigeonError error) { + if (error.code != null) { + throw _wrapFfiError(error); + } +} + +PlatformException _wrapFfiError(ffi_bridge.PigeonError error) => PlatformException( + code: error.code!.toDartString(), + message: error.message?.toDartString(), + details: NSString.isA(error.details) ? error.details!.toDartString() : error.details, +); + +void _reportFfiError(ffi_bridge.PigeonError 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.FlutterError.type)) { + final jni_bridge.FlutterError pigeonError = e.as(jni_bridge.FlutterError.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, + ); +} + +class _PigeonCodec extends StandardMessageCodec { + const _PigeonCodec(); + @override + void writeValue(WriteBuffer buffer, Object? value) { + if (value is int) { + buffer.putUint8(4); + buffer.putInt64(value); + } else { + super.writeValue(buffer, value); + } + } + + @override + Object? readValueOfType(int type, ReadBuffer buffer) { + switch (type) { + default: + return super.readValueOfType(type, buffer); + } + } +} + +const String defaultInstanceName = 'PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u'; + +class NativeInteropExampleApiForNativeInterop { + NativeInteropExampleApiForNativeInterop._withRegistrar({ + jni_bridge.NativeInteropExampleApiRegistrar? jniApi, + ffi_bridge.NativeInteropExampleApiSetup? ffiApi, + }) : _jniApi = jniApi, + _ffiApi = ffiApi; + + /// Returns instance of NativeInteropExampleApiForNativeInterop with specified [channelName] if one has been registered. + static NativeInteropExampleApiForNativeInterop? getInstance({ + String channelName = defaultInstanceName, + }) { + final NativeInteropExampleApiForNativeInterop res; + if (Platform.isAndroid) { + final jni_bridge.NativeInteropExampleApiRegistrar? link = + jni_bridge.NativeInteropExampleApiRegistrar().getInstance(channelName.toJString()); + if (link == null) { + _throwNoInstanceError(channelName); + } + res = NativeInteropExampleApiForNativeInterop._withRegistrar(jniApi: link); + } else if (Platform.isIOS || Platform.isMacOS) { + final ffi_bridge.NativeInteropExampleApiSetup? link = + ffi_bridge.NativeInteropExampleApiSetup.getInstanceWithName(NSString(channelName)); + if (link == null) { + _throwNoInstanceError(channelName); + } + res = NativeInteropExampleApiForNativeInterop._withRegistrar(ffiApi: link); + } else { + throw UnsupportedError( + 'Native Interop is not supported on this platform. Use NativeInteropExampleApi instead.', + ); + } + return res; + } + + late final jni_bridge.NativeInteropExampleApiRegistrar? _jniApi; + late final ffi_bridge.NativeInteropExampleApiSetup? _ffiApi; + + void doSomething() { + try { + if (_jniApi != null) { + return _jniApi.doSomething(); + } else if (_ffiApi != null) { + final error = ffi_bridge.PigeonError(); + _ffiApi.doSomethingWithWrappedError(error); + _throwIfFfiError(error); + return; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } +} + +class NativeInteropExampleApi { + /// Constructor for [NativeInteropExampleApi]. 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. + NativeInteropExampleApi({ + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + NativeInteropExampleApiForNativeInterop? nativeInteropApi, + }) : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty + ? '.$messageChannelSuffix' + : '', + _nativeInteropApi = nativeInteropApi; + + /// Creates an instance of [NativeInteropExampleApi] that requests an instance of + /// [NativeInteropExampleApiForNativeInterop] 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 NativeInteropExampleApi.createWithNativeInteropApi({ + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) { + NativeInteropExampleApiForNativeInterop? nativeInteropApi; + String nativeInteropApiInstanceName = ''; + if (Platform.isAndroid || Platform.isIOS || Platform.isMacOS) { + if (messageChannelSuffix.isEmpty) { + nativeInteropApi = NativeInteropExampleApiForNativeInterop.getInstance(); + } else { + nativeInteropApiInstanceName = messageChannelSuffix; + nativeInteropApi = NativeInteropExampleApiForNativeInterop.getInstance( + channelName: messageChannelSuffix, + ); + } + } else { + throw UnsupportedError( + 'Native Interop is not supported on this platform. Use the default constructor of NativeInteropExampleApi instead.', + ); + } + if (nativeInteropApi == null) { + throw ArgumentError( + 'No NativeInteropExampleApi instance with ${nativeInteropApiInstanceName.isEmpty ? 'no ' : ''} instance name ${nativeInteropApiInstanceName.isNotEmpty ? '"$nativeInteropApiInstanceName" ' : ''}found.', + ); + } + return NativeInteropExampleApi( + binaryMessenger: binaryMessenger, + messageChannelSuffix: messageChannelSuffix, + nativeInteropApi: nativeInteropApi, + ); + } + + final BinaryMessenger? pigeonVar_binaryMessenger; + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + final NativeInteropExampleApiForNativeInterop? _nativeInteropApi; + + Future doSomething() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.doSomething(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon.NativeInteropExampleApi.doSomething$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); + } +} diff --git a/packages/pigeon/example/native_interop_app/lib/src/native_interop_example.g.ffi.dart b/packages/pigeon/example/native_interop_app/lib/src/native_interop_example.g.ffi.dart new file mode 100644 index 000000000000..131c4c1c4b2a --- /dev/null +++ b/packages/pigeon/example/native_interop_app/lib/src/native_interop_example.g.ffi.dart @@ -0,0 +1,620 @@ +// 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; + +/// Generated setup class from Pigeon to register implemented NativeInteropExampleApi classes. +extension type NativeInteropExampleApiSetup._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NativeInteropExampleApiSetup] that points to the same underlying object as [other]. + NativeInteropExampleApiSetup.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NativeInteropExampleApiSetup] that wraps the given raw object pointer. + NativeInteropExampleApiSetup.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 [NativeInteropExampleApiSetup]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NativeInteropExampleApiSetup, + ); + + /// alloc + static NativeInteropExampleApiSetup alloc() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropExampleApiSetup, _sel_alloc); + return NativeInteropExampleApiSetup.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NativeInteropExampleApiSetup allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NativeInteropExampleApiSetup, + _sel_allocWithZone_, + zone, + ); + return NativeInteropExampleApiSetup.fromPointer($ret, retain: false, release: true); + } + + /// getInstanceWithName: + static NativeInteropExampleApiSetup? getInstanceWithName(objc.NSString name) { + final $ret = _objc_msgSend_1sotr3r( + _class_NativeInteropExampleApiSetup, + _sel_getInstanceWithName_, + name.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropExampleApiSetup.fromPointer($ret, retain: true, release: true); + } + + /// new + static NativeInteropExampleApiSetup new$() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropExampleApiSetup, _sel_new); + return NativeInteropExampleApiSetup.fromPointer($ret, retain: false, release: true); + } + + /// Returns a new instance of NativeInteropExampleApiSetup constructed with the default `new` method. + NativeInteropExampleApiSetup() : this.as(new$().object$); +} + +extension NativeInteropExampleApiSetup$Methods on NativeInteropExampleApiSetup { + /// doSomethingWithWrappedError: + void doSomethingWithWrappedError(PigeonError wrappedError) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_doSomethingWithWrappedError_, + wrappedError.ref.pointer, + ); + } + + /// init + NativeInteropExampleApiSetup init() { + objc.checkOsVersionInternal( + 'NativeInteropExampleApiSetup.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.retainAndReturnPointer(), _sel_init); + return NativeInteropExampleApiSetup.fromPointer($ret, retain: false, release: true); + } +} + +/// NativeInteropExampleNumberWrapper +extension type NativeInteropExampleNumberWrapper._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject, objc.NSCopying { + /// Constructs a [NativeInteropExampleNumberWrapper] that points to the same underlying object as [other]. + NativeInteropExampleNumberWrapper.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NativeInteropExampleNumberWrapper] that wraps the given raw object pointer. + NativeInteropExampleNumberWrapper.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 [NativeInteropExampleNumberWrapper]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NativeInteropExampleNumberWrapper, + ); + + /// alloc + static NativeInteropExampleNumberWrapper alloc() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropExampleNumberWrapper, _sel_alloc); + return NativeInteropExampleNumberWrapper.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NativeInteropExampleNumberWrapper allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NativeInteropExampleNumberWrapper, + _sel_allocWithZone_, + zone, + ); + return NativeInteropExampleNumberWrapper.fromPointer($ret, retain: false, release: true); + } +} + +extension NativeInteropExampleNumberWrapper$Methods on NativeInteropExampleNumberWrapper { + /// 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); + } + + /// initWithNumber:type: + NativeInteropExampleNumberWrapper initWithNumber(objc.NSNumber number, {required int type}) { + final $ret = _objc_msgSend_9slupp( + object$.ref.retainAndReturnPointer(), + _sel_initWithNumber_type_, + number.ref.pointer, + type, + ); + return NativeInteropExampleNumberWrapper.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); + } +} + +/// NativeInteropExamplePigeonInternalNull +extension type NativeInteropExamplePigeonInternalNull._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NativeInteropExamplePigeonInternalNull] that points to the same underlying object as [other]. + NativeInteropExamplePigeonInternalNull.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NativeInteropExamplePigeonInternalNull] that wraps the given raw object pointer. + NativeInteropExamplePigeonInternalNull.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 [NativeInteropExamplePigeonInternalNull]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NativeInteropExamplePigeonInternalNull, + ); + + /// alloc + static NativeInteropExamplePigeonInternalNull alloc() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropExamplePigeonInternalNull, _sel_alloc); + return NativeInteropExamplePigeonInternalNull.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NativeInteropExamplePigeonInternalNull allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NativeInteropExamplePigeonInternalNull, + _sel_allocWithZone_, + zone, + ); + return NativeInteropExamplePigeonInternalNull.fromPointer($ret, retain: false, release: true); + } + + /// new + static NativeInteropExamplePigeonInternalNull new$() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropExamplePigeonInternalNull, _sel_new); + return NativeInteropExamplePigeonInternalNull.fromPointer($ret, retain: false, release: true); + } + + /// Returns a new instance of NativeInteropExamplePigeonInternalNull constructed with the default `new` method. + NativeInteropExamplePigeonInternalNull() : this.as(new$().object$); +} + +extension NativeInteropExamplePigeonInternalNull$Methods on NativeInteropExamplePigeonInternalNull { + /// init + NativeInteropExamplePigeonInternalNull init() { + objc.checkOsVersionInternal( + 'NativeInteropExamplePigeonInternalNull.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.retainAndReturnPointer(), _sel_init); + return NativeInteropExamplePigeonInternalNull.fromPointer($ret, retain: false, release: true); + } +} + +/// NativeInteropExamplePigeonTypedData +extension type NativeInteropExamplePigeonTypedData._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NativeInteropExamplePigeonTypedData] that points to the same underlying object as [other]. + NativeInteropExamplePigeonTypedData.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NativeInteropExamplePigeonTypedData] that wraps the given raw object pointer. + NativeInteropExamplePigeonTypedData.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 [NativeInteropExamplePigeonTypedData]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NativeInteropExamplePigeonTypedData, + ); + + /// alloc + static NativeInteropExamplePigeonTypedData alloc() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropExamplePigeonTypedData, _sel_alloc); + return NativeInteropExamplePigeonTypedData.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NativeInteropExamplePigeonTypedData allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NativeInteropExamplePigeonTypedData, + _sel_allocWithZone_, + zone, + ); + return NativeInteropExamplePigeonTypedData.fromPointer($ret, retain: false, release: true); + } +} + +extension NativeInteropExamplePigeonTypedData$Methods on NativeInteropExamplePigeonTypedData { + /// data + objc.NSData get data { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_data); + return objc.NSData.fromPointer($ret, retain: true, release: true); + } + + /// initWithData:type: + NativeInteropExamplePigeonTypedData initWithData(objc.NSData data, {required int type}) { + final $ret = _objc_msgSend_9slupp( + object$.ref.retainAndReturnPointer(), + _sel_initWithData_type_, + data.ref.pointer, + type, + ); + return NativeInteropExamplePigeonTypedData.fromPointer($ret, retain: false, release: true); + } + + /// type + int get type { + return _objc_msgSend_1hz7y9r(object$.ref.pointer, _sel_type); + } +} + +/// Error class for passing custom error details to Dart side. +extension type PigeonError._(objc.ObjCObject object$) implements objc.ObjCObject, objc.NSObject { + /// Constructs a [PigeonError] that points to the same underlying object as [other]. + PigeonError.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [PigeonError] that wraps the given raw object pointer. + PigeonError.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 [PigeonError]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5(obj.ref.pointer, _sel_isKindOfClass_, _class_PigeonError); + + /// alloc + static PigeonError alloc() { + final $ret = _objc_msgSend_151sglz(_class_PigeonError, _sel_alloc); + return PigeonError.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static PigeonError allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428(_class_PigeonError, _sel_allocWithZone_, zone); + return PigeonError.fromPointer($ret, retain: false, release: true); + } + + /// new + static PigeonError new$() { + final $ret = _objc_msgSend_151sglz(_class_PigeonError, _sel_new); + return PigeonError.fromPointer($ret, retain: false, release: true); + } + + /// Returns a new instance of PigeonError constructed with the default `new` method. + PigeonError() : this.as(new$().object$); +} + +extension PigeonError$Methods on PigeonError { + /// 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 + PigeonError init() { + objc.checkOsVersionInternal( + 'PigeonError.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.retainAndReturnPointer(), _sel_init); + return PigeonError.fromPointer($ret, retain: false, release: true); + } + + /// initWithCode:message:details: + PigeonError 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 PigeonError.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); + } +} + +late final _class_NativeInteropExampleApiSetup = objc.getClass( + "Runner.NativeInteropExampleApiSetup", +); +late final _class_NativeInteropExampleNumberWrapper = objc.getClass( + "Runner.NativeInteropExampleNumberWrapper", +); +late final _class_NativeInteropExamplePigeonInternalNull = objc.getClass( + "Runner.NativeInteropExamplePigeonInternalNull", +); +late final _class_NativeInteropExamplePigeonTypedData = objc.getClass( + "Runner.NativeInteropExamplePigeonTypedData", +); +late final _class_PigeonError = objc.getClass("Runner.PigeonError"); +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_151sglz = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ) + > + >() + .asFunction< + ffi.Pointer Function( + 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_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_1hz7y9r = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, ffi.Pointer) + > + >() + .asFunction, ffi.Pointer)>(); +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_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_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_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, ffi.Pointer)>(); +late final _sel_alloc = objc.registerName("alloc"); +late final _sel_allocWithZone_ = objc.registerName("allocWithZone:"); +late final _sel_code = objc.registerName("code"); +late final _sel_copyWithZone_ = objc.registerName("copyWithZone:"); +late final _sel_data = objc.registerName("data"); +late final _sel_details = objc.registerName("details"); +late final _sel_doSomethingWithWrappedError_ = objc.registerName("doSomethingWithWrappedError:"); +late final _sel_getInstanceWithName_ = objc.registerName("getInstanceWithName:"); +late final _sel_hash = objc.registerName("hash"); +late final _sel_init = objc.registerName("init"); +late final _sel_initWithCode_message_details_ = objc.registerName("initWithCode:message:details:"); +late final _sel_initWithData_type_ = objc.registerName("initWithData:type:"); +late final _sel_initWithNumber_type_ = objc.registerName("initWithNumber:type:"); +late final _sel_isEqual_ = objc.registerName("isEqual:"); +late final _sel_isKindOfClass_ = objc.registerName("isKindOfClass:"); +late final _sel_message = objc.registerName("message"); +late final _sel_new = objc.registerName("new"); +late final _sel_number = objc.registerName("number"); +late final _sel_setCode_ = objc.registerName("setCode:"); +late final _sel_setDetails_ = objc.registerName("setDetails:"); +late final _sel_setMessage_ = objc.registerName("setMessage:"); +late final _sel_setNumber_ = objc.registerName("setNumber:"); +late final _sel_setType_ = objc.registerName("setType:"); +late final _sel_type = objc.registerName("type"); +typedef instancetype = ffi.Pointer; +typedef Dartinstancetype = objc.ObjCObject; diff --git a/packages/pigeon/example/native_interop_app/lib/src/native_interop_example.g.jni.dart b/packages/pigeon/example/native_interop_app/lib/src/native_interop_example.g.jni.dart new file mode 100644 index 000000000000..2b11e7a3df7e --- /dev/null +++ b/packages/pigeon/example/native_interop_app/lib/src/native_interop_example.g.jni.dart @@ -0,0 +1,438 @@ +// AUTO GENERATED BY JNIGEN 0.16.1. 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$_; + +const _$jniVersionCheck = jni$_.JniVersionCheck(1, 0); + +/// from: `dev.flutter.pigeon_example_app.FlutterError` +extension type FlutterError._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'dev/flutter/pigeon_example_app/FlutterError'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = $FlutterError$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 FlutterError(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 FlutterError.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 FlutterError$$Methods on FlutterError { + static final _id_get$code = FlutterError._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$_.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 = FlutterError._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$_.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 = FlutterError._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$_.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 $FlutterError$Type$ extends jni$_.JType { + @jni$_.internal + const $FlutterError$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Ldev/flutter/pigeon_example_app/FlutterError;'; +} + +/// from: `dev.flutter.pigeon_example_app.NativeInteropExampleApi` +extension type NativeInteropExampleApi._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName( + r'dev/flutter/pigeon_example_app/NativeInteropExampleApi', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = $NativeInteropExampleApi$Type$(); +} + +extension NativeInteropExampleApi$$Methods on NativeInteropExampleApi { + static final _id_doSomething = NativeInteropExampleApi._class.instanceMethodId( + r'doSomething', + r'()V', + ); + + static final _doSomething = + 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 doSomething(): kotlin.Unit` + void doSomething() { + _doSomething(reference.pointer, _id_doSomething.pointer).check(); + } +} + +final class $NativeInteropExampleApi$Type$ extends jni$_.JType { + @jni$_.internal + const $NativeInteropExampleApi$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Ldev/flutter/pigeon_example_app/NativeInteropExampleApi;'; +} + +/// from: `dev.flutter.pigeon_example_app.NativeInteropExampleApiRegistrar` +extension type NativeInteropExampleApiRegistrar._(jni$_.JObject _$this) + implements NativeInteropExampleApi { + static final _class = jni$_.JClass.forName( + r'dev/flutter/pigeon_example_app/NativeInteropExampleApiRegistrar', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NativeInteropExampleApiRegistrar$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$_.JMethodIDPtr)>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory NativeInteropExampleApiRegistrar() { + return _new$( + _class.reference.pointer, + _id_new$.pointer, + ).object(); + } +} + +extension NativeInteropExampleApiRegistrar$$Methods on NativeInteropExampleApiRegistrar { + static final _id_get$api = NativeInteropExampleApiRegistrar._class.instanceMethodId( + r'getApi', + r'()Ldev/flutter/pigeon_example_app/NativeInteropExampleApi;', + ); + + static final _get$api = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public final dev.flutter.pigeon_example_app.NativeInteropExampleApi getApi()` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropExampleApi? get api { + return _get$api(reference.pointer, _id_get$api.pointer).object(); + } + + static final _id_set$api = NativeInteropExampleApiRegistrar._class.instanceMethodId( + r'setApi', + r'(Ldev/flutter/pigeon_example_app/NativeInteropExampleApi;)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(dev.flutter.pigeon_example_app.NativeInteropExampleApi nativeInteropExampleApi)` + set api(NativeInteropExampleApi? nativeInteropExampleApi) { + final _$nativeInteropExampleApi = nativeInteropExampleApi?.reference ?? jni$_.jNullReference; + _set$api(reference.pointer, _id_set$api.pointer, _$nativeInteropExampleApi.pointer).check(); + } + + static final _id_register = NativeInteropExampleApiRegistrar._class.instanceMethodId( + r'register', + r'(Ldev/flutter/pigeon_example_app/NativeInteropExampleApi;Ljava/lang/String;)Ldev/flutter/pigeon_example_app/NativeInteropExampleApiRegistrar;', + ); + + 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: dev.flutter.pigeon_example_app.NativeInteropExampleApi, name: kotlin.String): dev.flutter.pigeon_example_app.NativeInteropExampleApiRegistrar` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropExampleApiRegistrar register( + NativeInteropExampleApi nativeInteropExampleApi, + jni$_.JString string, + ) { + final _$nativeInteropExampleApi = nativeInteropExampleApi.reference; + final _$string = string.reference; + return _register( + reference.pointer, + _id_register.pointer, + _$nativeInteropExampleApi.pointer, + _$string.pointer, + ).object(); + } + + static final _id_getInstance = NativeInteropExampleApiRegistrar._class.instanceMethodId( + r'getInstance', + r'(Ljava/lang/String;)Ldev/flutter/pigeon_example_app/NativeInteropExampleApiRegistrar;', + ); + + 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): dev.flutter.pigeon_example_app.NativeInteropExampleApiRegistrar?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropExampleApiRegistrar? getInstance(jni$_.JString string) { + final _$string = string.reference; + return _getInstance( + reference.pointer, + _id_getInstance.pointer, + _$string.pointer, + ).object(); + } + + static final _id_doSomething = NativeInteropExampleApiRegistrar._class.instanceMethodId( + r'doSomething', + r'()V', + ); + + static final _doSomething = + 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 doSomething(): kotlin.Unit` + void doSomething() { + _doSomething(reference.pointer, _id_doSomething.pointer).check(); + } +} + +final class $NativeInteropExampleApiRegistrar$Type$ + extends jni$_.JType { + @jni$_.internal + const $NativeInteropExampleApiRegistrar$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Ldev/flutter/pigeon_example_app/NativeInteropExampleApiRegistrar;'; +} diff --git a/packages/pigeon/example/native_interop_app/macos/.gitignore b/packages/pigeon/example/native_interop_app/macos/.gitignore new file mode 100644 index 000000000000..746adbb6b9e1 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/packages/pigeon/example/native_interop_app/macos/Flutter/Flutter-Debug.xcconfig b/packages/pigeon/example/native_interop_app/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 000000000000..c2efd0b608ba --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/packages/pigeon/example/native_interop_app/macos/Flutter/Flutter-Release.xcconfig b/packages/pigeon/example/native_interop_app/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 000000000000..5caa9d1579e4 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/packages/pigeon/example/native_interop_app/macos/Podfile b/packages/pigeon/example/native_interop_app/macos/Podfile new file mode 100644 index 000000000000..ff5ddb3b8bdc --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Podfile @@ -0,0 +1,42 @@ +platform :osx, '10.15' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_macos_podfile_setup + +target 'Runner' do + use_frameworks! + + flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_macos_build_settings(target) + end +end diff --git a/packages/pigeon/example/native_interop_app/macos/Runner.xcodeproj/project.pbxproj b/packages/pigeon/example/native_interop_app/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 000000000000..c175252ead73 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,569 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 3368472529F02AAC0090029A /* Messages.g.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3368472429F02AAC0090029A /* Messages.g.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 3368472429F02AAC0090029A /* Messages.g.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Messages.g.swift; path = ../../ios/Runner/Messages.g.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* pigeon_example_app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = pigeon_example_app.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 33CC10EE2044A3C60003C045 /* Products */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* pigeon_example_app.app */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 3368472429F02AAC0090029A /* Messages.g.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* pigeon_example_app.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 3368472529F02AAC0090029A /* Messages.g.swift in Sources */, + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/packages/pigeon/example/native_interop_app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/pigeon/example/native_interop_app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000000..18d981003d68 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/pigeon/example/native_interop_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/pigeon/example/native_interop_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 000000000000..56a40bab13cc --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/pigeon/example/native_interop_app/macos/Runner.xcworkspace/contents.xcworkspacedata b/packages/pigeon/example/native_interop_app/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000000..21a3cc14c74e --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/packages/pigeon/example/native_interop_app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/pigeon/example/native_interop_app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 000000000000..18d981003d68 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/AppDelegate.swift b/packages/pigeon/example/native_interop_app/macos/Runner/AppDelegate.swift new file mode 100644 index 000000000000..88aaa2ff58ac --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Runner/AppDelegate.swift @@ -0,0 +1,17 @@ +// 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 Cocoa +import FlutterMacOS + +@main +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } + + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } +} diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000000..a2ec33f19f11 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 000000000000..82b6f9d9a33e Binary files /dev/null and b/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 000000000000..13b35eba55c6 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 000000000000..0a3f5fa40fb3 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 000000000000..bdb57226d5f2 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 000000000000..f083318e09ca Binary files /dev/null and b/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 000000000000..326c0e72c9d8 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 000000000000..2f1632cfddf3 Binary files /dev/null and b/packages/pigeon/example/native_interop_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/Base.lproj/MainMenu.xib b/packages/pigeon/example/native_interop_app/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 000000000000..80e867a4e06b --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/Configs/AppInfo.xcconfig b/packages/pigeon/example/native_interop_app/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 000000000000..3de137c6fc1c --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = pigeon_example_app + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.pigeonExampleApp + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2023 dev.flutter. All rights reserved. diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/Configs/Debug.xcconfig b/packages/pigeon/example/native_interop_app/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 000000000000..36b0fd9464f4 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/Configs/Release.xcconfig b/packages/pigeon/example/native_interop_app/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 000000000000..dff4f49561c8 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/Configs/Warnings.xcconfig b/packages/pigeon/example/native_interop_app/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 000000000000..42bcbf4780b1 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/DebugProfile.entitlements b/packages/pigeon/example/native_interop_app/macos/Runner/DebugProfile.entitlements new file mode 100644 index 000000000000..dddb8a30c851 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/Info.plist b/packages/pigeon/example/native_interop_app/macos/Runner/Info.plist new file mode 100644 index 000000000000..4789daa6a443 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/MainFlutterWindow.swift b/packages/pigeon/example/native_interop_app/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 000000000000..df2443c8ebba --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,19 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/packages/pigeon/example/native_interop_app/macos/Runner/Release.entitlements b/packages/pigeon/example/native_interop_app/macos/Runner/Release.entitlements new file mode 100644 index 000000000000..852fa1a4728a --- /dev/null +++ b/packages/pigeon/example/native_interop_app/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/packages/pigeon/example/native_interop_app/pigeons/copyright.txt b/packages/pigeon/example/native_interop_app/pigeons/copyright.txt new file mode 100644 index 000000000000..07e5f8598a80 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/pigeons/copyright.txt @@ -0,0 +1,3 @@ +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. diff --git a/packages/pigeon/example/native_interop_app/pigeons/native_interop_example.dart b/packages/pigeon/example/native_interop_app/pigeons/native_interop_example.dart new file mode 100644 index 000000000000..8048a0e39fe7 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/pigeons/native_interop_example.dart @@ -0,0 +1,23 @@ +// 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:pigeon/pigeon.dart'; + +// #docregion config +@ConfigurePigeon( + PigeonOptions( + dartOptions: DartOptions(), + kotlinOptions: KotlinOptions( + useJni: true, + // Optional: Paths to search for compiled local classes (primarily needed for standalone Apps) + jniClassPaths: ['build/app/tmp/kotlin-classes/release'], + ), + swiftOptions: SwiftOptions(useFfi: true, ffiModuleName: 'Runner'), + ), +) +// #enddocregion config +@HostApi() +abstract class NativeInteropExampleApi { + void doSomething(); +} diff --git a/packages/pigeon/example/native_interop_app/pubspec.yaml b/packages/pigeon/example/native_interop_app/pubspec.yaml new file mode 100644 index 000000000000..cc6e2e4f9d11 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/pubspec.yaml @@ -0,0 +1,99 @@ +name: pigeon_native_interop_app +description: An example of using Pigeon with Native Interop in an application. +publish_to: 'none' +version: 1.0.0 + +environment: + sdk: ^3.10.0 + +dependencies: + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: 27890daeab690209603a979c7fbb54b22a3c878f + ffigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffigen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + flutter: + sdk: flutter + jni: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jni + ref: 27890daeab690209603a979c7fbb54b22a3c878f + jnigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jnigen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + logging: ^1.3.0 + objective_c: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/objective_c + ref: 27890daeab690209603a979c7fbb54b22a3c878f + pigeon: + path: ../../ + pub_semver: ^2.1.4 + swift2objc: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swift2objc + ref: 27890daeab690209603a979c7fbb54b22a3c878f + swiftgen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swiftgen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + +dev_dependencies: + build_runner: ^2.1.10 + flutter_test: + sdk: flutter + integration_test: + sdk: flutter + +flutter: + uses-material-design: true + +dependency_overrides: + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: 27890daeab690209603a979c7fbb54b22a3c878f + ffigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffigen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + jni: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jni + ref: 27890daeab690209603a979c7fbb54b22a3c878f + jnigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jnigen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + objective_c: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/objective_c + ref: 27890daeab690209603a979c7fbb54b22a3c878f + swift2objc: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swift2objc + ref: 27890daeab690209603a979c7fbb54b22a3c878f + swiftgen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swiftgen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + + diff --git a/packages/pigeon/example/native_interop_app/test_driver/integration_test.dart b/packages/pigeon/example/native_interop_app/test_driver/integration_test.dart new file mode 100644 index 000000000000..fb3dec00bee9 --- /dev/null +++ b/packages/pigeon/example/native_interop_app/test_driver/integration_test.dart @@ -0,0 +1,7 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:integration_test/integration_test_driver.dart'; + +Future main() => integrationDriver(); diff --git a/packages/pigeon/lib/src/ast.dart b/packages/pigeon/lib/src/ast.dart index 8b23bef2e73f..9853bb3fbddc 100644 --- a/packages/pigeon/lib/src/ast.dart +++ b/packages/pigeon/lib/src/ast.dart @@ -493,6 +493,25 @@ class TypeDeclaration { /// Associated [AstProxyApi], if any. final AstProxyApi? associatedProxyApi; + /// Returns the full annotated name of the type. + String getFullName({bool withNullable = true}) { + return '$baseName$typeArgumentsString${isNullable && withNullable ? '?' : ''}'; + } + + /// Returns the Type Arguments in annotation form. + String get typeArgumentsString { + final String typeArgumentString; + if (baseName == 'List') { + typeArgumentString = typeArguments.firstOrNull?.getFullName() ?? 'Object?'; + } else if (baseName == 'Map') { + typeArgumentString = + '${typeArguments.firstOrNull?.getFullName() ?? 'Object?'}, ${typeArguments.lastOrNull?.getFullName() ?? 'Object?'}'; + } else { + return ''; + } + return '<$typeArgumentString>'; + } + @override int get hashCode { // This has to be implemented because TypeDeclaration is used as a Key to a @@ -824,6 +843,8 @@ class Root extends Node { required this.classes, required this.apis, required this.enums, + this.lists = const {}, + this.maps = const {}, this.constants = const [], this.containsHostApi = false, this.containsFlutterApi = false, @@ -833,7 +854,14 @@ 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: [], constants: []); + return Root( + apis: [], + classes: [], + enums: [], + lists: {}, + maps: {}, + constants: [], + ); } // TODO(tarrinneal): Ensure classes are sorted in topological dependency order; see @@ -847,6 +875,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; + /// All of the constants contained in the AST. List constants; @@ -871,6 +905,6 @@ class Root extends Node { @override String toString() { - return '(Root classes:$classes apis:$apis enums:$enums constants:$constants)'; + return '(Root classes:$classes apis:$apis enums:$enums lists:$lists maps:$maps containsHostApi:$containsHostApi containsFlutterApi:$containsFlutterApi containsProxyApi:$containsProxyApi constants:$constants)'; } } diff --git a/packages/pigeon/lib/src/cpp/cpp_generator.dart b/packages/pigeon/lib/src/cpp/cpp_generator.dart index 156643c2aa47..6fdafae9d7f3 100644 --- a/packages/pigeon/lib/src/cpp/cpp_generator.dart +++ b/packages/pigeon/lib/src/cpp/cpp_generator.dart @@ -91,7 +91,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 58355db8a448..b827dd797965 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'; @@ -37,6 +38,12 @@ const String _pigeonMethodChannelCodec = 'pigeonMethodCodec'; const String _overflowClassName = '_PigeonCodecOverflow'; +/// The default library import prefix for generated Dart FFI bridge code. +const String _ffiBridgePrefix = 'ffi_bridge'; + +/// The default library import prefix for generated Dart JNI bridge code. +const String _jniBridgePrefix = 'jni_bridge'; + /// Name of the overrides class for overriding constructors and static members /// of Dart proxy classes. const String proxyApiOverridesClassName = '${proxyApiClassNamePrefix}Overrides'; @@ -48,6 +55,7 @@ class DartOptions { this.copyrightHeader, this.sourceOutPath, this.testOutPath, + this.dartOut, bool ignoreLints = true, }) : _ignoreLints = ignoreLints; @@ -60,6 +68,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; @@ -71,6 +82,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, ); } @@ -82,6 +94,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; @@ -90,10 +103,487 @@ 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())); + } +} + +/// A recursive representation of a Dart [TypeDeclaration] specifically adapted +/// for Native Interop generation (FFI and JNI). +/// +/// This class parses type declarations recursively to capture sub-types (such +/// as elements of a [List] or keys and values of a [Map]), which is essential +/// for mapping nested collection types at the native interop boundary. +/// +/// [T] is the concrete subclass type (e.g., `_FfiType` or `_JniType`), allowing +/// recursive type arguments ([subTypeOne], [subTypeTwo]) to resolve to the same subclass. +abstract class _NativeInteropType> { + /// Creates a native interop type wrapper for [type] with optional nested + /// type arguments ([subTypeOne] for `List` elements or `Map` keys, [subTypeTwo] for `Map` values). + _NativeInteropType({required this.type, this.subTypeOne, this.subTypeTwo}); + + /// The underlying Dart type declaration. + final TypeDeclaration type; + + /// The first component type argument (element type for `List`, key type for `Map`). + final T? subTypeOne; + + /// The second component type argument (value type for `Map`). + final T? subTypeTwo; + + /// Recursively constructs a native interop type wrapper of type [T] from a [type] declaration. + /// + /// Extracts nested type arguments for generic collections (`List` and `Map`) and parses them + /// into [subTypeOne] and [subTypeTwo] using the provided [creator] function. + 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); + } + + /// Constructs a native interop type wrapper of type [T] representing a user-defined [classDefinition]. + 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); + } + + /// Constructs a native interop type wrapper of type [T] representing a user-defined [enumDefinition]. + 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); + } + + /// Returns whether a non-nullable native object wrapper type (such as non-primitive custom classes or collections) + /// requires explicit unwrapping when passed back to Dart. + bool get nonNullableNeedsUnwrapping { + return !isPrimitiveType(type) && type.baseName != 'void'; + } + + /// Returns the Dart return type signature string corresponding to this interop type. + /// + /// If [forceUnwrap] is true, nullability symbols and generic collection annotations are included. + String getDartReturnType(bool forceUnwrap) { + if (forceUnwrap || type.isNullable || nonNullableNeedsUnwrapping) { + return '${type.baseName}$dartCollectionTypeAnnotations${getNullabilitySymbol(type.isNullable)}'; + } + return type.baseName; + } + + /// Returns whether this interop type represents a collection (`List` or `Map`). + bool get isCollection => type.baseName == 'List' || type.baseName == 'Map'; + + /// Returns generic type annotation arguments (e.g., ``) for Dart `List` or `Map` collection types. + String get dartCollectionTypeAnnotations { + if (isCollection) { + return '<$dartCollectionTypes>'; + } + return ''; + } + + /// Returns the inner Dart element or key/value type argument string(s) for `List` or `Map` collections. + 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 ''; + } +} + +/// Represents FFI / Objective-C interop type metadata and code generation helpers. +/// +/// Used when generating Dart FFI bindings for iOS/macOS host interfaces. +class _FfiType extends _NativeInteropType<_FfiType> { + /// Creates an FFI interop type wrapper. + _FfiType({required super.type, super.subTypeOne, super.subTypeTwo}); + + /// Constructs an [_FfiType] from a [type] declaration, recursively parsing collection type arguments. + static _FfiType fromTypeDeclaration(TypeDeclaration? type) { + return _NativeInteropType.fromTypeDeclaration<_FfiType>(type, _FfiType.new); + } + + /// Constructs an [_FfiType] representing a user-defined Pigeon [classDefinition]. + static _FfiType fromClass(Class classDefinition) { + return _NativeInteropType.fromClass<_FfiType>(classDefinition, _FfiType.new); + } + + /// Constructs an [_FfiType] representing a user-defined Pigeon [enumDefinition]. + static _FfiType fromEnum(Enum enumDefinition) { + return _NativeInteropType.fromEnum<_FfiType>(enumDefinition, _FfiType.new); + } + + /// Returns the corresponding Objective-C/FFI class or bridge type name. + /// + /// If [withPrefix] is true (default), types defined in the bridge module include the bridge namespace prefix (`$_ffiBridgePrefix.`). + String getFfiName({bool withPrefix = true}) { + final prefix = withPrefix ? '$_ffiBridgePrefix.' : ''; + return switch (type.baseName) { + 'String' => 'NSString', + 'void' => 'NSVoid', + 'bool' || 'int' || 'double' => 'NSNumber', + 'Uint8List' || + 'Int32List' || + 'Int64List' || + 'Float64List' => '$prefix${_classNamePrefix}PigeonTypedData', + 'Object' => 'NSObject', + 'List' => 'NSMutableArray', + 'Map' => 'NSDictionary', + _ => + type.isClass + ? '$prefix${type.baseName}Bridge' + : type.isEnum + ? 'NSNumber' + : 'There is something wrong, a type is not classified', + }; + } + + /// Returns the method or property name used to extract primitive Dart values from Objective-C wrapper objects + /// (e.g., `toDartString()`, `longValue`, `doubleValue`, `boolValue`). + String get primitiveToDartMethodName => switch (type.baseName) { + 'String' => 'toDartString()', + 'int' => 'longValue', + 'double' => 'doubleValue', + 'bool' => 'boolValue', + _ => '', + }; + + /// Generates a Dart code expression that converts an FFI/Objective-C object representation back to its corresponding Dart value. + 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 || isPrimitiveType(type)) { + 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 && isPrimitiveType(type) + ? varName + : '$varName${type.isNullable ? '?' : (forceNullable ? '!' : '')}.$converter'; + } + + switch (type.baseName) { + case 'String' || 'int' || 'double' || 'bool': + return primitiveGetter(primitiveToDartMethodName, classField); + case 'Object': + asType = ''; + case 'List': + asType = ' as List${getNullabilitySymbol(type.isNullable)}'; + castCall = '${getNullabilitySymbol(type.isNullable)}.cast$dartCollectionTypeAnnotations()'; + case 'Map': + asType = ' as Map${getNullabilitySymbol(type.isNullable)}'; + castCall = '${getNullabilitySymbol(type.isNullable)}.cast$dartCollectionTypeAnnotations()'; + } + return '${wrapConditionally('$codecCall$asType', '(', ')', type.baseName != 'Object' && castCall.isNotEmpty)}$castCall'; + } + + /// Generates a Dart code expression that converts a Dart value into its FFI/Objective-C object representation. + String getToFfiCall( + TypeDeclaration type, + String name, + _FfiType ffiType, { + bool classField = false, + bool forceNonNull = false, + }) { + if (type.isClass) { + return '$name${getNullabilitySymbol(type.isNullable)}.toFfi()'; + } + if (type.isEnum && !type.isNullable) { + return '$_ffiBridgePrefix.${type.baseName}.values[$name]'; + } + if (!type.isNullable && isPrimitiveType(type)) { + return name; + } + return '_PigeonFfiCodec.writeValue<${ffiType.getFfiName()}${getNullabilitySymbol(type.isNullable && type.baseName != 'Object')}>($name${type.baseName == 'Object' ? ', generic: true' : ''})'; + } + + /// Returns the FFI type signature string for native function calls or completion blocks. + String getFfiCallReturnType({ + bool forceNullable = false, + bool forceNonNullable = false, + bool withPrefix = true, + bool asyncBlockMethod = false, + }) { + if (type.baseName == 'List') { + return forceNonNullable ? 'NSArray' : 'NSArray?'; + } + if (type.baseName == 'Object') { + return 'NSObject${getNullabilitySymbol((forceNullable || type.isNullable) && !forceNonNullable)}'; + } + + final String name = getFfiName(withPrefix: withPrefix); + final bool isNullable = (forceNullable || type.isNullable) && !forceNonNullable; + return '$name${getNullabilitySymbol(isNullable)}'; + } + + /// Returns generic type annotation arguments for FFI collection types (e.g., ``). + String get ffiCollectionTypeAnnotations { + if (isCollection) { + return '<$ffiCollectionTypes>'; + } + return ''; + } + + /// Returns the inner FFI element or key/value type arguments for `List` or `Map` collections. + String get ffiCollectionTypes { + if (type.baseName == 'List') { + return subTypeOne?.getFfiCallReturnType() ?? 'NSObject?'; + } else if (type.baseName == 'Map') { + return '${subTypeOne?.getFfiCallReturnType() ?? 'NSObject'}, ${subTypeTwo?.getFfiCallReturnType() ?? 'NSObject?'}'; + } + return ''; } } +/// Represents JNI / Java interop type metadata and code generation helpers. +/// +/// Used when generating Dart JNI bindings for Android host interfaces. +class _JniType extends _NativeInteropType<_JniType> { + /// Creates a JNI interop type wrapper. + _JniType({required super.type, super.subTypeOne, super.subTypeTwo}); + + /// Constructs a [_JniType] from a [type] declaration, recursively parsing collection type arguments. + static _JniType fromTypeDeclaration(TypeDeclaration? type) { + return _NativeInteropType.fromTypeDeclaration<_JniType>(type, _JniType.new); + } + + /// Constructs a [_JniType] representing a user-defined Pigeon [classDefinition]. + static _JniType fromClass(Class classDefinition) { + return _NativeInteropType.fromClass<_JniType>(classDefinition, _JniType.new); + } + + /// Constructs a [_JniType] representing a user-defined Pigeon [enumDefinition]. + static _JniType fromEnum(Enum enumDefinition) { + return _NativeInteropType.fromEnum<_JniType>(enumDefinition, _JniType.new); + } + + /// Returns the base JNI wrapper class name (e.g., `JString`, `JLong`, `JList`, `JMap`, `jni_bridge.MyClass`). + String get jniName => switch (type.baseName) { + 'String' => 'JString', + 'void' => 'JVoid', + 'bool' => 'JBoolean', + 'int' => 'JLong', + 'double' => 'JDouble', + 'Uint8List' => 'JByteArray', + 'Int32List' => 'JIntArray', + 'Int64List' => 'JLongArray', + 'Float64List' => 'JDoubleArray', + 'Object' => 'JObject', + 'List' => 'JList', + 'Map' => 'JMap', + _ => + type.isClass || type.isEnum + ? '$_jniBridgePrefix.${type.baseName}' + : 'There is something wrong, a type is not classified', + }; + + /// Returns the complete JNI type string including generic type annotations for collection types (e.g., `JList`). + String get fullJniName { + if (isCollection) { + return jniName + jniCollectionTypeAnnotations; + } + return jniName; + } + + /// Returns the method name on JNI primitive wrapper objects used to convert them to Dart primitives (e.g., `toDartString`, `toDartInt`). + String get primitiveToDartMethodName => switch (type.baseName) { + 'String' => 'toDartString', + 'int' => 'toDartInt', + 'double' => 'toDartDouble', + 'bool' => 'toDartBool', + _ => '', + }; + + /// Generates a Dart code expression that converts a JNI object representation back to its corresponding Dart value. + 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${getNullabilitySymbol(type.isNullable)}.$converter${'(releaseOriginal: true)'}' + : varName; + } + + switch (type.baseName) { + case 'String' || 'int' || 'double' || 'bool': + return primitiveGetter( + primitiveToDartMethodName, + type.baseName == 'String' || type.isNullable || forceConversion, + ); + case 'Object': + asType = ''; + case 'List': + asType = ' as List${getNullabilitySymbol(type.isNullable)}'; + castCall = '${getNullabilitySymbol(type.isNullable)}.cast$dartCollectionTypeAnnotations()'; + case 'Map': + asType = ' as Map${getNullabilitySymbol(type.isNullable)}'; + castCall = '${getNullabilitySymbol(type.isNullable)}.cast$dartCollectionTypeAnnotations()'; + } + return '${wrapConditionally('$codecCall$asType', '(', ')', type.baseName != 'Object' && castCall.isNotEmpty)}$castCall'; + } + + /// Generates a Dart code expression that converts a Dart value into its JNI object representation. + String getToJniCall( + TypeDeclaration type, + String name, + _JniType jniType, { + bool forceNonNull = false, + }) { + if (type.isClass || type.isEnum) { + return '$name${getNullabilitySymbol(type.isNullable)}.toJni()'; + } else if (!type.isNullable && isPrimitiveType(type)) { + return name; + } + return '_PigeonJniCodec.writeValue<${getJniCallReturnType(true)}>($name)'; + } + + /// Returns the JNI type signature string for method return types or parameter signatures. + String getJniCallReturnType( + bool forceUnwrap, { + bool isParameter = false, + bool isAsynchronous = false, + }) { + if (forceUnwrap || type.isNullable || nonNullableNeedsUnwrapping) { + return '$jniName${getJniCollectionTypeAnnotations(isParameter: isParameter, isAsynchronous: isAsynchronous)}${getNullabilitySymbol(type.isNullable)}'; + } + return type.baseName; + } + + /// Returns generic type annotation arguments for JNI collection types, accounting for parameter signature and asynchronous context rules. + String getJniCollectionTypeAnnotations({bool isParameter = false, bool isAsynchronous = false}) { + if (isCollection) { + return '<${getJniCollectionTypes(isParameter: isParameter, isAsynchronous: isAsynchronous)}>'; + } + return ''; + } + + /// Returns generic type annotation arguments for JNI collection types with default options. + String get jniCollectionTypeAnnotations => getJniCollectionTypeAnnotations(); + + /// Returns comma-separated JNI component types for `JList` or `JMap` collections, accounting for parameter signature and asynchronous context rules. + 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 ''; + } + + /// Returns comma-separated JNI component types for `JList` or `Map` collections with default options. + String get jniCollectionTypes => getJniCollectionTypes(); +} + +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. @@ -101,6 +591,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; @@ -110,6 +605,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, @@ -118,16 +618,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. @@ -145,6 +663,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: '// '); } @@ -173,17 +693,49 @@ 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;"); } - indent.writeln("import 'dart:typed_data' show Float64List, Int32List, Int64List;"); + + final typedDataClasses = [ + if (usesNativeInterop(generatorOptions)) 'Float32List', + 'Float64List', + 'Int32List', + 'Int64List', + if (generatorOptions.useJni) 'Int8List', + if (usesNativeInterop(generatorOptions)) 'TypedData', + ]; + indent.writeln("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) { indent.writeln("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 $_ffiBridgePrefix;", + ); + } + if (generatorOptions.useJni) { + final String jniFileImportName = path.basename(generatorOptions.dartOut!); + indent.writeln( + "import './${path.withoutExtension(jniFileImportName)}.jni.dart' as $_jniBridgePrefix;", + ); + } } @override @@ -255,11 +807,47 @@ class DartGenerator extends StructuredGenerator { }) { indent.newln(); addDocumentationComments(indent, 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.getFfiName()} 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];', + ); + }); } }); } @@ -338,16 +926,6 @@ class DartGenerator extends StructuredGenerator { }); } - void _writeToList(Indent indent, Class classDefinition) { - indent.writeScoped('List _toList() {', '}', () { - indent.writeScoped('return [', '];', () { - for (final NamedType field in getFieldsInSerializationOrder(classDefinition)) { - indent.writeln('${field.name},'); - } - }); - }); - } - @override void writeClassEncode( InternalDartOptions generatorOptions, @@ -356,12 +934,98 @@ class DartGenerator extends StructuredGenerator { 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 [', '];', () { + for (final NamedType field in getFieldsInSerializationOrder(classDefinition)) { + indent.writeln('${field.name},'); + } + }); + }); + } + + void _writeToJni(Indent indent, Class classDefinition) { + indent.writeScoped('$_jniBridgePrefix.${classDefinition.name} toJni() {', '}', () { + indent.writeScoped('return $_jniBridgePrefix.${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)},'); + } + }); + }); + } + + void _writeToFfi(Indent indent, Class classDefinition) { + final _FfiType ffiClass = _FfiType.fromClass(classDefinition); + indent.writeScoped('${ffiClass.getFfiName()} toFfi() {', '}', () { + final Iterable fields = getFieldsInSerializationOrder(classDefinition); + indent.writeScoped( + 'return ${ffiClass.getFfiName()}.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 ? '${getNullabilitySymbol(ffiType.type.isNullable)}.index' : ''}', ffiType, 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.getFfiName()}? 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, @@ -370,8 +1034,16 @@ class DartGenerator extends StructuredGenerator { Class classDefinition, { required String dartPackageName, }) { - indent.write('static ${classDefinition.name} decode(Object result) '); - indent.addScoped('{', '}', () { + 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('(', ');', () { @@ -547,6 +1219,234 @@ class DartGenerator extends StructuredGenerator { } } + void _writeNativeInteropFlutterApi( + InternalDartOptions generatorOptions, + Root root, + Indent indent, + AstFlutterApi api, { + required String dartPackageName, + }) { + final mixin = generatorOptions.useJni ? ' with $_jniBridgePrefix.\$${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 $_jniBridgePrefix.${api.name} impl = $_jniBridgePrefix.${api.name}.implement(this);', + ); + indent.writeln('$_jniBridgePrefix.${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( + '$_ffiBridgePrefix.${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( + '$_ffiBridgePrefix.${_getFfiBlockCallExtensionName(method.returnType)}(completionHandler).call();', + ); + } else { + final _FfiType ffiReturnType = _FfiType.fromTypeDeclaration( + method.returnType, + ); + String toFfiCall; + if (!method.returnType.isNullable && + (isPrimitiveType(method.returnType) || method.returnType.isEnum)) { + toFfiCall = + '_PigeonFfiCodec.writeValue<${ffiReturnType.getFfiName()}>(response)'; + } else { + toFfiCall = ffiReturnType.getToFfiCall( + method.returnType, + 'response', + ffiReturnType, + ); + } + indent.writeln( + '$_ffiBridgePrefix.${_getFfiBlockCallExtensionName(method.returnType)}(completionHandler).call($toFfiCall);', + ); + } + }); + indent.writeScoped('onError: (Object e) {', '});', () { + indent.writeln('_reportFfiError(errorOut, e);'); + if (method.returnType.isVoid) { + indent.writeln( + '$_ffiBridgePrefix.${_getFfiBlockCallExtensionName(method.returnType)}(completionHandler).call();', + ); + } else { + indent.writeln( + '$_ffiBridgePrefix.${_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 && + (isPrimitiveType(method.returnType) || method.returnType.isEnum)) { + toFfiCall = + '_PigeonFfiCodec.writeValue<${ffiReturnType.getFfiName()}>(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( + '$_ffiBridgePrefix.${_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( + '$_ffiBridgePrefix.${_getFfiBlockCallExtensionName(method.returnType)}(completionHandler).call(${method.returnType.isVoid ? '' : 'null'});', + ); + } + indent.writeln( + 'return${(method.isAsynchronous || method.returnType.isVoid) ? '' : ' null'};', + ); + }); + }, + ); + } + indent.writeln( + 'builder.addProtocol($_ffiBridgePrefix.${api.name}Bridge\$Builder.\$protocol);', + ); + indent.writeln( + 'final $_ffiBridgePrefix.${api.name}Bridge impl = $_ffiBridgePrefix.${api.name}Bridge.as(builder.build());', + ); + indent.writeln('$_ffiBridgePrefix.${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 && isPrimitiveType(method.returnType)) { + 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 @@ -570,6 +1470,15 @@ class DartGenerator extends StructuredGenerator { }) { indent.newln(); addDocumentationComments(indent, api.documentationComments, docCommentSpec); + if (usesNativeInterop(generatorOptions)) { + _writeNativeInteropFlutterApi( + generatorOptions, + root, + indent, + api, + dartPackageName: dartPackageName, + ); + } indent.write('abstract class ${api.name} '); indent.addScoped('{', '}', () { @@ -593,10 +1502,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' : '';", ); @@ -616,9 +1546,351 @@ 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 = '$defaultNativeInteropInstanceName';"); + } + 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 = '$_jniBridgePrefix.${api.name}Registrar'; + final ffiApiRegistrarName = '$_ffiBridgePrefix.${api.name}Setup'; + indent.newln(); + indent.writeScoped('class $dartApiName {', '}', () { + final List constructorParams = []; + final List constructorInitializers = []; + final List fields = []; + if (generatorOptions.useJni) { + constructorParams.add('$jniApiRegistrarName? jniApi'); + constructorInitializers.add('_jniApi = jniApi'); + fields.add('late final $jniApiRegistrarName? _jniApi;'); + } + if (generatorOptions.useFfi) { + constructorParams.add('$ffiApiRegistrarName? ffiApi'); + constructorInitializers.add('_ffiApi = ffiApi'); + fields.add('late final $ffiApiRegistrarName? _ffiApi;'); + } + + final constructorSignature = constructorParams.isEmpty + ? '' + : '{${constructorParams.join(', ')}}'; + final constructorInitializerList = constructorInitializers.isEmpty + ? '' + : ' : ${constructorInitializers.join(', ')}'; + indent.writeln( + '$dartApiName._withRegistrar($constructorSignature)$constructorInitializerList;', + ); + + indent.newln(); + + indent.writeln( + '/// Returns instance of $dartApiName with specified [channelName] if one has been registered.', + ); + indent.writeScoped( + 'static $dartApiName? getInstance({String channelName = defaultInstanceName}) {', + '}', + () { + indent.writeln('final $dartApiName res;'); + var isFirst = true; + if (generatorOptions.useJni) { + indent.writeScoped('if (Platform.isAndroid) {', '}', () { + indent.writeln('final $jniApiRegistrarName? link ='); + indent.writeln(' $jniApiRegistrarName().getInstance(channelName.toJString());'); + indent.writeScoped('if (link == null) {', '}', () { + indent.writeln('_throwNoInstanceError(channelName);'); + }); + indent.writeln('res = $dartApiName._withRegistrar(jniApi: link);'); + }, addTrailingNewline: false); + isFirst = false; + } + if (generatorOptions.useFfi) { + final elseStr = isFirst ? '' : ' else'; + indent.addScoped('$elseStr if (Platform.isIOS || Platform.isMacOS) {', '}', () { + indent.writeln('final $ffiApiRegistrarName? link ='); + indent.writeln( + ' $ffiApiRegistrarName.getInstanceWithName(NSString(channelName));', + ); + indent.writeScoped('if (link == null) {', '}', () { + indent.writeln('_throwNoInstanceError(channelName);'); + }); + indent.writeln('res = $dartApiName._withRegistrar(ffiApi: link);'); + }, addTrailingNewline: false); + isFirst = false; + } + if (!isFirst) { + indent.addScoped(' else {', '}', () { + indent.writeln( + "throw UnsupportedError('Native Interop is not supported on this platform. Use ${api.name} instead.');", + ); + }); + } else { + indent.writeln( + "throw UnsupportedError('Native Interop is not supported on this platform. Use ${api.name} instead.');", + ); + } + indent.writeln('return res;'); + }, + ); + indent.newln(); + + fields.forEach(indent.writeln); + + indent.newln(); + + 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 ' : ''}{', + '}', + () { + void writeBody() { + var isFirstBranch = true; + if (generatorOptions.useJni) { + 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); + isFirstBranch = false; + } + if (generatorOptions.useFfi) { + final elseStr = isFirstBranch ? '' : ' else'; + indent.addScoped('$elseStr 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 = $_ffiBridgePrefix.${generatorOptions.ffiErrorClassName}();', + ); + final forceRes = + !returnType.type.isNullable && + (isPrimitiveType(returnType.type) || returnType.type.baseName == 'String') + ? '!' + : ''; + 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: $_ffiBridgePrefix.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 ${generatorOptions.useJni ? '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); + isFirstBranch = false; + } + indent.addScoped(' else {', '}', () { + indent.writeln("throw Exception('No JNI or FFI api available');"); + }); + } + + if (generatorOptions.useJni) { + indent.writeScoped('try {', '}', writeBody, addTrailingNewline: false); + indent.addScoped(' on JThrowable catch (e) {', '}', () { + indent.writeln('throw _wrapJniException(e);'); + }); + } else { + writeBody(); + } + }, + ); + 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('$_ffiBridgePrefix.${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($_ffiBridgePrefix.${generatorOptions.ffiErrorClassName} error) { + if (error.code != null) { + throw _wrapFfiError(error); + } + } + + PlatformException _wrapFfiError($_ffiBridgePrefix.${generatorOptions.ffiErrorClassName} error) => + PlatformException( + code: error.code!.toDartString(), + message: error.message?.toDartString(), + details: NSString.isA(error.details) + ? error.details!.toDartString() + : error.details, + ); + + void _reportFfiError($_ffiBridgePrefix.${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<$_jniBridgePrefix.${generatorOptions.jniErrorClassName}>($_jniBridgePrefix.${generatorOptions.jniErrorClassName}.type)) { + final $_jniBridgePrefix.${generatorOptions.jniErrorClassName} pigeonError = e.as($_jniBridgePrefix.${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 @@ -646,8 +1918,16 @@ 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('{', '}', () { @@ -655,24 +1935,74 @@ class DartGenerator extends StructuredGenerator { /// 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)) { + final List platforms = []; + if (generatorOptions.useJni) { + platforms.add('Platform.isAndroid'); + } + if (generatorOptions.useFfi) { + platforms.add('Platform.isIOS'); + platforms.add('Platform.isMacOS'); + } + final String platformsCondition = platforms.join(' || '); + 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 ($platformsCondition) { + if (messageChannelSuffix.isEmpty) { + nativeInteropApi = ${api.name}ForNativeInterop.getInstance(); + } else { + nativeInteropApiInstanceName = messageChannelSuffix; + nativeInteropApi = ${api.name}ForNativeInterop.getInstance( + channelName: messageChannelSuffix); + } + } else { + throw UnsupportedError( + 'Native Interop is not supported on this platform. Use the default constructor of ${api.name} instead.'); + } + 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, @@ -681,6 +2011,8 @@ final BinaryMessenger? ${varNamePrefix}binaryMessenger; documentationComments: func.documentationComments, channelName: makeChannelName(api, func, dartPackageName), addSuffixVariable: true, + useJni: generatorOptions.useJni, + useFfi: generatorOptions.useFfi, ); } }); @@ -1117,6 +2449,467 @@ 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($_ffiBridgePrefix.${_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( + ''' + $_ffiBridgePrefix.${_classNamePrefix}NumberWrapper _convertToFfiNumberWrapper(Object value) { + switch (value) { + case int _: + return $_ffiBridgePrefix.${_classNamePrefix}NumberWrapper.alloc().initWithNumber(NSNumber.alloc().initWithLong(value), type: 1); + case double _: + return $_ffiBridgePrefix.${_classNamePrefix}NumberWrapper.alloc().initWithNumber(NSNumber.alloc().initWithDouble(value), type: 2); + case bool _: + return $_ffiBridgePrefix.${_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 $_ffiBridgePrefix.${_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 || $_ffiBridgePrefix.${_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 ($_ffiBridgePrefix.${_classNamePrefix}PigeonTypedData.isA(value)) { + return _getValueFromPigeonTypedData(value as $_ffiBridgePrefix.${_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 ($_ffiBridgePrefix.${_classNamePrefix}NumberWrapper.isA(value)) { + return _convertNumberWrapperToDart($_ffiBridgePrefix.${_classNamePrefix}NumberWrapper.as(value)); + ${root.classes.map((Class dataClass) { + final _FfiType ffiType = _FfiType.fromClass(dataClass); + return ''' + } else if (${ffiType.getFfiName()}.isA(value)) { + return ${ffiType.type.baseName}.fromFfi(${ffiType.getFfiName()}.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 $_ffiBridgePrefix.${_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.getFfiName()}>(T)) { + final NSMutableArray res = NSMutableArray(); + for (final ${ffiType.dartCollectionTypes} entry in value) { + res.addObject(${ffiType.subTypeOne!.type.isNullable ? 'entry == null ? $_ffiBridgePrefix.${_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 + ? $_ffiBridgePrefix.${_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.getFfiName()}>(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); + } + } +} + +$_ffiBridgePrefix.${_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 $_ffiBridgePrefix.${_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 $_ffiBridgePrefix.${_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 $_ffiBridgePrefix.${_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 $_ffiBridgePrefix.${_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 $_ffiBridgePrefix.${_classNamePrefix}PigeonTypedData.alloc().initWithData(nsData, type: 4); + } + throw ArgumentError.value(value); +} + + +Object? _getValueFromPigeonTypedData($_ffiBridgePrefix.${_classNamePrefix}PigeonTypedData value) { + final NSData data = value.data; + final Pointer bytes = data.bytes; + return switch (value.type) { + 0 => Uint8List.fromList(bytes.cast().asTypedList(data.length)), + 1 => Int32List.fromList( + bytes.cast().asTypedList(data.length ~/ 4), + ), + 2 => Int64List.fromList( + bytes.cast().asTypedList(data.length ~/ 8), + ), + 3 => Float32List.fromList( + bytes.cast().asTypedList(data.length ~/ 4), + ), + 4 => Float64List.fromList( + bytes.cast().asTypedList(data.length ~/ 8), + ), + _ => throw ArgumentError.value(value), + }; +} + '''); } /// Writes the `wrapResponse` method. @@ -1302,11 +3095,24 @@ 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); indent.write('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, @@ -1326,14 +3132,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("$constOrFinal ${varNamePrefix}channelName = '$channelName$channelSuffix';"); @@ -1537,16 +3338,69 @@ 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, +}) { + if (parameters.isEmpty) { + return ''; + } + final comma = addTrailingComma || parameters.length > 1 ? ',' : ''; + return parameters.map((Parameter parameter) { + final _JniType jniType = _JniType.fromTypeDeclaration(parameter.type); + final String type = jniType.getJniCallReturnType( + false, + isParameter: true, + isAsynchronous: isAsynchronous, + ); + return '$type ${parameter.name}$comma'; + }).join(); +} + +String _getFfiMethodParameterSignature( + Iterable parameters, { + bool addTrailingComma = false, + bool isAsynchronous = false, +}) { + if (parameters.isEmpty) { + return ''; + } + final comma = addTrailingComma || parameters.length > 1 ? ',' : ''; + return parameters.map((Parameter parameter) { + final _FfiType ffiType = _FfiType.fromTypeDeclaration(parameter.type); + final String type = ffiType.getFfiCallReturnType(); + return '$type ${parameter.name}$comma'; + }).join(); +} + /// 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) @@ -1609,7 +3463,7 @@ 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' => @@ -1618,7 +3472,12 @@ String addGenericTypes(TypeDeclaration type) { typeArguments.isEmpty ? 'Map' : 'Map<${_flattenTypeArguments(typeArguments)}>', - _ => type.baseName, + _ => + useJni + ? _JniType.fromTypeDeclaration(type).jniName + : useFfi + ? _FfiType.fromTypeDeclaration(type).getFfiName() + : type.baseName, }; return type.isNullable ? '$genericType?' : genericType; } @@ -1628,3 +3487,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 f263bda3f57f..acae99f2267b 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, StringSink sink, {required String dartPackageName}); } diff --git a/packages/pigeon/lib/src/generator_tools.dart b/packages/pigeon/lib/src/generator_tools.dart index 0438945a8edc..7184906f7f6f 100644 --- a/packages/pigeon/lib/src/generator_tools.dart +++ b/packages/pigeon/lib/src/generator_tools.dart @@ -20,6 +20,10 @@ const String pigeonVersion = '27.3.0'; /// Default plugin package name. const String defaultPluginPackageName = 'dev.flutter.pigeon'; +/// The default instance name string for native interop generated APIs. +const String defaultNativeInteropInstanceName = + 'PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u'; + /// Read all the content from [stdin] to a String. String readStdin() { final bytes = []; @@ -404,14 +408,14 @@ 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 base, Map modification) { +Map mergePigeonMaps(Map base, Map modification) { final result = {}; for (final MapEntry entry in modification.entries) { if (base.containsKey(entry.key)) { final Object entryValue = entry.value; if (entryValue is Map) { assert(base[entry.key] is Map); - result[entry.key] = mergeMaps((base[entry.key] as Map?)!, entryValue); + result[entry.key] = mergePigeonMaps((base[entry.key] as Map?)!, entryValue); } else { result[entry.key] = entry.value; } @@ -549,25 +553,26 @@ Map> getReferencedTypes(List apis, List c 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; } @@ -734,7 +739,7 @@ Iterable getFieldsInSerializationOrder(Class classDefinition) { /// Crawls up the path of [dartFilePath] until it finds a pubspec.yaml in a /// parent directory and returns its path. -String? _findPubspecPath(String dartFilePath) { +String? findPubspecPath(String dartFilePath) { try { Directory dir = File(dartFilePath).parent; String? pubspecPath; @@ -746,12 +751,12 @@ String? _findPubspecPath(String dartFilePath) { .where((String path) => path.endsWith('pubspec.yaml')); if (pubspecPaths.isNotEmpty) { pubspecPath = pubspecPaths.first; - } else { - dir = dir.parent; } - } else { + } + if (dir.path == dir.parent.path) { break; } + dir = dir.parent; } return pubspecPath; } catch (ex) { @@ -762,7 +767,7 @@ String? _findPubspecPath(String dartFilePath) { /// Given the path of a Dart file, [mainDartFile], the name of the package will /// be deduced by locating and parsing its associated pubspec.yaml. String? deducePackageName(String mainDartFile) { - final String? pubspecPath = _findPubspecPath(mainDartFile); + final String? pubspecPath = findPubspecPath(mainDartFile); if (pubspecPath == null) { return null; } @@ -872,6 +877,60 @@ bool isCollectionType(TypeDeclaration type) { (type.baseName.contains('List') || type.baseName == 'Map'); } +/// Whether the type is a primitive scalar type (bool, int, or double). +bool isPrimitiveType(TypeDeclaration type) { + return type.baseName == 'bool' || type.baseName == 'int' || type.baseName == 'double'; +} + +/// 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; +} + +/// Returns '?' if [nullable] is true, otherwise empty string. +String getNullabilitySymbol(bool nullable) => nullable ? '?' : ''; + +/// Returns '!' if [force] is true, otherwise empty string. +String getForceNonNullSymbol(bool force) => force ? '!' : ''; + +/// Compares [TypeDeclaration]s by how generic they are. +/// +/// Generic-ness is approximated by counting the number of "Objects" and "?" in the +/// type name, with "Object" being strongly weighted and "?" less so. +int compareTypeDeclarationGenericness(TypeDeclaration a, TypeDeclaration b) { + return _calculateGenericScore(a, 0).compareTo(_calculateGenericScore(b, 0)); +} + +int _calculateGenericScore(TypeDeclaration type, int depth) { + var score = 0; + + if (type.baseName == 'Object') { + score += 10000 >> depth; + } + if (type.isNullable) { + score += 1000 >> depth; + } + + // Handle untyped collections by scoring their implicit 'Object?' arguments + if (type.typeArguments.isEmpty) { + if (type.baseName == 'List') { + score += 11000 >> (depth + 1); + } + if (type.baseName == 'Map') { + score += 22000 >> (depth + 1); + } + } + + for (final TypeDeclaration arg in type.typeArguments) { + score += _calculateGenericScore(arg, depth + 1); + } + return score; +} + +/// Alias for [compareTypeDeclarationGenericness] to maintain compatibility. +const int Function(TypeDeclaration, TypeDeclaration) sortByObjectCount = + compareTypeDeclarationGenericness; + /// Escapes special characters in a string for use in double-quoted string literals. String escapeStringDoubleQuotes(String value) { return value diff --git a/packages/pigeon/lib/src/gobject/gobject_generator.dart b/packages/pigeon/lib/src/gobject/gobject_generator.dart index cf643c2b9295..f32dc0d1ab42 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())); } } @@ -2462,10 +2462,7 @@ bool _isNullablePrimitiveType(TypeDeclaration type) { return false; } - return type.isEnum || - type.baseName == 'bool' || - type.baseName == 'int' || - type.baseName == 'double'; + return type.isEnum || isPrimitiveType(type); } // Whether [type] is a type that needs to stay an FlValue* since it can't be diff --git a/packages/pigeon/lib/src/java/java_generator.dart b/packages/pigeon/lib/src/java/java_generator.dart index b72e1a5f1c1c..5233a2eeb146 100644 --- a/packages/pigeon/lib/src/java/java_generator.dart +++ b/packages/pigeon/lib/src/java/java_generator.dart @@ -82,7 +82,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..e6de7081a201 --- /dev/null +++ b/packages/pigeon/lib/src/kotlin/jnigen_config_generator.dart @@ -0,0 +1,116 @@ +// 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('// ${getGeneratedCodeWarning()}'); + indent.writeln('// $seeAlsoWarning'); + indent.writeln('// ignore_for_file: depend_on_referenced_packages'); + indent.newln(); + indent.writeln("import 'dart:io';"); + indent.writeln("import 'package:jnigen/jnigen.dart';"); + indent.writeln("import 'package:logging/logging.dart';"); + + final String fullDartOut = generatorOptions.basePath != null + ? path.posix.join(generatorOptions.basePath!, generatorOptions.dartOptions.dartOut ?? '') + : (generatorOptions.dartOptions.dartOut ?? './lib/src/'); + + final List jniClassPaths = + generatorOptions.kotlinOptions.jniClassPaths ?? + ['build/app/tmp/kotlin-classes/release']; + final String classPathContent = jniClassPaths + .map((String path) { + if (path.endsWith('.jar')) { + return "Uri.file('$path')"; + } + return "Uri.directory('$path')"; + }) + .join(', '); + + indent.writeln(''); + indent.writeScoped('void main() async {', '}', () { + indent.writeln(" Directory.current = Platform.script.resolve('.').toFilePath();"); + 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(fullDartOut), from: generatorOptions.appDirectory ?? './')}.jni.dart'), + structure: OutputStructure.singleFile, + ), + ), + logLevel: Level.ALL, + classPath: [$classPathContent], +'''); + indent.writeScoped('classes: [', '],', () { + final packagePrefix = generatorOptions.kotlinOptions.package != null + ? '${generatorOptions.kotlinOptions.package}.' + : ''; + indent.writeln( + "'$packagePrefix${generatorOptions.kotlinOptions.errorClassName ?? 'FlutterError'}',", + ); + for (final Api api in root.apis) { + if (api is AstHostApi || api is AstFlutterApi) { + indent.writeln("'$packagePrefix${api.name}',"); + indent.writeln("'$packagePrefix${api.name}Registrar',"); + } + } + for (final Class dataClass in root.classes) { + indent.writeln("'$packagePrefix${dataClass.name}',"); + } + for (final Enum enumType in root.enums) { + indent.writeln("'$packagePrefix${enumType.name}',"); + } + }); + }); + }); + indent.newln(); + }); + 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 646a5cc6481a..6a91f9291b53 100644 --- a/packages/pigeon/lib/src/kotlin/kotlin_generator.dart +++ b/packages/pigeon/lib/src/kotlin/kotlin_generator.dart @@ -43,10 +43,13 @@ class KotlinOptions { const KotlinOptions({ this.package, this.copyrightHeader, + this.useJni = false, + this.appDirectory, this.errorClassName, this.includeErrorClass = true, this.fileSpecificClassNameComponent, this.useGeneratedAnnotation = false, + this.jniClassPaths, }); /// The package where the generated class will live. @@ -55,6 +58,14 @@ 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. + /// + /// Defaults to './' if not specified. + final String? appDirectory; + /// The name of the error class used for passing custom error parameters. final String? errorClassName; @@ -72,16 +83,23 @@ class KotlinOptions { /// default. final bool useGeneratedAnnotation; + /// Paths to directories or JAR files containing compiled Kotlin/Java classes. + /// Used for JNIgen to locate class definitions during summarization. + final List? jniClassPaths; + /// Creates a [KotlinOptions] from a Map representation where: /// `x = KotlinOptions.fromMap(x.toMap())`. 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, fileSpecificClassNameComponent: map['fileSpecificClassNameComponent'] as String?, useGeneratedAnnotation: map['useGeneratedAnnotation'] as bool? ?? false, + jniClassPaths: (map['jniClassPaths'] as List?)?.cast(), ); } @@ -90,12 +108,15 @@ 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, if (fileSpecificClassNameComponent != null) 'fileSpecificClassNameComponent': fileSpecificClassNameComponent!, 'useGeneratedAnnotation': useGeneratedAnnotation, + if (jniClassPaths != null) 'jniClassPaths': jniClassPaths!, }; return result; } @@ -103,11 +124,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({ @@ -116,8 +137,11 @@ class InternalKotlinOptions extends InternalOptions { this.copyrightHeader, this.errorClassName, this.includeErrorClass = true, + this.useJni = false, + this.appDirectory, this.fileSpecificClassNameComponent, this.useGeneratedAnnotation = false, + this.jniClassPaths, }); /// Creates InternalKotlinOptions from KotlinOptions. @@ -125,13 +149,19 @@ 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, + jniClassPaths = options.jniClassPaths, fileSpecificClassNameComponent = - options.fileSpecificClassNameComponent ?? + (options.useJni + ? fileSpecificClassNameComponent ?? options.fileSpecificClassNameComponent + : options.fileSpecificClassNameComponent ?? fileSpecificClassNameComponent) ?? kotlinOut.split('/').lastOrNull?.split('.').first; /// The package where the generated class will live. @@ -152,6 +182,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; @@ -159,6 +195,9 @@ class InternalKotlinOptions extends InternalOptions { /// is false by default since that dependency isn't available in plugins by /// default. final bool useGeneratedAnnotation; + + /// Paths to directories or JAR files containing compiled Kotlin/Java classes. + final List? jniClassPaths; } /// Options that control how Kotlin code will be generated for a specific @@ -226,14 +265,19 @@ class KotlinGenerator extends StructuredGenerator { } indent.newln(); indent.writeln('import android.util.Log'); - indent.writeln('import io.flutter.plugin.common.BasicMessageChannel'); - indent.writeln('import io.flutter.plugin.common.BinaryMessenger'); - indent.writeln('import io.flutter.plugin.common.EventChannel'); - indent.writeln('import io.flutter.plugin.common.MessageCodec'); - indent.writeln('import io.flutter.plugin.common.StandardMethodCodec'); - indent.writeln('import io.flutter.plugin.common.StandardMessageCodec'); - indent.writeln('import java.io.ByteArrayOutputStream'); - indent.writeln('import java.nio.ByteBuffer'); + if (generatorOptions.useJni) { + indent.writeln('import androidx.annotation.Keep'); + } + if (!generatorOptions.useJni || root.containsEventChannel || root.containsProxyApi) { + indent.writeln('import io.flutter.plugin.common.BasicMessageChannel'); + indent.writeln('import io.flutter.plugin.common.BinaryMessenger'); + indent.writeln('import io.flutter.plugin.common.EventChannel'); + indent.writeln('import io.flutter.plugin.common.MessageCodec'); + indent.writeln('import io.flutter.plugin.common.StandardMethodCodec'); + indent.writeln('import io.flutter.plugin.common.StandardMessageCodec'); + indent.writeln('import java.io.ByteArrayOutputStream'); + indent.writeln('import java.nio.ByteBuffer'); + } if (generatorOptions.useGeneratedAnnotation) { indent.writeln('import javax.annotation.Generated'); } @@ -534,6 +578,15 @@ class KotlinGenerator extends StructuredGenerator { Indent indent, { required String dartPackageName, }) { + if (generatorOptions.useJni && + !root.containsEventChannel && + !root.containsFlutterApi && + !root.containsProxyApi) { + return; + } + if (generatorOptions.useJni && !root.containsEventChannel && !root.containsProxyApi) { + return; + } final List enumeratedTypes = getEnumeratedTypes( root, excludeSealedClasses: true, @@ -703,6 +756,50 @@ if (wrapped == null) { }); } + void _writeJniFlutterApi( + InternalKotlinOptions generatorOptions, + Root root, + Indent indent, + AstFlutterApi api, { + required String dartPackageName, + }) { + indent.format(''' +/// Map that stores instances +val registered${api.name}: MutableMap = mutableMapOf() + +/// Class that stores instances +class ${api.name}Registrar() { + + /// Registers an instance with the given name. + fun registerInstance(api: ${api.name}?, name: String = defaultInstanceName) { + if (api != null) { + registered${api.name}[name] = api + } else { + registered${api.name}.remove(name) + } + } + + /// Gets an instance with the given name. + 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) { @@ -725,7 +822,10 @@ 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 = "") ', @@ -776,6 +876,84 @@ 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.writeScoped('if (api != null) {', '}', () { + indent.writeln('this.api = api'); + indent.writeln('${api.name}Instances[name] = this'); + }, addTrailingNewline: false); + indent.addScoped(' else {', '}', () { + indent.writeln('${api.name}Instances.remove(name)'); + }); + 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 it.${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 { @@ -793,6 +971,10 @@ 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 = [ @@ -1216,6 +1398,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) { @@ -1500,6 +1683,9 @@ fun floatHash(f: Float): Int { if (generatorOptions.includeErrorClass) { _writeErrorClass(generatorOptions, indent); } + if (generatorOptions.useJni) { + indent.writeln('private const val defaultInstanceName = "$defaultNativeInteropInstanceName"'); + } } static void _writeMethodDeclaration( @@ -1512,6 +1698,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, }) { final argSignature = []; @@ -1539,16 +1727,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(', ')})'); + indent.writeln( + '$openKeyword$inheritanceKeyword${suspendKeyword}fun $name(${argSignature.join(', ')})', + ); } else if (returnType.isVoid) { - indent.writeln('$openKeyword${abstractKeyword}fun $name(${argSignature.join(', ')})'); + indent.writeln( + '$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 6c2311a862ce..83bc64de8a20 100644 --- a/packages/pigeon/lib/src/objc/objc_generator.dart +++ b/packages/pigeon/lib/src/objc/objc_generator.dart @@ -88,7 +88,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 0df84a8eb6a5..931d22119aa7 100644 --- a/packages/pigeon/lib/src/pigeon_lib.dart +++ b/packages/pigeon/lib/src/pigeon_lib.dart @@ -87,7 +87,7 @@ class ConfigurePigeon { final PigeonOptions options; } -/// Metadata to annotate a Pigeon API implemented by the host-platform. +/// Metadata to annotate a pigeon API implemented by the host-platform. /// /// The abstract class with this annotation groups a collection of Dart↔host /// interop methods. These methods are invoked by Dart and are received by a @@ -116,7 +116,7 @@ class HostApi { final String? dartHostTestHandler; } -/// Metadata to annotate a Pigeon API implemented by Flutter. +/// Metadata to annotate a pigeon API implemented by Flutter. /// /// The abstract class with this annotation groups a collection of Dart↔host /// interop methods. These methods are invoked by the host-platform (such as in @@ -234,11 +234,12 @@ class TaskQueue { final TaskQueueType type; } -/// Options used when configuring Pigeon. +/// Options used when configuring pigeon. 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, @@ -261,6 +262,7 @@ class PigeonOptions { this.astOut, this.debugGenerators, this.basePath, + this.fileSpecificClassNameComponent, String? dartPackageName, this.ignoreLints = true, }) : _dartPackageName = dartPackageName; @@ -268,6 +270,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; @@ -341,11 +346,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?, @@ -382,6 +391,7 @@ 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?, ); } @@ -391,6 +401,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!, @@ -413,6 +424,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; @@ -421,7 +434,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. @@ -486,7 +499,7 @@ class Pigeon { /// String that describes how the tool is used. static String get usage { return ''' -Pigeon is a tool for generating type-safe communication code between Flutter +pigeon is a tool for generating type-safe communication code between Flutter and the host platform. usage: pigeon --input --dart_out [option]* @@ -497,6 +510,10 @@ ${_argParser.usage}'''; static final ArgParser _argParser = ArgParser() ..addOption('input', help: 'REQUIRED: Path to pigeon file.') + ..addOption( + 'app_directory', + help: 'The directory that the app exists in, this is required for Jni and Ffi APIs.', + ) ..addOption( 'dart_out', help: @@ -516,11 +533,32 @@ ${_argParser.usage}'''; 'java_use_generated_annotation', help: 'Adds the java.annotation.Generated annotation to the output.', ) + ..addOption( + 'java_class_name', + help: 'The name of the class that will house all the generated classes in Java.', + ) ..addOption( 'swift_out', help: 'Path to generated Swift file (.swift).', aliases: const ['experimental_swift_out'], ) + ..addOption( + 'swift_error_class_name', + help: 'The name of the error class used for passing custom error parameters in Swift.', + ) + ..addFlag( + 'swift_include_error_class', + help: 'Whether to include the error class in Swift generation.', + defaultsTo: true, + ) + ..addFlag('swift_use_ffi', help: 'Whether to use Ffi for Swift generation.') + ..addOption('swift_ffi_module_name', help: 'The ffi module name for Swift generation.') + ..addOption( + 'swift_app_directory', + help: 'The directory that the app exists in, this is required for Swift Ffi APIs.', + ) + ..addOption('swift_apple_sdk_path', help: 'The path to the apple sdk for Swift generation.') + ..addOption('swift_apple_sdk_triple', help: 'The apple sdk triple for Swift generation.') ..addOption( 'kotlin_out', help: 'Path to generated Kotlin file (.kt).', @@ -535,6 +573,29 @@ ${_argParser.usage}'''; 'kotlin_use_generated_annotation', help: 'Adds javax.annotation.Generated annotation to the output.', ) + ..addFlag('kotlin_use_jni', help: 'Whether to use Jni for Kotlin generation.') + ..addOption( + 'kotlin_app_directory', + help: 'The directory that the app exists in, this is required for Kotlin Jni APIs.', + ) + ..addOption( + 'kotlin_error_class_name', + help: 'The name of the error class used for passing custom error parameters in Kotlin.', + ) + ..addFlag( + 'kotlin_include_error_class', + help: 'Whether to include the error class in Kotlin generation.', + defaultsTo: true, + ) + ..addOption( + 'kotlin_file_specific_class_name_component', + help: 'A String to augment class names to avoid cross file collisions in Kotlin.', + ) + ..addMultiOption( + 'kotlin_jni_classpaths', + help: + 'Paths to directories or JAR files containing compiled Kotlin/Java classes. Used for JNIgen to locate class definitions.', + ) ..addOption( 'cpp_header_out', help: 'Path to generated C++ header file (.h).', @@ -546,6 +607,11 @@ ${_argParser.usage}'''; aliases: const ['experimental_cpp_source_out'], ) ..addOption('cpp_namespace', help: 'The namespace that generated C++ code will be in.') + ..addOption( + 'cpp_header_include_path', + help: 'The path to the header that will get placed in the C++ source file.', + ) + ..addOption('cpp_header_out_path', help: 'The path to the output header file location for C++.') ..addOption( 'gobject_header_out', help: 'Path to generated GObject header file (.h).', @@ -557,8 +623,20 @@ ${_argParser.usage}'''; aliases: const ['experimental_gobject_source_out'], ) ..addOption('gobject_module', help: 'The module that generated GObject code will be in.') + ..addOption( + 'gobject_header_include_path', + help: 'The path to the header that will get placed in the GObject source file.', + ) + ..addOption( + 'gobject_header_out_path', + help: 'The path to the output header file location for GObject.', + ) ..addOption('objc_header_out', help: 'Path to generated Objective-C header file (.h).') ..addOption('objc_prefix', help: 'Prefix for generated Objective-C classes and protocols.') + ..addOption( + 'objc_header_include_path', + help: 'The path to the header that will get placed in the ObjC source file.', + ) ..addOption( 'copyright_header', help: 'Path to file with copyright header to be prepended to generated code.', @@ -578,6 +656,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.') ..addFlag( 'ignore_lints', @@ -595,32 +677,64 @@ ${_argParser.usage}'''; final opts = PigeonOptions( input: results['input'] as String?, + appDirectory: results['app_directory'] as String?, dartOut: results['dart_out'] as String?, dartTestOut: results['dart_test_out'] as String?, objcHeaderOut: results['objc_header_out'] as String?, objcSourceOut: results['objc_source_out'] as String?, - objcOptions: ObjcOptions(prefix: results['objc_prefix'] as String?), + objcOptions: ObjcOptions( + prefix: results['objc_prefix'] as String?, + headerIncludePath: results['objc_header_include_path'] as String?, + ), javaOut: results['java_out'] as String?, javaOptions: JavaOptions( package: results['java_package'] as String?, useGeneratedAnnotation: results['java_use_generated_annotation'] as bool?, + className: results['java_class_name'] as String?, ), swiftOut: results['swift_out'] as String?, + swiftOptions: SwiftOptions( + errorClassName: results['swift_error_class_name'] as String?, + includeErrorClass: results['swift_include_error_class'] as bool? ?? true, + useFfi: results['swift_use_ffi'] as bool? ?? false, + ffiModuleName: results['swift_ffi_module_name'] as String?, + appDirectory: results['swift_app_directory'] as String?, + appleSdkPath: results['swift_apple_sdk_path'] as String?, + appleSdkTriple: results['swift_apple_sdk_triple'] as String?, + ), kotlinOut: results['kotlin_out'] as String?, kotlinOptions: KotlinOptions( package: results['kotlin_package'] as String?, useGeneratedAnnotation: results['kotlin_use_generated_annotation'] as bool? ?? false, + useJni: results['kotlin_use_jni'] as bool? ?? false, + appDirectory: results['kotlin_app_directory'] as String?, + errorClassName: results['kotlin_error_class_name'] as String?, + includeErrorClass: results['kotlin_include_error_class'] as bool? ?? true, + fileSpecificClassNameComponent: + results['kotlin_file_specific_class_name_component'] as String?, + jniClassPaths: results.wasParsed('kotlin_jni_classpaths') + ? results['kotlin_jni_classpaths'] as List + : null, ), cppHeaderOut: results['cpp_header_out'] as String?, cppSourceOut: results['cpp_source_out'] as String?, - cppOptions: CppOptions(namespace: results['cpp_namespace'] as String?), + cppOptions: CppOptions( + namespace: results['cpp_namespace'] as String?, + headerIncludePath: results['cpp_header_include_path'] as String?, + headerOutPath: results['cpp_header_out_path'] as String?, + ), gobjectHeaderOut: results['gobject_header_out'] as String?, gobjectSourceOut: results['gobject_source_out'] as String?, - gobjectOptions: GObjectOptions(module: results['gobject_module'] as String?), + gobjectOptions: GObjectOptions( + module: results['gobject_module'] as String?, + headerIncludePath: results['gobject_header_include_path'] as String?, + headerOutPath: results['gobject_header_out_path'] as String?, + ), copyrightHeader: results['copyright_header'] as String?, 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'), ); @@ -675,7 +789,9 @@ ${_argParser.usage}'''; const DartGeneratorAdapter(), const JavaGeneratorAdapter(), const SwiftGeneratorAdapter(), + const FfigenConfigGeneratorAdapter(), const KotlinGeneratorAdapter(), + const JnigenConfigGeneratorAdapter(), const CppGeneratorAdapter(), const GObjectGeneratorAdapter(), const DartTestGeneratorAdapter(), @@ -702,7 +818,9 @@ ${_argParser.usage}'''; } if (parseResults.pigeonOptions != null && mergeDefinitionFileOptions) { - options = PigeonOptions.fromMap(mergeMaps(options.toMap(), parseResults.pigeonOptions!)); + options = PigeonOptions.fromMap( + mergePigeonMaps(options.toMap(), parseResults.pigeonOptions!), + ); } final InternalPigeonOptions internalOptions = InternalPigeonOptions.fromPigeonOptions(options); @@ -731,6 +849,12 @@ ${_argParser.usage}'''; return 1; } + final bool useFfi = options.swiftOptions?.useFfi ?? false; + final String? swiftAppDir = options.swiftOptions?.appDirectory ?? options.appDirectory; + final bool useJni = options.kotlinOptions?.useJni ?? false; + final String? appDir = options.kotlinOptions?.appDirectory ?? options.appDirectory; + + final String dartExecutable = Platform.resolvedExecutable; for (final adapter in safeGeneratorAdapters) { for (final FileType fileType in adapter.fileTypeList) { final IOSink? sink = adapter.shouldGenerate(internalOptions, fileType); @@ -742,6 +866,21 @@ ${_argParser.usage}'''; } } + if (useFfi && swiftAppDir != null && swiftAppDir.isNotEmpty) { + final int exitCode = await _runFfigen(swiftAppDir, dartExecutable); + if (exitCode != 0) { + return exitCode; + } + } + + if (useJni && appDir != null && appDir.isNotEmpty) { + final Map env = await _getJniEnvironment(dartExecutable); + final bool success = await _runJnigen(appDir, dartExecutable, env); + if (!success) { + return 1; + } + } + return 0; } @@ -759,6 +898,98 @@ ${_argParser.usage}'''; } } } + + /// Runs ffigen in FFI multi-step generation. + static Future _runFfigen(String swiftAppDir, String dartExecutable) async { + final String configFile = path.join(swiftAppDir, 'ffigen_config.dart'); + if (File(configFile).existsSync()) { + print('FFI Multi-step: Running ffigen for $configFile...'); + final ProcessResult ffigenResult = await Process.run(dartExecutable, ['run', configFile]); + if (ffigenResult.exitCode != 0) { + print('Error running ffigen: ${ffigenResult.stderr}'); + return 1; + } + print('FFI Multi-step: ffigen completed successfully.'); + return 0; + } else { + print('FFI Multi-step: skipping ffigen because $configFile does not exist.'); + return 0; + } + } + + /// Gets the environment map for JNI multi-step generation. + static Future> _getJniEnvironment(String dartExecutable) async { + final env = {}; + + // Try to find Java 17 on macOS + if (Platform.isMacOS) { + final ProcessResult javaHomeResult = await Process.run('/usr/libexec/java_home', [ + '-v', + '17', + ]); + if (javaHomeResult.exitCode == 0) { + final String javaHome = javaHomeResult.stdout.toString().trim(); + if (javaHome.isNotEmpty) { + env['JAVA_HOME'] = javaHome; + print('JNI Multi-step: Using Java 17 from $javaHome'); + } + } + } + + // Fallback to current environment's JAVA_HOME if not set or lookup failed + if (!env.containsKey('JAVA_HOME')) { + final String? currentJavaHome = Platform.environment['JAVA_HOME']; + if (currentJavaHome != null && currentJavaHome.isNotEmpty) { + env['JAVA_HOME'] = currentJavaHome; + print('JNI Multi-step: Using default JAVA_HOME from environment: $currentJavaHome'); + } + } + + // Add dart to PATH if it was found via login shell or full path + if (dartExecutable != 'dart') { + final String dartDir = path.dirname(dartExecutable); + final String currentPath = Platform.environment['PATH'] ?? ''; + env['PATH'] = '$dartDir:$currentPath'; + print('Adding $dartDir to PATH for JNIgen due to missing path!'); + } + return env; + } + + /// Runs JNIgen in JNI multi-step generation. + static Future _runJnigen( + String appDir, + String dartExecutable, + Map env, + ) async { + final String configFile = path.join(appDir, 'jnigen_config.dart'); + print('JNI Multi-step: Running JNIgen for $configFile...'); + final ProcessResult jnigenResult = await Process.run(dartExecutable, [ + 'run', + configFile, + ], environment: env); + if (jnigenResult.exitCode != 0) { + print(''' + +================================================================================ + +PIGEON USERS: If you have changed your pigeon api surface and haven't updated your native code that uses it, you may need to do that before running JNIgen + + +Once you have updated the code to use the newly generated API surface you can re-run pigeon and JNIgen will be run as well. + + +If you have updated the native code and JNIgen still fails to run, continue reading this error. + +================================================================================ + +'''); + print('Error running JNIgen:\n${jnigenResult.stderr}'); + return false; + } else { + print('JNI Multi-step: JNIgen completed successfully.'); + return true; + } + } } /// Represents an error as a result of parsing and generating code. diff --git a/packages/pigeon/lib/src/pigeon_lib_internal.dart b/packages/pigeon/lib/src/pigeon_lib_internal.dart index d1a12fd93988..ef2f3d021045 100644 --- a/packages/pigeon/lib/src/pigeon_lib_internal.dart +++ b/packages/pigeon/lib/src/pigeon_lib_internal.dart @@ -14,6 +14,7 @@ import 'package:analyzer/dart/ast/visitor.dart' as dart_ast_visitor; import 'package:collection/collection.dart' as collection; import 'package:path/path.dart' as path; import 'package:pub_semver/pub_semver.dart'; +import 'package:yaml/yaml.dart' as yaml; import 'ast.dart'; import 'ast_generator.dart'; @@ -22,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. @@ -32,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, @@ -50,6 +54,7 @@ class InternalPigeonOptions { PigeonOptions options, Iterable? copyrightHeader, ) : input = options.input, + appDirectory = options.appDirectory, objcOptions = (options.objcHeaderOut == null || options.objcSourceOut == null) ? null : InternalObjcOptions.fromObjcOptions( @@ -57,7 +62,11 @@ class InternalPigeonOptions { objcHeaderOut: options.objcHeaderOut!, objcSourceOut: options.objcSourceOut!, fileSpecificClassNameComponent: - options.objcSourceOut?.split('/').lastOrNull?.split('.').firstOrNull ?? '', + options.objcOptions?.fileSpecificClassNameComponent ?? + options.fileSpecificClassNameComponent ?? + (options.objcSourceOut == null + ? '' + : path.basename(options.objcSourceOut!).split('.').first), copyrightHeader: copyrightHeader, ), javaOptions = options.javaOut == null @@ -73,6 +82,9 @@ class InternalPigeonOptions { options.swiftOptions ?? const SwiftOptions(), swiftOut: options.swiftOut!, copyrightHeader: copyrightHeader, + fileSpecificClassNameComponent: + options.swiftOptions?.fileSpecificClassNameComponent ?? + options.fileSpecificClassNameComponent, ), kotlinOptions = options.kotlinOut == null ? null @@ -80,6 +92,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) ? null @@ -104,6 +119,24 @@ 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 == null + ? null + : path.basename(options.swiftOut!).split('.').first) + : null) ?? + (options.kotlinOptions?.useJni ?? false + ? options.kotlinOptions?.fileSpecificClassNameComponent ?? + (options.kotlinOut == null + ? null + : path.basename(options.kotlinOut!).split('.').first) + : null), ), copyrightHeader = options.copyrightHeader != null ? _lineReader(path.posix.join(options.basePath ?? '', options.copyrightHeader)) @@ -125,6 +158,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; @@ -431,6 +467,57 @@ class SwiftGeneratorAdapter implements GeneratorAdapter { } } +/// 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) { + final InternalSwiftOptions? swiftOptions = options.swiftOptions; + final InternalDartOptions? dartOptions = options.dartOptions; + if (swiftOptions == null || dartOptions == null) { + return; + } + final generator = FfigenConfigGenerator(); + + final ffigenYamlOptions = InternalFfigenConfigOptions( + dartOptions, + swiftOptions, + options.basePath, + dartOptions.dartOut, + options.appDirectory, + ); + + generator.generate(ffigenYamlOptions, root, sink, dartPackageName: options.dartPackageName); + } + + @override + IOSink? shouldGenerate(InternalPigeonOptions options, FileType _) => + (options.swiftOptions?.useFfi ?? false) + ? _openSink( + 'ffigen_config.dart', + basePath: options.swiftOptions?.appDirectory ?? options.appDirectory ?? '', + ) + : null; + + @override + List validate(InternalPigeonOptions options, Root root) { + if (!(options.swiftOptions?.useFfi ?? false)) { + return []; + } + return _validateDependencies( + appDirectory: options.swiftOptions?.appDirectory ?? options.appDirectory, + dartOutPath: options.dartOptions?.dartOut, + apiName: 'Swift FFI', + requiredDeps: const ['ffi', 'objective_c'], + ); + } +} + /// A [GeneratorAdapter] that generates C++ source code. class CppGeneratorAdapter implements GeneratorAdapter { /// Constructor for [CppGeneratorAdapter]. @@ -558,6 +645,53 @@ 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.kotlinOptions?.appDirectory ?? options.appDirectory ?? '', + ) + : null; + + @override + List validate(InternalPigeonOptions options, Root root) { + if (!(options.kotlinOptions?.useJni ?? false)) { + return []; + } + return _validateDependencies( + appDirectory: options.kotlinOptions?.appDirectory ?? options.appDirectory, + dartOutPath: options.dartOptions?.dartOut, + apiName: 'Kotlin JNI', + requiredDeps: const ['jni'], + ); + } +} + dart_ast.Annotation? _findMetadata(dart_ast.NodeList metadata, String query) { final Iterable annotations = metadata.where( (dart_ast.Annotation element) => element.name.name == query, @@ -1124,6 +1258,8 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor { ParseResults results() { _storeCurrentApi(); _storeCurrentClass(); + final referencedLists = {}; + final referencedMaps = {}; final Map> referencedTypes = getReferencedTypes(_apis, _classes); final Set referencedTypeNames = referencedTypes.keys @@ -1136,6 +1272,7 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor { } final referencedEnums = List.from(_enums); + var containsHostApi = false; var containsFlutterApi = false; var containsProxyApi = false; @@ -1152,19 +1289,11 @@ 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, - constants: _constants, - containsHostApi: containsHostApi, - containsFlutterApi: containsFlutterApi, - containsProxyApi: containsProxyApi, - containsEventChannel: containsEventChannel, - ); - final totalErrors = List.from(_errors); for (final MapEntry> element in referencedTypes.entries) { @@ -1215,6 +1344,33 @@ 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, + constants: _constants, + containsHostApi: containsHostApi, + containsFlutterApi: containsFlutterApi, + containsProxyApi: containsProxyApi, + containsEventChannel: containsEventChannel, + ); + final List validateErrors = _validateAst(completeRoot, source); totalErrors.addAll(validateErrors); @@ -1253,7 +1409,13 @@ class RootBuilder extends dart_ast_visitor.RecursiveAstVisitor { return ParseResults( root: totalErrors.isEmpty ? completeRoot - : Root(apis: [], classes: [], enums: []), + : Root( + apis: [], + classes: [], + enums: [], + lists: {}, + maps: {}, + ), errors: totalErrors, pigeonOptions: _pigeonOptions, ); @@ -2190,3 +2352,54 @@ int calculateLineNumber(String contents, int offset) { } return result; } + +List _validateDependencies({ + required String? appDirectory, + required String? dartOutPath, + required String apiName, + required List requiredDeps, +}) { + final errors = []; + + String? pubspecPath; + if (appDirectory != null && appDirectory.isNotEmpty) { + pubspecPath = findPubspecPath(path.join(appDirectory, 'placeholder.dart')); + } + if (pubspecPath == null && dartOutPath != null && dartOutPath.isNotEmpty) { + pubspecPath = findPubspecPath(dartOutPath); + } + pubspecPath ??= findPubspecPath(path.join(Directory.current.path, 'placeholder.dart')); + + if (pubspecPath == null) { + return errors; + } + + final resolvedPubspec = File(pubspecPath); + + try { + final String content = resolvedPubspec.readAsStringSync(); + final dynamic doc = yaml.loadYaml(content); + if (doc is yaml.YamlMap) { + final dependencies = doc['dependencies'] as yaml.YamlMap?; + final devDependencies = doc['dev_dependencies'] as yaml.YamlMap?; + final dependencyOverrides = doc['dependency_overrides'] as yaml.YamlMap?; + + for (final dep in requiredDeps) { + final bool inDeps = dependencies?.containsKey(dep) ?? false; + final bool inDevDeps = devDependencies?.containsKey(dep) ?? false; + final bool inOverrides = dependencyOverrides?.containsKey(dep) ?? false; + if (!inDeps && !inDevDeps && !inOverrides) { + errors.add( + Error( + message: + 'Missing required dependency "$dep" in pubspec.yaml for $apiName native interop support.\n' + 'Please add "$dep" to your dependencies or dev_dependencies in your pubspec.yaml file.', + ), + ); + } + } + } + } catch (_) {} + + return errors; +} 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..4b7ff7c87c3e --- /dev/null +++ b/packages/pigeon/lib/src/swift/ffigen_config_generator.dart @@ -0,0 +1,242 @@ +// 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.writeln('// ${getGeneratedCodeWarning()}'); + indent.writeln('// $seeAlsoWarning'); + indent.writeln('// ignore_for_file: depend_on_referenced_packages'); + indent.newln(); + indent.format(''' +import 'dart:io'; + +import 'package:ffigen/ffigen.dart' as fg; +import 'package:path/path.dart' as path; +import 'package:pub_semver/pub_semver.dart'; +import 'package:swift2objc/swift2objc.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 fullSwiftOut = generatorOptions.basePath != null + ? path.posix.join(generatorOptions.basePath!, generatorOptions.swiftOptions.swiftOut) + : generatorOptions.swiftOptions.swiftOut; + final String fullDartOut = generatorOptions.basePath != null + ? path.posix.join(generatorOptions.basePath!, generatorOptions.dartOut ?? '') + : (generatorOptions.dartOut ?? ''); + + final String objcDir = path.posix.join( + path.posix.dirname(path.posix.dirname(fullSwiftOut)), + '${path.posix.basename(path.posix.dirname(fullSwiftOut))}_objc_gen', + ); + + final String moduleName = generatorOptions.swiftOptions.ffiModuleName?.isNotEmpty ?? false + ? generatorOptions.swiftOptions.ffiModuleName! + : 'Runner'; + + indent.writeScoped('Future main(List args) async {', '}', () { + indent.writeln(" Directory.current = Platform.script.resolve('.').toFilePath();"); + indent.format(''' + Uri sdk; + if (args.isNotEmpty) { + sdk = Uri.directory(args[0]); + } else { + sdk = ${(configuredSdkPath != null && configuredSdkPath.isNotEmpty) ? "Uri.directory('$configuredSdkPath')" : "await _getAppleSdk()"}; + } + final bool isValidSdk = + File(path.join(sdk.toFilePath(), 'SDKSettings.json')).existsSync() || + File(path.join(sdk.toFilePath(), 'SDKSettings.plist')).existsSync(); + if (!isValidSdk) { + sdk = await _getAppleSdk(); + } +'''); + final String prefix = generatorOptions.swiftOptions.fileSpecificClassNameComponent ?? ''; + indent.writeScoped('final classes = {', '};', nestCount: 2, () { + 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.writeScoped('final enums = {', '};', nestCount: 2, () { + for (final Enum enumType in root.enums) { + indent.writeln("'${enumType.name}',"); + } + if (hasAsyncFlutterApi) { + indent.writeln("'NSURLSessionAuthChallengeDisposition',"); + } + indent.writeln("'${prefix}PigeonInternalNumberType',"); + }); + + // TODO(tarrinneal): Make minimum OS versions configurable (ios/macos in externalVersions below). + indent.format(''' + var targetTriple = '${configuredSdkTriple ?? ''}'; + if (targetTriple.isEmpty) { + try { + targetTriple = sdk.path.toLowerCase().contains('macosx') + ? await macOSX64TargetTripleLatest + : await iOSArm64TargetTripleLatest; + } catch (_) { + targetTriple = sdk.path.toLowerCase().contains('macosx') + ? 'x86_64-apple-macosx' + : 'arm64-apple-ios'; + } + } + + await SwiftGenerator( + target: Target( + triple: targetTriple, + sdk: sdk, + ), + inputs: [ObjCCompatibleSwiftFileInput(files: [ + Uri.file('${path.relative(fullSwiftOut, from: generatorOptions.exampleAppDirectory ?? './')}') + ]) + ], + include: (Declaration d) => + classes.contains(d.name) || enums.contains(d.name), + output: Output( + module: '$moduleName', + dartFile: Uri.file('${path.relative(path.withoutExtension(fullDartOut), from: generatorOptions.exampleAppDirectory ?? './')}.ffi.dart'), + objectiveCFile: Uri.file('${path.relative(path.posix.join(objcDir, '${path.posix.basenameWithoutExtension(fullSwiftOut)}.m'), from: generatorOptions.exampleAppDirectory ?? './')}'), + 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(13, 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) { + // Assign declarations to their destination module. Foundation classes starting with 'NS' + // return null so ffigen treats them as external system framework types (provided by + // package:objective_c) rather than generating local module wrappers for them. + // Specific types (like NSURLCredential) return '$moduleName' so ffigen generates the + // explicit Dart FFI bindings required by this plugin. +${hasAsyncFlutterApi ? ''' + if (decl.originalName == 'NSURLCredential' || + decl.originalName == 'NSURLSessionAuthChallengeDisposition') { + return '$moduleName'; + } +''' : ''} + return decl.originalName.startsWith('NS') ? null : '$moduleName'; + } + ), + protocols: fg.Protocols( + include: (fg.Declaration decl) => classes.contains(decl.originalName), + module: (fg.Declaration decl) { + // Assign declarations to their destination module. Foundation classes starting with 'NS' + // return null so ffigen treats them as external system framework types (provided by + // package:objective_c) rather than generating local module wrappers for them. + // Specific types (like NSURLCredential) return '$moduleName' so ffigen generates the + // explicit Dart FFI bindings required by this plugin. +${hasAsyncFlutterApi ? ''' + if (decl.originalName == 'NSURLCredential' || + decl.originalName == 'NSURLSessionAuthChallengeDisposition') { + return '$moduleName'; + } +''' : ''} + return decl.originalName.startsWith('NS') ? null : '$moduleName'; + }, + ), + ), + ), + ).generate( + logger: null, + tempDirectory: Uri.directory('${path.relative(objcDir, from: generatorOptions.exampleAppDirectory ?? './')}'), + ); + '''); + }); + indent.format(''' +Future _getAppleSdk() async { + try { + final ProcessResult result = await Process.run('xcrun', ['--sdk', 'iphoneos', '--show-sdk-path']); + if (result.exitCode == 0) { + final String sdkPath = result.stdout.toString().trim(); + if (sdkPath.isNotEmpty && + (File(path.join(sdkPath, 'SDKSettings.json')).existsSync() || + File(path.join(sdkPath, 'SDKSettings.plist')).existsSync())) { + return Uri.directory(sdkPath); + } + } + } catch (_) {} + return iOSSdk; +} +'''); + 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 200460ff145d..bbb3bceabddb 100644 --- a/packages/pigeon/lib/src/swift/swift_generator.dart +++ b/packages/pigeon/lib/src/swift/swift_generator.dart @@ -30,6 +30,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. @@ -47,6 +52,32 @@ 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. + /// + /// Defaults to './' if not specified. + 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` using `macOSX64TargetTripleLatest` or `iOSArm64TargetTripleLatest`, + /// falling back to `arm64-apple-ios` (or `x86_64-apple-macosx` 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 +86,11 @@ class SwiftOptions { fileSpecificClassNameComponent: 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 +103,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 +115,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 +128,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 +140,20 @@ 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 +173,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 +258,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 +273,7 @@ class SwiftGenerator extends StructuredGenerator { Indent indent, { required String dartPackageName, }) { + _classNamePrefix = generatorOptions.fileSpecificClassNameComponent ?? ''; if (generatorOptions.copyrightHeader != null) { addLines(indent, generatorOptions.copyrightHeader!, linePrefix: '// '); } @@ -212,8 +293,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 +302,7 @@ class SwiftGenerator extends StructuredGenerator { #else #error("Unsupported platform.") #endif'''); + } } @override @@ -262,7 +344,9 @@ class SwiftGenerator extends StructuredGenerator { indent.newln(); addDocumentationComments(indent, anEnum.documentationComments, _docCommentSpec); - indent.write('enum ${anEnum.name}: Int, CaseIterable '); + indent.write( + '${generatorOptions.useFfi ? '@objc ' : ''}enum ${anEnum.name}: Int, CaseIterable ', + ); indent.addScoped('{', '}', () { enumerate(anEnum.members, (int index, EnumMember member) { addDocumentationComments(indent, member.documentationComments, _docCommentSpec); @@ -271,6 +355,149 @@ class SwiftGenerator extends StructuredGenerator { }); } + void _writeFfiCodec(Indent indent, Root root) { + indent.newln(); + indent.format(''' +@objc class ${_classNamePrefix}PigeonInternalNull: NSObject {} + +class _PigeonFfiCodec { + static func readValue(value: NSObject?, type: String? = nil, type2: String? = nil) -> Any? { + if (${_classNamePrefix}PigeonInternal.isNullish(value)) { + return nil + } + if let typedData = value as? ${_classNamePrefix}PigeonTypedData { + switch typedData.type { + case ${_classNamePrefix}PigeonInternalNumberType.uint8.rawValue: + return typedData.toUint8Array() + case ${_classNamePrefix}PigeonInternalNumberType.int32.rawValue: + return typedData.toInt32Array() + case ${_classNamePrefix}PigeonInternalNumberType.int64.rawValue: + return typedData.toInt64Array() + case ${_classNamePrefix}PigeonInternalNumberType.float32.rawValue: + return typedData.toFloat32Array() + case ${_classNamePrefix}PigeonInternalNumberType.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 (${_classNamePrefix}PigeonInternal.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 list = value as! [Any] + let res: NSMutableArray = NSMutableArray(capacity: list.count) + for item in list { + res.add(${_classNamePrefix}PigeonInternal.isNullish(item) ? ${_classNamePrefix}PigeonInternalNull() : writeValue(value: item, isObject: true) as! NSObject) + } + return res + } + if (value is [AnyHashable: Any]) { + let dict = value as! [AnyHashable: Any] + let res: NSMutableDictionary = NSMutableDictionary(capacity: dict.count) + for (key, value) in dict { + res.setObject(${_classNamePrefix}PigeonInternal.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, @@ -278,6 +505,10 @@ 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'; @@ -416,24 +647,33 @@ class SwiftGenerator extends StructuredGenerator { Indent indent, Class classDefinition, { bool private = false, + bool useFfi = false, + bool useFfiTypedData = false, bool hashable = true, bool customStringConvertible = true, }) { final privateString = private ? 'private ' : ''; + final objcString = useFfi ? '@objc ' : ''; + final bridge = useFfi ? 'Bridge' : ''; final protocols = []; + if (useFfi) { + protocols.add('NSObject'); + } if (classDefinition.superClass != null) { protocols.add(classDefinition.superClass!.name); } else { if (hashable) { protocols.add('Hashable'); } - if (customStringConvertible) { + if (customStringConvertible && !useFfi) { protocols.add('CustomStringConvertible'); } } final extendsString = protocols.isEmpty ? '' : ': ${protocols.join(', ')}'; - if (classDefinition.isSwiftClass) { - indent.write('${privateString}class ${classDefinition.name}$extendsString '); + if (classDefinition.isSwiftClass || useFfi) { + indent.write( + '$privateString${objcString}class ${classDefinition.name}$bridge$extendsString ', + ); } else if (classDefinition.isSealed) { indent.write('protocol ${classDefinition.name} '); } else { @@ -443,14 +683,26 @@ class SwiftGenerator extends StructuredGenerator { indent.addScoped('{', '', () { final Iterable fields = getFieldsInSerializationOrder(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) { addDocumentationComments(indent, 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); @@ -552,7 +804,7 @@ if (wrapped == nil) { _docCommentSpec, generatorComments: generatedComments, ); - _writeDataClassSignature(indent, classDefinition); + _writeDataClassSignature(indent, classDefinition, useFfiTypedData: generatorOptions.useFfi); indent.writeScoped('', '}', () { if (classDefinition.isSealed) { return; @@ -564,6 +816,7 @@ if (wrapped == nil) { indent, classDefinition, dartPackageName: dartPackageName, + useFfi: generatorOptions.useFfi, ); writeClassEncode( generatorOptions, @@ -588,13 +841,184 @@ if (wrapped == nil) { dartPackageName: dartPackageName, ); }); + if (generatorOptions.useFfi) { + _writeFfiBridgeClass( + generatorOptions, + root, + indent, + classDefinition, + dartPackageName: dartPackageName, + ); + } + } + + 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, + ); + _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 (${_classNamePrefix}PigeonInternal.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 ? '!' : ''})', + '${_classNamePrefix}PigeonInternal.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; + } } - void _writeClassInit(Indent indent, List fields) { - indent.writeScoped('init(', ')', () { + String _numberToObjc(String varName, {String getter = '', bool isNullable = true}) => isNullable + ? '${_classNamePrefix}PigeonInternal.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 + ? '${_classNamePrefix}PigeonInternal.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 { @@ -604,18 +1028,25 @@ 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}'); } @@ -714,6 +1145,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'); @@ -727,8 +1159,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, ); }); @@ -792,6 +1225,11 @@ 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(indent, func.documentationComments, _docCommentSpec); @@ -843,6 +1281,247 @@ if (wrapped == nil) { }); } + void _writeFfiFlutterApi( + InternalSwiftOptions generatorOptions, + Root root, + Indent indent, + AstFlutterApi api, { + required String dartPackageName, + }) { + final String errorClassName = _getErrorClassName(generatorOptions); + 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.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 = ${_classNamePrefix}PigeonInternal.defaultInstanceName) ', + ); + indent.addScoped('{', '}', () { + indent.writeScoped('if let api = api {', '}', () { + indent.writeln( + '${api.name}Registrar.registered${api.name}[name] = ${api.name}(api: api)', + ); + }, addTrailingNewline: false); + indent.addScoped(' else {', '}', () { + indent.writeln('${api.name}Registrar.registered${api.name}.removeValue(forKey: name)'); + }); + }); + indent.newln(); + indent.write( + 'static func getInstance(name: String = ${_classNamePrefix}PigeonInternal.defaultInstanceName) -> ${api.name}? ', + ); + indent.addScoped('{', '}', () { + indent.writeln('return ${api.name}Registrar.registered${api.name}[name]'); + }); + }); + + indent.newln(); + 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 = ${_classNamePrefix}PigeonInternal.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.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 = ${_classNamePrefix}PigeonInternal.defaultInstanceName) {', + '}', + () { + indent.writeScoped('if let api = api {', '}', () { + indent.writeln('let wrapper = ${api.name}Setup()'); + indent.writeln('wrapper.api = api'); + indent.writeln('${api.name}InstanceTracker.instancesOf${api.name}[name] = wrapper'); + }, addTrailingNewline: false); + indent.addScoped(' else {', '}', () { + indent.writeln( + '${api.name}InstanceTracker.instancesOf${api.name}.removeValue(forKey: name)', + ); + }); + }, + ); + 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: _getErrorClassName(generatorOptions), + 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 ${_classNamePrefix}PigeonInternal.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 { @@ -857,6 +1536,13 @@ if (wrapped == nil) { required String dartPackageName, }) { final String apiName = api.name; + if (generatorOptions.useFfi) { + indent.format(''' + class ${apiName}InstanceTracker { + static var instancesOf$apiName = [String: ${apiName}Setup?]() + } + '''); + } const generatedComments = [ ' Generated protocol from Pigeon that represents a handler of messages from Flutter.', @@ -880,17 +1566,20 @@ 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 }', ); @@ -1326,7 +2015,7 @@ 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 ? '' : '!'); @@ -1334,11 +2023,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)}'; } } @@ -1348,11 +2037,16 @@ 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)}'); + indent.writeln( + '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)}', + ); } } @@ -1367,7 +2061,7 @@ static func isNullish(_ value: Any?) -> Bool { return true } - return innerValue is NSNull + return innerValue is NSNull${generatorOptions.useFfi ? ' || innerValue is ${_classNamePrefix}PigeonInternalNull' : ''} }'''); } @@ -1464,19 +2158,19 @@ static func deepEquals(_ lhs: Any?, _ rhs: Any?) -> Bool { case is (Void, Void): return true - case (let lhsArray, let rhsArray) as ([Any?], [Any?]): + case (let lhsArray, let rhsArray) as ([Double], [Double]): guard lhsArray.count == rhsArray.count else { return false } for (index, element) in lhsArray.enumerated() { - if !deepEquals(element, rhsArray[index]) { + if !doubleEquals(element, rhsArray[index]) { return false } } return true - case (let lhsArray, let rhsArray) as ([Double], [Double]): + case (let lhsArray, let rhsArray) as ([Any?], [Any?]): guard lhsArray.count == rhsArray.count else { return false } for (index, element) in lhsArray.enumerated() { - if !doubleEquals(element, rhsArray[index]) { + if !deepEquals(element, rhsArray[index]) { return false } } @@ -1546,10 +2240,218 @@ static func deepHash(value: Any?, hasher: inout Hasher) { '''); } + /// Writes a custom number wrapper class (`${_classNamePrefix}NumberWrapper`). + /// + /// Objective-C's `NSNumber` erases specific primitive types (`Int`, `Double`, `Bool`) + /// and enum types when boxed generically as `NSObject` or `Any`. This wrapper + /// pairs an `NSNumber` with an explicit `type` integer discriminant (e.g. 1 = int, + /// 2 = double, 3 = bool, 4+ = specific enums) so the FFI bridge between Swift and Dart + /// can preserve and reconstruct the exact original primitive or enum type across untyped boundaries. + void _writeNumberWrapper(Root root, Indent indent) { + indent.newln(); + indent.writeln( + '// A wrapper around NSNumber that preserves the original primitive/enum type across FFI.', + ); + 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.format(''' +// Enum to represent the Dart TypedData types +enum ${_classNamePrefix}PigeonInternalNumberType: Int { + case uint8 = 0 + case int32 = 1 + case int64 = 2 + case float32 = 3 + case float64 = 4 +} + +@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}PigeonInternalNumberType.uint8.rawValue + } + + public init(_ data: [Int32]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = ${_classNamePrefix}PigeonInternalNumberType.int32.rawValue + } + + public init(_ data: [Int64]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = ${_classNamePrefix}PigeonInternalNumberType.int64.rawValue + } + + public init(_ data: [Float32]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = ${_classNamePrefix}PigeonInternalNumberType.float32.rawValue + } + + public init(_ data: [Float64]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = ${_classNamePrefix}PigeonInternalNumberType.float64.rawValue + } + + /// Returns the data as a [UInt8] array, if the type is .uint8 + public func toUint8Array() -> [UInt8]? { + guard type == ${_classNamePrefix}PigeonInternalNumberType.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}PigeonInternalNumberType.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}PigeonInternalNumberType.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}PigeonInternalNumberType.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}PigeonInternalNumberType.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 + } +} + '''); + } + void _writePigeonInternal(InternalSwiftOptions generatorOptions, Root root, Indent indent) { indent.newln(); final String uniqueComponent = generatorOptions.fileSpecificClassNameComponent ?? ''; indent.writeScoped('enum ${uniqueComponent}PigeonInternal {', '}', () { + if (generatorOptions.useFfi) { + indent.writeln('static let defaultInstanceName = "$defaultNativeInteropInstanceName"'); + } _writeIsNullish(generatorOptions, indent); if (root.classes.isNotEmpty) { _writeDeepEquals(generatorOptions, indent); @@ -1568,13 +2470,16 @@ static func deepHash(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); + } _writePigeonInternal(generatorOptions, root, indent); _writeNilOrValue(indent); @@ -1589,6 +2494,7 @@ static func deepHash(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 @@ -1613,6 +2519,7 @@ static func deepHash(value: Any?, hasher: inout Hasher) { } }'''); if (api.swiftOptions?.includeSharedClasses ?? true) { + // TODO(tarrinneal): Prefix these classes to avoid name collisions. indent.format(''' class PigeonEventChannelWrapper { @@ -1955,6 +2862,7 @@ static func deepHash(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 @@ -2599,27 +3507,41 @@ static func deepHash(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 {', '}', () { - indent.writeln('let code: String'); - indent.writeln('let message: String?'); - indent.writeln('let details: Sendable?'); - indent.newln(); - indent.writeScoped('init(code: String, message: String?, details: Sendable?) {', '}', () { - indent.writeln('self.code = code'); - indent.writeln('self.message = message'); - indent.writeln('self.details = details'); - }); - indent.newln(); - indent.writeScoped('var localizedDescription: String {', '}', () { - indent.writeScoped('return', '', () { - indent.writeln( - '"${_getErrorClassName(generatorOptions)}(code: \\(code), message: \\(message ?? ""), details: \\(details ?? "")"', - ); - }, addTrailingNewline: false); - }); - }); + indent.writeScoped( + '${objc}final class ${_getErrorClassName(generatorOptions)}: ${generatorOptions.useFfi ? 'NSObject, ' : ''}Error {', + '}', + () { + 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( + '${objc}init(code: String${generatorOptions.useFfi ? '?' : ''}, message: String?, details: ${generatorOptions.useFfi ? 'String' : 'Sendable'}?) {', + '}', + () { + indent.writeln('self.code = code'); + indent.writeln('self.message = message'); + indent.writeln('self.details = details'); + }, + ); + indent.newln(); + indent.writeScoped('var localizedDescription: String {', '}', () { + indent.writeScoped('return', '', () { + indent.writeln( + '"${_getErrorClassName(generatorOptions)}(code: \\(code${generatorOptions.useFfi ? ' ?? ""' : ''}), message: \\(message ?? ""), details: \\(details ?? ""))"', + ); + }, addTrailingNewline: false); + }); + }, + ); } void _writeProxyApiImports(Indent indent, Iterable apis) { @@ -2771,11 +3693,14 @@ 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?]'; @@ -2790,12 +3715,28 @@ 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? _swiftTypeForBuiltinDartType(TypeDeclaration type, {bool mapKey = false}) { +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', 'bool': 'Bool', @@ -2810,11 +3751,61 @@ String? _swiftTypeForBuiltinDartType(TypeDeclaration type, {bool mapKey = false} '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 && isPrimitiveType(type)) { + 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 && isPrimitiveType(type)) { + 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; } @@ -2828,15 +3819,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 _nullSafeSwiftTypeForDartType(TypeDeclaration type, {bool mapKey = false}) { +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({ @@ -2845,28 +3875,55 @@ 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, @@ -2877,16 +3934,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/native_interop_guide.md b/packages/pigeon/native_interop_guide.md new file mode 100644 index 000000000000..82b10d9b95df --- /dev/null +++ b/packages/pigeon/native_interop_guide.md @@ -0,0 +1,123 @@ + +# Pigeon Native Interop (FFI & JNI) Guide + +This guide describes Pigeon's Native Interop feature, which allows for direct, high-performance communication between Dart and native code using **FFI (Foreign Function Interface)** for Swift (iOS/macOS) and **JNI (Java Native Interface)** for Kotlin (Android). + +--- + +## 1. Overview + +Pigeon Native Interop allows Dart code to make direct function calls into native platform code, and vice versa, without the overhead of MethodChannel-based message passing. Instead of serializing data into binary buffers, Native Interop establishes direct memory-bound bridges using native pointers and JVM references. +For a detailed comparison between MethodChannel-based communication and Native Interop—including advantages, limitations, and recommended use cases—see the [Pigeon README](file:///Users/tarrinneal/work/packages/packages/pigeon/README.md#communication-options-method-channels-vs-native-interop). + +--- + +## 2. End-to-End Workflow + +Using Native Interop in pigeon follows the standard pigeon workflow, with a few additional configuration and compilation steps. The complete end-to-end process is: + +1. **Define the Interface**: Create a Dart definition file outlining your `HostApi` and `FlutterApi` declarations (refer to the [Pigeon README](file:///Users/tarrinneal/work/packages/packages/pigeon/README.md#rules-for-defining-your-communication-interface) for syntax and rules). +2. **Configure Options**: Configure `kotlinOptions.useJni` or `swiftOptions.useFfi` in your `PigeonOptions` (see [Step 1: Configure Pigeon Options](#step-1-configure-pigeon-options) below). +3. **Prerequisites**: Ensure your local environment meets the toolchain prerequisites for `jnigen` and `ffigen` (see [Section 3: Prerequisites](#section-3-prerequisites) below). +4. **Run Code Generation**: Run the `pigeon` tool to generate the native bridge code, Dart wrapper, and config scripts, then run the generated config scripts to produce the underlying interop bindings (see [Step 2: Automated Interop Generation](#step-2-automated-interop-generation) below). +5. **Configure Build Systems**: For Swift FFI, configure CocoaPods or Swift Package Manager (SwiftPM) to compile the intermediate Objective-C bridge files (see [Step 3: iOS/macOS Build System Configuration (FFI)](#step-3-iosmacos-build-system-configuration-ffi) below). +6. **Implement and Call**: Implement the generated protocol/class interface in your native codebase and call the generated Dart methods from your Flutter application. + +--- + +## 3. Prerequisites + +To use Native Interop, your development environment and the corresponding external tools must be configured: + +### Android (JNI / JNIgen) +- **Java 17**: Required specifically by the Android build tools and JNIgen. +- **Maven (`mvn`)**: Required to resolve dependencies during generation. +- **Android SDK**: Must be installed and configured in your path. +- **Kotlin Version**: The maximum supported version is **2.1.0**. + +### iOS/macOS (FFI / FFIgen) +- **LLVM (version 9+)**: Required to parse header files. + - On macOS, this is included with Xcode Command Line Tools. +- **Dart Dependencies**: The `package:ffi` and `package:ffigen` packages must be added to your pubspec. + +--- + +## 4. Implementation Steps + +### Step 1: Configure Pigeon Options + +Enable Native Interop for your target platforms by setting the configuration options in your Pigeon file: + + +```dart +@ConfigurePigeon( + PigeonOptions( + dartOptions: DartOptions(), + kotlinOptions: KotlinOptions( + useJni: true, + // Optional: Paths to search for compiled local classes (primarily needed for standalone Apps) + jniClassPaths: ['build/app/tmp/kotlin-classes/release'], + ), + swiftOptions: SwiftOptions(useFfi: true, ffiModuleName: 'my_plugin'), + ), +) +``` + +#### Kotlin Options for JNI +* **`useJni`**: Set to `true` to enable Kotlin JNI code generation and automated JNIgen orchestration. +* **`jniClassPaths`**: (Optional) A list of paths to directories or `.jar` files containing compiled Kotlin/Java classes. This is primarily required for standalone Flutter Applications, as their own local compiled classes are not automatically resolved by JNIgen's default dependency scanner. If omitted, it defaults to the standard Flutter release build output directory (`build/app/tmp/kotlin-classes/release`). + - *Note*: If you are building a Flutter Plugin, this option is generally not needed because JNIgen automatically resolves classes defined inside plugin packages via standard Gradle dependency classpaths. + - *CLI Equivalent*: `--kotlin_jni_classpaths ` (can be specified multiple times). + +### Step 2: Automated Interop Generation + +Pigeon automatically orchestrates running `jnigen` and `ffigen` as part of the generation process. + +- **Android (JNI)**: When `kotlinOptions.useJni` is enabled and `kotlinOut` is specified: + 1. Generate the JNI-compatible Kotlin bridge and the `jnigen_config.dart` configuration. + 2. Run `jnigen` (via the config script) to parse the generated Kotlin bridge and produce Dart JNI bindings. + 3. Generate the final pigeon Dart output that wraps and imports those JNI bindings. +- **iOS/macOS (FFI)**: When `swiftOptions.useFfi` is enabled and `swiftOptions.appDirectory` is specified: + 1. Generate the Objective-C compatible Swift bridge and the `ffigen_config.dart` configuration. + 2. Run `ffigen` (via the config script) to parse the generated Objective-C bridge and produce Dart FFI bindings. + 3. Generate the final pigeon Dart output that wraps and imports those FFI bindings. + +### Step 3: iOS/macOS Build System Configuration (FFI) + +Because Dart FFI cannot directly call Swift symbols, the FFI toolchain generates an intermediate Objective-C bridging file (`.m` file) in a subdirectory named `_objc_gen`. + +To compile the generated Objective-C files alongside your Swift code, you must configure your iOS/macOS build systems (both CocoaPods and Swift Package Manager (SwiftPM) are expected to be supported by Flutter plugins): + +#### CocoaPods Configuration +Ensure your `.podspec` file matches both Swift and Objective-C source files: +```ruby +s.source_files = 'Sources/**/*.{swift,m}' +``` +This allows CocoaPods to automatically compile the generated Objective-C bridging files into the framework. + +#### Swift Package Manager (SwiftPM) Configuration +Because Swift and Objective-C files cannot reside within the same SwiftPM target, you must define two separate targets in your `Package.swift` file: +1. An Objective-C target for the generated bridge files (e.g., `my_plugin_objc_gen`). +2. The main Swift target that depends on the Objective-C target. + +Example configuration: + +```swift +targets: [ + .target( + name: "test_plugin_objc_gen", + dependencies: [], + publicHeadersPath: "." + ), + .target( + name: "test_plugin", + dependencies: ["test_plugin_objc_gen"] + ), +] +``` + +--- + +## 5. Migration from Method Channels + +If you are migrating an existing Pigeon plugin from the `MethodChannel`-based model to the Native Interop model, see the [Native Interop Migration Guide](file:///Users/tarrinneal/work/packages/packages/pigeon/native_interop_migration_guide.md) for a complete comparison of the API models and transition examples. diff --git a/packages/pigeon/native_interop_migration_guide.md b/packages/pigeon/native_interop_migration_guide.md new file mode 100644 index 000000000000..5a5b55f5ed21 --- /dev/null +++ b/packages/pigeon/native_interop_migration_guide.md @@ -0,0 +1,67 @@ + +# Pigeon Native Interop Migration Guide + +This guide provides detailed information on migrating from the `MethodChannel`-based Pigeon model to the direct **Native Interop (FFI & JNI)** model. + +For a comprehensive walkthrough on setting up Native Interop from scratch, see the main [Native Interop Guide](file:///Users/tarrinneal/work/packages/packages/pigeon/native_interop_guide.md). + +--- + +## 1. Key Architectural Differences + +| Feature | Method Channels | Native Interop (FFI / JNI) | +| :--- | :--- | :--- | +| **Data Serialization** | Serialized to binary format (`StandardMessageCodec`) | Direct memory mapping or native references | +| **Synchronous Calls** | Asynchronous only | Supports both true synchronous and asynchronous calls | +| **Swift Concurrency** | Callback-based completion handlers | Modern `async/await` syntax | +| **Kotlin Concurrency** | Callback-based interfaces | Kotlin Coroutines (`suspend` functions) | + +--- + +## 2. Migrating Native Code signatures + +If your existing native implementation uses the callback-based completion-handler model, you will need to migrate to modern native concurrency (Kotlin Coroutines or Swift async/await) as part of adopting the Native Interop model. + +### 2.1 Swift Async Methods + +#### Method Channels (Callback Style) + +```swift +func echoAsync(_ value: String, completion: @escaping (Result) -> Void) { + completion(.success(value)) +} +``` + +#### Native Interop (async/await Style) + +```swift +func echoAsync(_ value: String) async throws -> String { + return value +} +``` + +### 2.2 Kotlin Async Methods + +#### Method Channels (Callback Style) + +```kotlin +fun echoAsync(value: String, callback: (Result) -> Unit) { + callback(Result.success(value)) +} +``` + +#### Native Interop (suspend Style) + +```kotlin +suspend fun echoAsync(value: String): String { + return value +} +``` + +--- + +## 3. Dart Client Adaptation + +From the Dart side, the API surface remains largely identical because both models return standard Dart `Future`s for asynchronous calls. However: +- **Synchronous execution**: Host API methods that are synchronous now block the calling thread until completion, bypassing any message loop scheduling latency. +- **Type changes**: Some complex data types or generic collections may have stricter typing requirements at the FFI/JNI boundary compared to the MethodChannel message codec. Refer to the [Native Interop Guide](file:///Users/tarrinneal/work/packages/packages/pigeon/native_interop_guide.md) for handling specific data types. diff --git a/packages/pigeon/pigeons/native_interop_tests.dart b/packages/pigeon/pigeons/native_interop_tests.dart new file mode 100644 index 000000000000..bb6e03f5969f --- /dev/null +++ b/packages/pigeon/pigeons/native_interop_tests.dart @@ -0,0 +1,1902 @@ +// 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, appDirectory: 'platform_tests/test_plugin/example/'), + swiftOptions: SwiftOptions( + useFfi: true, + ffiModuleName: 'test_plugin', + appDirectory: 'platform_tests/test_plugin/example/', + ), + ), +) +enum NativeInteropAnEnum { one, two, three, fortyTwo, fourHundredTwentyTwo } + +// Enums require special logic, having multiple ensures that the logic can be +// replicated without collision. +enum NativeInteropAnotherEnum { justInCase } + +// This exists to show that unused data classes still generate. +class NativeInteropUnusedClass { + NativeInteropUnusedClass({this.aField}); + + Object? aField; +} + +/// A class containing all supported types. +class NativeInteropAllTypes { + NativeInteropAllTypes({ + 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 = NativeInteropAnEnum.one, + this.anotherEnum = NativeInteropAnotherEnum.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; + NativeInteropAnEnum anEnum; + NativeInteropAnotherEnum 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 NativeInteropAllNullableTypes { + NativeInteropAllNullableTypes( + 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; + NativeInteropAnEnum? aNullableEnum; + NativeInteropAnotherEnum? anotherNullableEnum; + String? aNullableString; + Object? aNullableObject; + NativeInteropAllNullableTypes? 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 [NativeInteropAllNullableTypes] class is being used to +/// test Swift classes. +class NativeInteropAllNullableTypesWithoutRecursion { + NativeInteropAllNullableTypesWithoutRecursion( + 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; + NativeInteropAnEnum? aNullableEnum; + NativeInteropAnotherEnum? 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, +/// `NativeInteropAllNullableTypes` is non-nullable here as it is easier to instantiate +/// than `NativeInteropAllTypes` when testing doesn't require both (ie. testing null classes). +class NativeInteropAllClassesWrapper { + NativeInteropAllClassesWrapper( + this.allNullableTypes, + this.allNullableTypesWithoutRecursion, + this.allTypes, + this.classList, + this.nullableClassList, + this.classMap, + this.nullableClassMap, + ); + NativeInteropAllNullableTypes allNullableTypes; + NativeInteropAllNullableTypesWithoutRecursion? allNullableTypesWithoutRecursion; + NativeInteropAllTypes? 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 NativeInteropHostIntegrationCoreApi { + // ========== 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(_:)') + NativeInteropAllTypes echoAllTypes(NativeInteropAllTypes 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(_:)') + NativeInteropAllClassesWrapper echoClassWrapper(NativeInteropAllClassesWrapper wrapper); + + /// Returns the passed enum to test serialization and deserialization. + @ObjCSelector('echoEnum:') + @SwiftFunction('echo(_:)') + NativeInteropAnEnum echoEnum(NativeInteropAnEnum anEnum); + + /// Returns the passed enum to test serialization and deserialization. + @ObjCSelector('echoAnotherEnum:') + @SwiftFunction('echo(_:)') + NativeInteropAnotherEnum echoAnotherEnum(NativeInteropAnotherEnum 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(_:)') + NativeInteropAllNullableTypes? echoAllNullableTypes(NativeInteropAllNullableTypes? everything); + + /// Returns the passed object, to test serialization and deserialization. + @ObjCSelector('echoAllNullableTypesWithoutRecursion:') + @SwiftFunction('echoNullable(_:)') + NativeInteropAllNullableTypesWithoutRecursion? echoAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? everything, + ); + + /// Returns the inner `aString` value from the wrapped object, to test + /// sending of nested objects. + @ObjCSelector('extractNestedNullableStringFrom:') + @SwiftFunction('extractNestedNullableString(from:)') + String? extractNestedNullableString(NativeInteropAllClassesWrapper wrapper); + + /// Returns the inner `aString` value from the wrapped object, to test + /// sending of nested objects. + @ObjCSelector('createNestedObjectWithNullableString:') + @SwiftFunction('createNestedObject(with:)') + NativeInteropAllClassesWrapper createNestedNullableString(String? nullableString); + + // Returns passed in arguments of multiple types. + @ObjCSelector('sendMultipleNullableTypesABool:anInt:aString:') + @SwiftFunction('sendMultipleNullableTypes(aBool:anInt:aString:)') + NativeInteropAllNullableTypes sendMultipleNullableTypes( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ); + + /// Returns passed in arguments of multiple types. + @ObjCSelector('sendMultipleNullableTypesWithoutRecursionABool:anInt:aString:') + @SwiftFunction('sendMultipleNullableTypesWithoutRecursion(aBool:anInt:aString:)') + NativeInteropAllNullableTypesWithoutRecursion 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(_:)') + NativeInteropAnEnum? echoNullableEnum(NativeInteropAnEnum? anEnum); + + @ObjCSelector('echoAnotherNullableEnum:') + @SwiftFunction('echoNullable(_:)') + NativeInteropAnotherEnum? echoAnotherNullableEnum(NativeInteropAnotherEnum? 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(_:)') + NativeInteropAnEnum echoAsyncEnum(NativeInteropAnEnum anEnum); + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAnotherAsyncEnum:') + @SwiftFunction('echoAsync(_:)') + NativeInteropAnotherEnum echoAnotherAsyncEnum(NativeInteropAnotherEnum 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('echoAsyncNativeInteropAllTypes:') + @SwiftFunction('echoAsync(_:)') + NativeInteropAllTypes echoAsyncNativeInteropAllTypes(NativeInteropAllTypes everything); + + /// Returns the passed object, to test serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableNativeInteropAllNullableTypes:') + @SwiftFunction('echoAsync(_:)') + NativeInteropAllNullableTypes? echoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? everything, + ); + + /// Returns the passed object, to test serialization and deserialization. + @async + @ObjCSelector('echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion:') + @SwiftFunction('echoAsync(_:)') + NativeInteropAllNullableTypesWithoutRecursion? + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? 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(_:)') + NativeInteropAnEnum? echoAsyncNullableEnum(NativeInteropAnEnum? anEnum); + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + @async + @ObjCSelector('echoAnotherAsyncNullableEnum:') + @SwiftFunction('echoAsyncNullable(_:)') + NativeInteropAnotherEnum? echoAnotherAsyncNullableEnum(NativeInteropAnotherEnum? anotherEnum); + + void callFlutterNoop(); + + Object? callFlutterThrowError(); + + void callFlutterThrowErrorFromVoid(); + + @ObjCSelector('callFlutterEchoAllTypes:') + @SwiftFunction('callFlutterEcho(_:)') + NativeInteropAllTypes callFlutterEchoNativeInteropAllTypes(NativeInteropAllTypes everything); + + @ObjCSelector('callFlutterEchoAllNullableTypes:') + @SwiftFunction('callFlutterEcho(_:)') + NativeInteropAllNullableTypes? callFlutterEchoNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? everything, + ); + + @ObjCSelector('callFlutterSendMultipleNullableTypesABool:anInt:aString:') + @SwiftFunction('callFlutterSendMultipleNullableTypes(aBool:anInt:aString:)') + NativeInteropAllNullableTypes callFlutterSendMultipleNullableTypes( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ); + + @ObjCSelector('callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion:') + @SwiftFunction('callFlutterEcho(_:)') + NativeInteropAllNullableTypesWithoutRecursion? + callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? everything, + ); + + @ObjCSelector('callFlutterSendMultipleNullableTypesWithoutRecursionABool:anInt:aString:') + @SwiftFunction('callFlutterSendMultipleNullableTypesWithoutRecursion(aBool:anInt:aString:)') + NativeInteropAllNullableTypesWithoutRecursion + 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(_:)') + NativeInteropAnEnum callFlutterEchoEnum(NativeInteropAnEnum anEnum); + + @ObjCSelector('callFlutterEchoAnotherEnum:') + @SwiftFunction('callFlutterEcho(_:)') + NativeInteropAnotherEnum callFlutterEchoNativeInteropAnotherEnum( + NativeInteropAnotherEnum 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(_:)') + NativeInteropAnEnum? callFlutterEchoNullableEnum(NativeInteropAnEnum? anEnum); + + @ObjCSelector('callFlutterEchoAnotherNullableEnum:') + @SwiftFunction('callFlutterEchoNullable(_:)') + NativeInteropAnotherEnum? callFlutterEchoAnotherNullableEnum( + NativeInteropAnotherEnum? anotherEnum, + ); + + @async + void callFlutterNoopAsync(); + + @async + NativeInteropAllTypes callFlutterEchoAsyncNativeInteropAllTypes(NativeInteropAllTypes everything); + + @async + NativeInteropAllNullableTypes? callFlutterEchoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? everything, + ); + + @async + NativeInteropAllNullableTypesWithoutRecursion? + callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? 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 + NativeInteropAnEnum callFlutterEchoAsyncEnum(NativeInteropAnEnum anEnum); + + @async + NativeInteropAnotherEnum callFlutterEchoAnotherAsyncEnum(NativeInteropAnotherEnum 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 + NativeInteropAnEnum? callFlutterEchoAsyncNullableEnum(NativeInteropAnEnum? anEnum); + + @async + NativeInteropAnotherEnum? callFlutterEchoAnotherAsyncNullableEnum( + NativeInteropAnotherEnum? 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 [NativeInteropFlutterIntegrationCoreApi]. + /// + /// Returns the result of whether the flutter call was successful. + @async + bool callFlutterNoopOnBackgroundThread(); + + /// Tests deregistering a Host API natively. + bool testDeregisterHostApi(); + + /// Tests deregistering a Flutter API natively. + bool testDeregisterFlutterApi(); + + /// Registers and immediately deregisters a Host API under [name]. + void registerAndImmediatelyDeregisterHostApi(String name); + + /// Tests that calling a deregistered Flutter API under [name] fails / returns null. + bool testCallDeregisteredFlutterApi(String name); +} + +/// The core interface that the Dart platform_test code implements for host +/// integration tests to call into. +@FlutterApi() +abstract class NativeInteropFlutterIntegrationCoreApi { + /// 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('echoNativeInteropAllTypes:') + @SwiftFunction('echo(_:)') + NativeInteropAllTypes echoNativeInteropAllTypes(NativeInteropAllTypes everything); + + /// Returns the passed object, to test serialization and deserialization. + @ObjCSelector('echoNativeInteropAllNullableTypes:') + @SwiftFunction('echoNullable(_:)') + NativeInteropAllNullableTypes? echoNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? everything, + ); + + /// Returns passed in arguments of multiple types. + /// + /// Tests multiple-arity FlutterApi handling. + @ObjCSelector('sendMultipleNullableTypesABool:anInt:aString:') + @SwiftFunction('sendMultipleNullableTypes(aBool:anInt:aString:)') + NativeInteropAllNullableTypes sendMultipleNullableTypes( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ); + + /// Returns the passed object, to test serialization and deserialization. + @ObjCSelector('echoNativeInteropAllNullableTypesWithoutRecursion:') + @SwiftFunction('echoNullable(_:)') + NativeInteropAllNullableTypesWithoutRecursion? echoNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? everything, + ); + + /// Returns passed in arguments of multiple types. + /// + /// Tests multiple-arity FlutterApi handling. + @ObjCSelector('sendMultipleNullableTypesWithoutRecursionABool:anInt:aString:') + @SwiftFunction('sendMultipleNullableTypesWithoutRecursion(aBool:anInt:aString:)') + NativeInteropAllNullableTypesWithoutRecursion 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(_:)') + NativeInteropAnEnum echoEnum(NativeInteropAnEnum anEnum); + + /// Returns the passed enum to test serialization and deserialization. + @ObjCSelector('echoAnotherEnum:') + @SwiftFunction('echo(_:)') + NativeInteropAnotherEnum echoNativeInteropAnotherEnum(NativeInteropAnotherEnum 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(_:)') + NativeInteropAnEnum? echoNullableEnum(NativeInteropAnEnum? anEnum); + + /// Returns the passed enum to test serialization and deserialization. + @ObjCSelector('echoAnotherNullableEnum:') + @SwiftFunction('echoNullable(_:)') + NativeInteropAnotherEnum? echoAnotherNullableEnum(NativeInteropAnotherEnum? 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 + NativeInteropAllTypes echoAsyncNativeInteropAllTypes(NativeInteropAllTypes everything); + + @async + NativeInteropAllNullableTypes? echoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? everything, + ); + + @async + NativeInteropAllNullableTypesWithoutRecursion? + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? 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 + NativeInteropAnEnum echoAsyncEnum(NativeInteropAnEnum anEnum); + + @async + NativeInteropAnotherEnum echoAnotherAsyncEnum(NativeInteropAnotherEnum 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 + NativeInteropAnEnum? echoAsyncNullableEnum(NativeInteropAnEnum? anEnum); + + @async + NativeInteropAnotherEnum? echoAnotherAsyncNullableEnum(NativeInteropAnotherEnum? anotherEnum); +} diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/settings.gradle.kts b/packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/settings.gradle.kts index 575dbbe6c4c6..a8be9bb7583e 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/settings.gradle.kts +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/settings.gradle.kts @@ -21,7 +21,7 @@ pluginManagement { plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" id("com.android.application") version "9.1.0" apply false - id("org.jetbrains.kotlin.android") version "2.4.0" apply false + id("org.jetbrains.kotlin.android") version "2.3.20" apply false id("com.google.cloud.artifactregistry.gradle-plugin") version "2.2.1" } 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 ebeba5f369c8..b9deff8b2dd4 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,42 @@ dev_dependencies: flutter: uses-material-design: true + +dependency_overrides: + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: 27890daeab690209603a979c7fbb54b22a3c878f + ffigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffigen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + jni: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jni + ref: 27890daeab690209603a979c7fbb54b22a3c878f + jnigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jnigen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + objective_c: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/objective_c + ref: 27890daeab690209603a979c7fbb54b22a3c878f + swift2objc: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swift2objc + ref: 27890daeab690209603a979c7fbb54b22a3c878f + swiftgen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swiftgen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + + 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 92a07df293c6..e605e5060f03 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,4 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter + \ No newline at end of file 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..8ddf0d4f3b76 --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/comparison_benchmarks.dart @@ -0,0 +1,387 @@ +// 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 'native_interop_integration_tests.dart'; +import 'native_interop_test_types.dart' as native_interop_types; +import 'src/generated/core_tests.gen.dart' as core; +import 'src/generated/native_interop_tests.gen.dart' as native_interop; +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 native_interop.NativeInteropHostIntegrationCoreApiForNativeInterop? nativeInteropApi = + native_interop.NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + core.FlutterIntegrationCoreApi.setUp(FlutterApiTestImplementation()); + final nativeInteropRegistrar = native_interop.NativeInteropFlutterIntegrationCoreApiRegistrar(); + nativeInteropRegistrar.register(NativeInteropFlutterIntegrationCoreApiImpl()); + + 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 (nativeInteropApi != null) { + final niStopwatch = Stopwatch()..start(); + nativeInteropApi.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, + (_) => native_interop_types.recursiveNativeInteropAllNullableTypes, + ); + + // 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 (nativeInteropApi != null) { + final niStopwatch = Stopwatch()..start(); + nativeInteropApi.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 (nativeInteropApi != null) { + final niStopwatch = Stopwatch()..start(); + nativeInteropApi.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 (nativeInteropApi != null) { + final niStopwatch = Stopwatch()..start(); + nativeInteropApi.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 (nativeInteropApi != null) { + final niStopwatch = Stopwatch()..start(); + for (var i = 0; i < 200; i++) { + nativeInteropApi.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 (nativeInteropApi != null) { + final niStopwatch = Stopwatch()..start(); + for (var i = 0; i < 200; i++) { + nativeInteropApi.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++) { + nativeInteropApi!.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++) { + nativeInteropApi!.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(); + nativeInteropApi!.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, + (_) => native_interop_types.recursiveNativeInteropAllNullableTypes, + ); + + // 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(); + nativeInteropApi!.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(); + nativeInteropApi!.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(); + nativeInteropApi!.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 (nativeInteropApi == 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) { + testWidgets('FFI list casting overhead micro-benchmark: cast() vs List.from() vs map()', ( + WidgetTester _, + ) async { + if (nativeInteropApi == 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 27a2068871ac..cd0f9abaa8d2 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,10 @@ import 'package:flutter_test/flutter_test.dart'; import 'package:integration_test/integration_test.dart'; import 'generated.dart'; +import 'native_interop_integration_tests.dart' + as ffi_tests + show TargetGenerator, runPigeonNativeInteropIntegrationTests; +import 'proxy_api_integration_tests.dart'; import 'test_types.dart'; /// Possible host languages that test can target. @@ -44,6 +48,15 @@ const Set proxyApiSupportedLanguages = { /// Sets up and runs the integration tests. void runPigeonIntegrationTests(TargetGenerator targetGenerator) { IntegrationTestWidgetsFlutterBinding.ensureInitialized(); + runProxyApiIntegrationTests(targetGenerator); + + if (targetGenerator == TargetGenerator.kotlin || targetGenerator == TargetGenerator.swift) { + ffi_tests.runPigeonNativeInteropIntegrationTests( + targetGenerator == TargetGenerator.kotlin + ? ffi_tests.TargetGenerator.kotlin + : ffi_tests.TargetGenerator.swift, + ); + } group('Host sync API tests', () { testWidgets('basic void->void call works', (WidgetTester _) async { @@ -334,18 +347,112 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(receivedUint8List, sentUint8List); }); - testWidgets('generic Objects serialize and deserialize correctly', (WidgetTester _) async { + 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(); - // 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); }); + 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(); + + final Object receivedMap = await api.echoObject(map); + expect(receivedMap, map); + }); + testWidgets('lists serialize and deserialize correctly', (WidgetTester _) async { final api = HostIntegrationCoreApi(); @@ -353,6 +460,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 { final api = HostIntegrationCoreApi(); @@ -1505,7 +1649,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 { @@ -2056,631 +2200,6 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { }); }); - group('Proxy API Tests', () { - if (!proxyApiSupportedLanguages.contains(targetGenerator)) { - return; - } - - testWidgets('named constructor', (_) async { - final instance = ProxyApiTestClass.namedConstructor( - aBool: true, - anInt: 0, - aDouble: 0.0, - aString: '', - aUint8List: Uint8List(0), - aList: const [], - aMap: const {}, - anEnum: ProxyApiTestEnum.one, - aProxyApi: ProxyApiSuperClass(), - flutterEchoBool: (ProxyApiTestClass instance, bool aBool) => true, - flutterEchoInt: (_, _) => 3, - flutterEchoDouble: (_, _) => 1.0, - flutterEchoString: (_, _) => '', - flutterEchoUint8List: (_, _) => Uint8List(0), - flutterEchoList: (_, _) => [], - flutterEchoProxyApiList: (_, _) => [], - flutterEchoMap: (_, _) => {}, - flutterEchoEnum: (_, _) => ProxyApiTestEnum.one, - flutterEchoProxyApi: (_, _) => ProxyApiSuperClass(), - flutterEchoAsyncString: (_, _) async => '', - flutterEchoProxyApiMap: (_, _) => {}, - ); - // Ensure no error calling method on instance. - await instance.noop(); - }); - - testWidgets('noop', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - await expectLater(api.noop(), completes); - }); - - testWidgets('throwError', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - await expectLater(() => api.throwError(), throwsA(isA())); - }); - - testWidgets('throwErrorFromVoid', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - await expectLater(() => api.throwErrorFromVoid(), throwsA(isA())); - }); - - testWidgets('throwFlutterError', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - await expectLater( - () => api.throwFlutterError(), - throwsA((dynamic e) { - return e is PlatformException && - e.code == 'code' && - e.message == 'message' && - e.details == 'details'; - }), - ); - }); - - testWidgets('echoInt', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - const value = 0; - expect(await api.echoInt(value), value); - }); - - testWidgets('echoDouble', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - const value = 0.0; - expect(await api.echoDouble(value), value); - }); - - testWidgets('echoBool', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - const value = true; - expect(await api.echoBool(value), value); - }); - - testWidgets('echoString', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - const value = 'string'; - expect(await api.echoString(value), value); - }); - - testWidgets('echoUint8List', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - final value = Uint8List(0); - expect(await api.echoUint8List(value), value); - }); - - testWidgets('echoObject', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - const Object value = 'apples'; - expect(await api.echoObject(value), value); - }); - - testWidgets('echoList', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - const List value = [1, 2]; - expect(await api.echoList(value), value); - }); - - testWidgets('echoProxyApiList', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - final value = [ - _createGenericProxyApiTestClass(), - _createGenericProxyApiTestClass(), - ]; - expect(await api.echoProxyApiList(value), value); - }); - - testWidgets('echoMap', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - const value = {'apple': 'pie'}; - expect(await api.echoMap(value), value); - }); - - testWidgets('echoProxyApiMap', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - final value = {'42': _createGenericProxyApiTestClass()}; - expect(await api.echoProxyApiMap(value), value); - }); - - testWidgets('echoEnum', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - const ProxyApiTestEnum value = ProxyApiTestEnum.three; - expect(await api.echoEnum(value), value); - }); - - testWidgets('echoProxyApi', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - final value = ProxyApiSuperClass(); - expect(await api.echoProxyApi(value), value); - }); - - testWidgets('echoNullableInt', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoNullableInt(null), null); - expect(await api.echoNullableInt(1), 1); - }); - - testWidgets('echoNullableDouble', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoNullableDouble(null), null); - expect(await api.echoNullableDouble(1.0), 1.0); - }); - - testWidgets('echoNullableBool', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoNullableBool(null), null); - expect(await api.echoNullableBool(false), false); - }); - - testWidgets('echoNullableString', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoNullableString(null), null); - expect(await api.echoNullableString('aString'), 'aString'); - }); - - testWidgets('echoNullableUint8List', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoNullableUint8List(null), null); - expect(await api.echoNullableUint8List(Uint8List(0)), Uint8List(0)); - }); - - testWidgets('echoNullableObject', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoNullableObject(null), null); - expect(await api.echoNullableObject('aString'), 'aString'); - }); - - testWidgets('echoNullableList', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoNullableList(null), null); - expect(await api.echoNullableList([1]), [1]); - }); - - testWidgets('echoNullableMap', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoNullableMap(null), null); - expect(await api.echoNullableMap({'value': 1}), {'value': 1}); - }); - - testWidgets('echoNullableEnum', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoNullableEnum(null), null); - expect(await api.echoNullableEnum(ProxyApiTestEnum.one), ProxyApiTestEnum.one); - }); - - testWidgets('echoNullableProxyApi', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoNullableProxyApi(null), null); - - final proxyApi = ProxyApiSuperClass(); - expect(await api.echoNullableProxyApi(proxyApi), proxyApi); - }); - - testWidgets('noopAsync', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - await expectLater(api.noopAsync(), completes); - }); - - testWidgets('echoAsyncInt', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - const value = 0; - expect(await api.echoAsyncInt(value), value); - }); - - testWidgets('echoAsyncDouble', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - const value = 0.0; - expect(await api.echoAsyncDouble(value), value); - }); - - testWidgets('echoAsyncBool', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - const value = false; - expect(await api.echoAsyncBool(value), value); - }); - - testWidgets('echoAsyncString', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - const value = 'ping'; - expect(await api.echoAsyncString(value), value); - }); - - testWidgets('echoAsyncUint8List', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - final value = Uint8List(0); - expect(await api.echoAsyncUint8List(value), value); - }); - - testWidgets('echoAsyncObject', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - const Object value = 0; - expect(await api.echoAsyncObject(value), value); - }); - - testWidgets('echoAsyncList', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - const value = ['apple', 'pie']; - expect(await api.echoAsyncList(value), value); - }); - - testWidgets('echoAsyncMap', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - final value = {'something': ProxyApiSuperClass()}; - expect(await api.echoAsyncMap(value), value); - }); - - testWidgets('echoAsyncEnum', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - const ProxyApiTestEnum value = ProxyApiTestEnum.two; - expect(await api.echoAsyncEnum(value), value); - }); - - testWidgets('throwAsyncError', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - await expectLater(() => api.throwAsyncError(), throwsA(isA())); - }); - - testWidgets('throwAsyncErrorFromVoid', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - await expectLater(() => api.throwAsyncErrorFromVoid(), throwsA(isA())); - }); - - testWidgets('throwAsyncFlutterError', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - - await expectLater( - () => api.throwAsyncFlutterError(), - throwsA((dynamic e) { - return e is PlatformException && - e.code == 'code' && - e.message == 'message' && - e.details == 'details'; - }), - ); - }); - - testWidgets('echoAsyncNullableInt', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoAsyncNullableInt(null), null); - expect(await api.echoAsyncNullableInt(1), 1); - }); - - testWidgets('echoAsyncNullableDouble', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoAsyncNullableDouble(null), null); - expect(await api.echoAsyncNullableDouble(2.0), 2.0); - }); - - testWidgets('echoAsyncNullableBool', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoAsyncNullableBool(null), null); - expect(await api.echoAsyncNullableBool(true), true); - }); - - testWidgets('echoAsyncNullableString', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoAsyncNullableString(null), null); - expect(await api.echoAsyncNullableString('aString'), 'aString'); - }); - - testWidgets('echoAsyncNullableUint8List', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoAsyncNullableUint8List(null), null); - expect(await api.echoAsyncNullableUint8List(Uint8List(0)), Uint8List(0)); - }); - - testWidgets('echoAsyncNullableObject', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoAsyncNullableObject(null), null); - expect(await api.echoAsyncNullableObject(1), 1); - }); - - testWidgets('echoAsyncNullableList', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoAsyncNullableList(null), null); - expect(await api.echoAsyncNullableList([1]), [1]); - }); - - testWidgets('echoAsyncNullableMap', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoAsyncNullableMap(null), null); - expect(await api.echoAsyncNullableMap({'banana': 1}), { - 'banana': 1, - }); - }); - - testWidgets('echoAsyncNullableEnum', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass(); - expect(await api.echoAsyncNullableEnum(null), null); - expect(await api.echoAsyncNullableEnum(ProxyApiTestEnum.one), ProxyApiTestEnum.one); - }); - - testWidgets('staticNoop', (_) async { - await expectLater(ProxyApiTestClass.staticNoop(), completes); - }); - - testWidgets('echoStaticString', (_) async { - const value = 'static string'; - expect(await ProxyApiTestClass.echoStaticString(value), value); - }); - - testWidgets('staticAsyncNoop', (_) async { - await expectLater(ProxyApiTestClass.staticAsyncNoop(), completes); - }); - - testWidgets('callFlutterNoop', (_) async { - var called = false; - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterNoop: (ProxyApiTestClass instance) async { - called = true; - }, - ); - - await api.callFlutterNoop(); - expect(called, isTrue); - }); - - testWidgets('callFlutterThrowError', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterThrowError: (_) { - throw FlutterError('this is an error'); - }, - ); - - await expectLater( - api.callFlutterThrowError(), - throwsA( - isA().having( - (PlatformException exception) => exception.message, - 'message', - equals('this is an error'), - ), - ), - ); - }); - - testWidgets('callFlutterThrowErrorFromVoid', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterThrowErrorFromVoid: (_) { - throw FlutterError('this is an error'); - }, - ); - - await expectLater( - api.callFlutterThrowErrorFromVoid(), - throwsA( - isA().having( - (PlatformException exception) => exception.message, - 'message', - equals('this is an error'), - ), - ), - ); - }); - - testWidgets('callFlutterEchoBool', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoBool: (_, bool aBool) => aBool, - ); - - const value = true; - expect(await api.callFlutterEchoBool(value), value); - }); - - testWidgets('callFlutterEchoInt', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoInt: (_, int anInt) => anInt, - ); - - const value = 0; - expect(await api.callFlutterEchoInt(value), value); - }); - - testWidgets('callFlutterEchoDouble', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoDouble: (_, double aDouble) => aDouble, - ); - - const value = 0.0; - expect(await api.callFlutterEchoDouble(value), value); - }); - - testWidgets('callFlutterEchoString', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoString: (_, String aString) => aString, - ); - - const value = 'a string'; - expect(await api.callFlutterEchoString(value), value); - }); - - testWidgets('callFlutterEchoUint8List', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoUint8List: (_, Uint8List aUint8List) => aUint8List, - ); - - final value = Uint8List(0); - expect(await api.callFlutterEchoUint8List(value), value); - }); - - testWidgets('callFlutterEchoList', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoList: (_, List aList) => aList, - ); - - final value = [0, 0.0, true, ProxyApiSuperClass()]; - expect(await api.callFlutterEchoList(value), value); - }); - - testWidgets('callFlutterEchoProxyApiList', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoProxyApiList: (_, List aList) => aList, - ); - - final List value = [_createGenericProxyApiTestClass()]; - expect(await api.callFlutterEchoProxyApiList(value), value); - }); - - testWidgets('callFlutterEchoMap', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoMap: (_, Map aMap) => aMap, - ); - - final value = {'a String': 4}; - expect(await api.callFlutterEchoMap(value), value); - }); - - testWidgets('callFlutterEchoProxyApiMap', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoProxyApiMap: (_, Map aMap) => aMap, - ); - - final value = {'a String': _createGenericProxyApiTestClass()}; - expect(await api.callFlutterEchoProxyApiMap(value), value); - }); - - testWidgets('callFlutterEchoEnum', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoEnum: (_, ProxyApiTestEnum anEnum) => anEnum, - ); - - const ProxyApiTestEnum value = ProxyApiTestEnum.three; - expect(await api.callFlutterEchoEnum(value), value); - }); - - testWidgets('callFlutterEchoProxyApi', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoProxyApi: (_, ProxyApiSuperClass aProxyApi) => aProxyApi, - ); - - final value = ProxyApiSuperClass(); - expect(await api.callFlutterEchoProxyApi(value), value); - }); - - testWidgets('callFlutterEchoNullableBool', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoNullableBool: (_, bool? aBool) => aBool, - ); - expect(await api.callFlutterEchoNullableBool(null), null); - expect(await api.callFlutterEchoNullableBool(true), true); - }); - - testWidgets('callFlutterEchoNullableInt', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoNullableInt: (_, int? anInt) => anInt, - ); - expect(await api.callFlutterEchoNullableInt(null), null); - expect(await api.callFlutterEchoNullableInt(1), 1); - }); - - testWidgets('callFlutterEchoNullableDouble', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoNullableDouble: (_, double? aDouble) => aDouble, - ); - expect(await api.callFlutterEchoNullableDouble(null), null); - expect(await api.callFlutterEchoNullableDouble(1.0), 1.0); - }); - - testWidgets('callFlutterEchoNullableString', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoNullableString: (_, String? aString) => aString, - ); - expect(await api.callFlutterEchoNullableString(null), null); - expect(await api.callFlutterEchoNullableString('aString'), 'aString'); - }); - - testWidgets('callFlutterEchoNullableUint8List', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoNullableUint8List: (_, Uint8List? aUint8List) => aUint8List, - ); - expect(await api.callFlutterEchoNullableUint8List(null), null); - expect(await api.callFlutterEchoNullableUint8List(Uint8List(0)), Uint8List(0)); - }); - - testWidgets('callFlutterEchoNullableList', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoNullableList: (_, List? aList) => aList, - ); - expect(await api.callFlutterEchoNullableList(null), null); - expect(await api.callFlutterEchoNullableList([0]), [0]); - }); - - testWidgets('callFlutterEchoNullableMap', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoNullableMap: (_, Map? aMap) => aMap, - ); - expect(await api.callFlutterEchoNullableMap(null), null); - expect(await api.callFlutterEchoNullableMap({'str': 0}), { - 'str': 0, - }); - }); - - testWidgets('callFlutterEchoNullableEnum', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoNullableEnum: (_, ProxyApiTestEnum? anEnum) => anEnum, - ); - expect(await api.callFlutterEchoNullableEnum(null), null); - expect(await api.callFlutterEchoNullableEnum(ProxyApiTestEnum.two), ProxyApiTestEnum.two); - }); - - testWidgets('callFlutterEchoNullableProxyApi', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoNullableProxyApi: (_, ProxyApiSuperClass? aProxyApi) => aProxyApi, - ); - - expect(await api.callFlutterEchoNullableProxyApi(null), null); - - final proxyApi = ProxyApiSuperClass(); - expect(await api.callFlutterEchoNullableProxyApi(proxyApi), proxyApi); - }); - - testWidgets('callFlutterNoopAsync', (_) async { - var called = false; - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterNoopAsync: (ProxyApiTestClass instance) async { - called = true; - }, - ); - - await api.callFlutterNoopAsync(); - expect(called, isTrue); - }); - - testWidgets('callFlutterEchoAsyncString', (_) async { - final ProxyApiTestClass api = _createGenericProxyApiTestClass( - flutterEchoAsyncString: (_, String aString) async => aString, - ); - - const value = 'a string'; - expect(await api.callFlutterEchoAsyncString(value), value); - }); - }); - group('Flutter API with suffix', () { setUp(() { FlutterSmallApi.setUp(_SmallFlutterApi(), messageChannelSuffix: 'suffixOne'); @@ -2808,7 +2327,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; @@ -3039,88 +2559,3 @@ class _SmallFlutterApi implements FlutterSmallApi { return msg; } } - -ProxyApiTestClass _createGenericProxyApiTestClass({ - void Function(ProxyApiTestClass instance)? flutterNoop, - Object? Function(ProxyApiTestClass instance)? flutterThrowError, - void Function(ProxyApiTestClass instance)? flutterThrowErrorFromVoid, - bool Function(ProxyApiTestClass instance, bool aBool)? flutterEchoBool, - int Function(ProxyApiTestClass instance, int anInt)? flutterEchoInt, - double Function(ProxyApiTestClass instance, double aDouble)? flutterEchoDouble, - String Function(ProxyApiTestClass instance, String aString)? flutterEchoString, - Uint8List Function(ProxyApiTestClass instance, Uint8List aList)? flutterEchoUint8List, - List Function(ProxyApiTestClass instance, List aList)? flutterEchoList, - List Function(ProxyApiTestClass instance, List aList)? - flutterEchoProxyApiList, - Map Function(ProxyApiTestClass instance, Map aMap)? - flutterEchoMap, - Map Function( - ProxyApiTestClass instance, - Map aMap, - )? - flutterEchoProxyApiMap, - ProxyApiTestEnum Function(ProxyApiTestClass instance, ProxyApiTestEnum anEnum)? flutterEchoEnum, - ProxyApiSuperClass Function(ProxyApiTestClass instance, ProxyApiSuperClass aProxyApi)? - flutterEchoProxyApi, - bool? Function(ProxyApiTestClass instance, bool? aBool)? flutterEchoNullableBool, - int? Function(ProxyApiTestClass instance, int? anInt)? flutterEchoNullableInt, - double? Function(ProxyApiTestClass instance, double? aDouble)? flutterEchoNullableDouble, - String? Function(ProxyApiTestClass instance, String? aString)? flutterEchoNullableString, - Uint8List? Function(ProxyApiTestClass instance, Uint8List? aList)? flutterEchoNullableUint8List, - List? Function(ProxyApiTestClass instance, List? aList)? - flutterEchoNullableList, - Map? Function(ProxyApiTestClass instance, Map? aMap)? - flutterEchoNullableMap, - ProxyApiTestEnum? Function(ProxyApiTestClass instance, ProxyApiTestEnum? anEnum)? - flutterEchoNullableEnum, - ProxyApiSuperClass? Function(ProxyApiTestClass instance, ProxyApiSuperClass? aProxyApi)? - flutterEchoNullableProxyApi, - Future Function(ProxyApiTestClass instance)? flutterNoopAsync, - Future Function(ProxyApiTestClass instance, String aString)? flutterEchoAsyncString, -}) { - return ProxyApiTestClass( - aBool: true, - anInt: 0, - aDouble: 0.0, - aString: '', - aUint8List: Uint8List(0), - aList: const [], - aMap: const {}, - anEnum: ProxyApiTestEnum.one, - aProxyApi: ProxyApiSuperClass(), - boolParam: true, - intParam: 0, - doubleParam: 0.0, - stringParam: '', - aUint8ListParam: Uint8List(0), - listParam: const [], - mapParam: const {}, - enumParam: ProxyApiTestEnum.one, - proxyApiParam: ProxyApiSuperClass(), - flutterNoop: flutterNoop, - flutterThrowError: flutterThrowError, - flutterThrowErrorFromVoid: flutterThrowErrorFromVoid, - flutterEchoBool: flutterEchoBool ?? (ProxyApiTestClass instance, bool aBool) => true, - flutterEchoInt: flutterEchoInt ?? (_, _) => 3, - flutterEchoDouble: flutterEchoDouble ?? (_, _) => 1.0, - flutterEchoString: flutterEchoString ?? (_, _) => '', - flutterEchoUint8List: flutterEchoUint8List ?? (_, _) => Uint8List(0), - flutterEchoList: flutterEchoList ?? (_, _) => [], - flutterEchoProxyApiList: flutterEchoProxyApiList ?? (_, _) => [], - flutterEchoMap: flutterEchoMap ?? (_, _) => {}, - flutterEchoEnum: flutterEchoEnum ?? (_, _) => ProxyApiTestEnum.one, - flutterEchoProxyApi: flutterEchoProxyApi ?? (_, _) => ProxyApiSuperClass(), - flutterEchoNullableBool: flutterEchoNullableBool, - flutterEchoNullableInt: flutterEchoNullableInt, - flutterEchoNullableDouble: flutterEchoNullableDouble, - flutterEchoNullableString: flutterEchoNullableString, - flutterEchoNullableUint8List: flutterEchoNullableUint8List, - flutterEchoNullableList: flutterEchoNullableList, - flutterEchoNullableMap: flutterEchoNullableMap, - flutterEchoNullableEnum: flutterEchoNullableEnum, - flutterEchoNullableProxyApi: flutterEchoNullableProxyApi, - flutterNoopAsync: flutterNoopAsync, - flutterEchoAsyncString: flutterEchoAsyncString ?? (_, _) async => '', - flutterEchoProxyApiMap: flutterEchoProxyApiMap ?? (_, _) => {}, - ); -} diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/message.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/message.gen.dart new file mode 100644 index 000000000000..834f12bddca0 --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/message.gen.dart @@ -0,0 +1,451 @@ +// Copyright 2013 The Flutter Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// +// Autogenerated from Pigeon (v26.4.0), 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, omit_local_variable_types, omit_obvious_local_variable_types + +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; + +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; +} + +/// This comment is to test enum documentation comments. +/// +/// This comment also tests multiple line comments. +/// +/// //////////////////////// +/// This comment also tests comments that start with '/' +/// //////////////////////// +enum MessageRequestState { pending, success, failure } + +/// This comment is to test class documentation comments. +/// +/// This comment also tests multiple line comments. +class MessageSearchRequest { + MessageSearchRequest({this.query, this.anInt, this.aBool}); + + /// This comment is to test field documentation comments. + String? query; + + /// This comment is to test field documentation comments. + int? anInt; + + /// This comment is to test field documentation comments. + bool? aBool; + + List _toList() { + return [query, anInt, aBool]; + } + + Object encode() { + return _toList(); + } + + static MessageSearchRequest decode(Object result) { + result as List; + return MessageSearchRequest( + query: result[0] as String?, + anInt: result[1] as int?, + aBool: result[2] as bool?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! MessageSearchRequest || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(query, other.query) && + _deepEquals(anInt, other.anInt) && + _deepEquals(aBool, other.aBool); + } + + @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. +class MessageSearchReply { + MessageSearchReply({this.result, this.error, this.state}); + + /// This comment is to test field documentation comments. + /// + /// This comment also tests multiple line comments. + String? result; + + /// This comment is to test field documentation comments. + String? error; + + /// This comment is to test field documentation comments. + MessageRequestState? state; + + List _toList() { + return [result, error, state]; + } + + Object encode() { + return _toList(); + } + + static MessageSearchReply decode(Object result) { + result as List; + return MessageSearchReply( + result: result[0] as String?, + error: result[1] as String?, + state: result[2] as MessageRequestState?, + ); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! MessageSearchReply || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(result, other.result) && + _deepEquals(error, other.error) && + _deepEquals(state, other.state); + } + + @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. +class MessageNested { + MessageNested({this.request}); + + /// This comment is to test field documentation comments. + MessageSearchRequest? request; + + List _toList() { + return [request]; + } + + Object encode() { + return _toList(); + } + + static MessageNested decode(Object result) { + result as List; + return MessageNested(request: result[0] as MessageSearchRequest?); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! MessageNested || other.runtimeType != runtimeType) { + return false; + } + if (identical(this, other)) { + return true; + } + return _deepEquals(request, other.request); + } + + @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 MessageRequestState) { + buffer.putUint8(129); + writeValue(buffer, value.index); + } else if (value is MessageSearchRequest) { + buffer.putUint8(130); + writeValue(buffer, value.encode()); + } else if (value is MessageSearchReply) { + buffer.putUint8(131); + writeValue(buffer, value.encode()); + } else if (value is MessageNested) { + buffer.putUint8(132); + 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 : MessageRequestState.values[value]; + case 130: + return MessageSearchRequest.decode(readValue(buffer)!); + case 131: + return MessageSearchReply.decode(readValue(buffer)!); + case 132: + return MessageNested.decode(readValue(buffer)!); + default: + return super.readValueOfType(type, buffer); + } + } +} + +/// This comment is to test api documentation comments. +/// +/// 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 + /// BinaryMessenger will be used which routes to the host platform. + MessageApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty + ? '.$messageChannelSuffix' + : ''; + + final BinaryMessenger? pigeonVar_binaryMessenger; + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + /// This comment is to test documentation comments. + /// + /// This comment also tests multiple line comments. + Future initialize() async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.shared_test_plugin_code.MessageApi.initialize$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); + } + + /// This comment is to test method documentation comments. + Future search(MessageSearchRequest request) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.shared_test_plugin_code.MessageApi.search$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([request]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as MessageSearchReply; + } +} + +/// 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 + /// BinaryMessenger will be used which routes to the host platform. + MessageNestedApi({BinaryMessenger? binaryMessenger, String messageChannelSuffix = ''}) + : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty + ? '.$messageChannelSuffix' + : ''; + + final BinaryMessenger? pigeonVar_binaryMessenger; + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + /// This comment is to test method documentation comments. + /// + /// This comment also tests multiple line comments. + Future search(MessageNested nested) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.shared_test_plugin_code.MessageNestedApi.search$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([nested]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return pigeonVar_replyValue! as MessageSearchReply; + } +} + +/// This comment is to test api documentation comments. +abstract class MessageFlutterSearchApi { + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + /// This comment is to test method documentation comments. + MessageSearchReply search(MessageSearchRequest request); + + static void setUp( + MessageFlutterSearchApi? api, { + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) { + messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.shared_test_plugin_code.MessageFlutterSearchApi.search$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 MessageSearchRequest arg_request = args[0]! as MessageSearchRequest; + try { + final MessageSearchReply output = api.search(arg_request); + return wrapResponse(result: output); + } on PlatformException catch (e) { + return wrapResponse(error: e); + } catch (e) { + return wrapResponse( + error: PlatformException(code: 'error', message: e.toString()), + ); + } + }); + } + } + } +} diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/native_interop_integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/native_interop_integration_tests.dart new file mode 100644 index 000000000000..afd2cef67a0d --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/native_interop_integration_tests.dart @@ -0,0 +1,3446 @@ +// 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 'native_interop_test_types.dart'; +import 'src/generated/native_interop_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 runPigeonNativeInteropIntegrationTests(TargetGenerator targetGenerator) { + if (targetGenerator != TargetGenerator.kotlin && targetGenerator != TargetGenerator.swift) { + return; + } + + group('FFI/JNIHost sync API tests', () { + testWidgets('basic void->void call works', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + try { + api!.noop(); + } catch (e) { + fail(e.toString()); + } + }); + + testWidgets('all datatypes serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NativeInteropAllTypes echoObject = api!.echoAllTypes(genericNativeInteropAllTypes); + expect(echoObject, genericNativeInteropAllTypes); + }); + + testWidgets('all nullable datatypes serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NativeInteropAllNullableTypes? echoObject = api!.echoAllNullableTypes( + recursiveNativeInteropAllNullableTypes, + ); + + expect(echoObject, recursiveNativeInteropAllNullableTypes); + }); + + testWidgets('all null datatypes serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final allTypesNull = NativeInteropAllNullableTypes(); + + final NativeInteropAllNullableTypes? echoNullFilledClass = api!.echoAllNullableTypes( + allTypesNull, + ); + expect(allTypesNull, echoNullFilledClass); + }); + + testWidgets('Classes with list of null serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final listTypes = NativeInteropAllNullableTypes(list: ['String', null]); + + final NativeInteropAllNullableTypes? echoNullFilledClass = api!.echoAllNullableTypes( + listTypes, + ); + + expect(listTypes, echoNullFilledClass); + }); + + testWidgets('Classes with map of null serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final listTypes = NativeInteropAllNullableTypes( + map: {'String': 'string', 'null': null}, + ); + + final NativeInteropAllNullableTypes? echoNullFilledClass = api!.echoAllNullableTypes( + listTypes, + ); + + expect(listTypes, echoNullFilledClass); + }); + + testWidgets('all nullable datatypes without recursion serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NativeInteropAllNullableTypesWithoutRecursion? echoObject = api! + .echoAllNullableTypesWithoutRecursion( + genericNativeInteropAllNullableTypesWithoutRecursion, + ); + + expect(echoObject, genericNativeInteropAllNullableTypesWithoutRecursion); + }); + + testWidgets('all null datatypes without recursion serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final allTypesNull = NativeInteropAllNullableTypesWithoutRecursion(); + + final NativeInteropAllNullableTypesWithoutRecursion? echoNullFilledClass = api! + .echoAllNullableTypesWithoutRecursion(allTypesNull); + expect(allTypesNull, echoNullFilledClass); + }); + + testWidgets('Classes without recursion with list of null serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final listTypes = NativeInteropAllNullableTypesWithoutRecursion( + list: ['String', null], + ); + + final NativeInteropAllNullableTypesWithoutRecursion? echoNullFilledClass = api! + .echoAllNullableTypesWithoutRecursion(listTypes); + + expect(listTypes, echoNullFilledClass); + }); + + testWidgets('Classes without recursion with map of null serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final listTypes = NativeInteropAllNullableTypesWithoutRecursion( + map: {'String': 'string', 'null': null}, + ); + + final NativeInteropAllNullableTypesWithoutRecursion? echoNullFilledClass = api! + .echoAllNullableTypesWithoutRecursion(listTypes); + + expect(listTypes, echoNullFilledClass); + }); + + testWidgets('errors are returned correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + expect(() async { + api!.throwError(); + }, throwsA(isA())); + }); + + testWidgets('errors are returned from void methods correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + expect(() async { + api!.throwErrorFromVoid(); + }, throwsA(isA())); + }); + + testWidgets('flutter errors are returned correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final NativeInteropAllClassesWrapper classWrapper = classWrapperMaker(); + final String? receivedString = api!.extractNestedNullableString(classWrapper); + expect(receivedString, classWrapper.allNullableTypes.aNullableString); + }); + + testWidgets('nested objects can be received correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const sentString = 'Some string'; + final NativeInteropAllClassesWrapper receivedObject = api!.createNestedNullableString( + sentString, + ); + expect(receivedObject.allNullableTypes.aNullableString, sentString); + }); + + testWidgets('nested classes can serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final NativeInteropAllClassesWrapper classWrapper = classWrapperMaker(); + final NativeInteropAllClassesWrapper receivedClassWrapper = api!.echoClassWrapper( + classWrapper, + ); + + expect(classWrapper, receivedClassWrapper); + }); + + testWidgets('nested null classes can serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final NativeInteropAllClassesWrapper classWrapper = classWrapperMaker(); + + classWrapper.allTypes = null; + + final NativeInteropAllClassesWrapper receivedClassWrapper = api!.echoClassWrapper( + classWrapper, + ); + expect(classWrapper, receivedClassWrapper); + }); + + testWidgets('Arguments of multiple types serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + const aNullableString = 'this is a String'; + const aNullableBool = false; + const int aNullableInt = regularInt; + + final NativeInteropAllNullableTypesWithoutRecursion 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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NativeInteropAllNullableTypes 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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + const aNullableString = 'this is a String'; + const aNullableBool = false; + const int aNullableInt = regularInt; + + final NativeInteropAllNullableTypesWithoutRecursion 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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NativeInteropAllNullableTypesWithoutRecursion 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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + const int sentInt = regularInt; + final int receivedInt = api!.echoInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Int64 serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const int sentInt = biggerThanBigInt; + final int receivedInt = api!.echoInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Doubles serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const sentDouble = 2.0694; + final double receivedDouble = api!.echoDouble(sentDouble); + expect(receivedDouble, sentDouble); + }); + + testWidgets('booleans serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + const sentString = 'default'; + final String receivedString = api!.echoString(sentString); + expect(receivedString, sentString); + }); + + testWidgets('Uint8List serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Object receivedClass = api!.echoObject( + genericNativeInteropAllNullableTypesWithoutRecursion, + ); + expect(receivedClass, genericNativeInteropAllNullableTypesWithoutRecursion); + }); + + testWidgets('Float32List as generic Objects serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Object receivedList = api!.echoObject(list); + expect(receivedList, list); + }); + + testWidgets('Map as generic Objects serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Object receivedMap = api!.echoObject(map); + expect(receivedMap, map); + }); + + testWidgets('lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoList(list); + expect(listEquals(echoObject, list), true); + }); + + testWidgets('string lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoStringList(stringList); + expect(listEquals(echoObject, stringList), true); + }); + + testWidgets('int lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoIntList(intList); + expect(listEquals(echoObject, intList), true); + }); + + testWidgets('double lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoDoubleList(doubleList); + expect(listEquals(echoObject, doubleList), true); + }); + + testWidgets('bool lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoBoolList(boolList); + expect(listEquals(echoObject, boolList), true); + }); + + testWidgets('enum lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoEnumList(enumList); + expect(listEquals(echoObject, enumList), true); + }); + + testWidgets('class lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoClassList( + allNullableTypesList, + ); + for (final (int index, NativeInteropAllNullableTypes? value) in echoObject.indexed) { + expect(value, allNullableTypesList[index]); + } + }); + + testWidgets('NonNull enum lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoNonNullEnumList(nonNullEnumList); + expect(listEquals(echoObject, nonNullEnumList), true); + }); + + testWidgets('NonNull class lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = api!.echoNonNullClassList( + nonNullNativeInteropAllNullableTypesList, + ); + for (final (int index, NativeInteropAllNullableTypes value) in echoObject.indexed) { + expect(value, nonNullNativeInteropAllNullableTypesList[index]); + } + }); + + testWidgets('maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = api!.echoMap(map); + expect(mapEquals(echoObject, map), true); + }); + + testWidgets('string maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = api!.echoStringMap(stringMap); + expect(mapEquals(echoObject, stringMap), true); + }); + + testWidgets('int maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = api!.echoIntMap(intMap); + expect(mapEquals(echoObject, intMap), true); + }); + + testWidgets('enum maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = api!.echoEnumMap(enumMap); + expect(mapEquals(echoObject, enumMap), true); + }); + + testWidgets('class maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = api!.echoNonNullStringMap(nonNullStringMap); + expect(mapEquals(echoObject, nonNullStringMap), true); + }); + + testWidgets('NonNull int maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = api!.echoNonNullIntMap(nonNullIntMap); + expect(mapEquals(echoObject, nonNullIntMap), true); + }); + + testWidgets('NonNull enum maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = api!.echoNonNullEnumMap( + nonNullEnumMap, + ); + expect(mapEquals(echoObject, nonNullEnumMap), true); + }); + + testWidgets('NonNull class maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = api!.echoNonNullClassMap( + nonNullNativeInteropAllNullableTypesMap, + ); + for (final MapEntry entry in echoObject.entries) { + expect(entry.value, nonNullNativeInteropAllNullableTypesMap[entry.key]); + } + }); + + testWidgets('enums serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NativeInteropAnEnum sentEnum = NativeInteropAnEnum.two; + final NativeInteropAnEnum receivedEnum = api!.echoEnum(sentEnum); + expect(receivedEnum, sentEnum); + }); + + testWidgets('enums serialize and deserialize correctly (again)', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NativeInteropAnotherEnum sentEnum = NativeInteropAnotherEnum.justInCase; + final NativeInteropAnotherEnum receivedEnum = api!.echoAnotherEnum(sentEnum); + expect(receivedEnum, sentEnum); + }); + + testWidgets('multi word enums serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NativeInteropAnEnum sentEnum = NativeInteropAnEnum.fortyTwo; + final NativeInteropAnEnum receivedEnum = api!.echoEnum(sentEnum); + expect(receivedEnum, sentEnum); + }); + + testWidgets('required named parameter', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const sentDouble = 3.15; + final double receivedDouble = api!.echoOptionalDefaultDouble(sentDouble); + expect(receivedDouble, sentDouble); + }); + + testWidgets('named default parameter no arg', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const int sentInt = regularInt; + final int? receivedInt = api!.echoNullableInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Nullable Int64 serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const int sentInt = biggerThanBigInt; + final int? receivedInt = api!.echoNullableInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Null Ints serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final int? receivedNullInt = api!.echoNullableInt(null); + expect(receivedNullInt, null); + }); + + testWidgets('Nullable Doubles serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const sentDouble = 2.0694; + final double? receivedDouble = api!.echoNullableDouble(sentDouble); + expect(receivedDouble, sentDouble); + }); + + testWidgets('Null Doubles serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final double? receivedNullDouble = api!.echoNullableDouble(null); + expect(receivedNullDouble, null); + }); + + testWidgets('Nullable booleans serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const bool? sentBool = null; + final bool? receivedBool = api!.echoNullableBool(sentBool); + expect(receivedBool, sentBool); + }); + + testWidgets('Nullable strings serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final String? receivedNullString = api!.echoNullableString(null); + expect(receivedNullString, null); + }); + + testWidgets('Nullable Uint8List serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Uint8List? receivedNullUint8List = api!.echoNullableUint8List(null); + expect(receivedNullUint8List, null); + }); + + testWidgets('generic nullable Objects serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Object? receivedNullObject = api!.echoNullableObject(null); + expect(receivedNullObject, null); + }); + + testWidgets('nullable lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = api!.echoNullableList(list); + expect(listEquals(echoObject, list), true); + }); + + testWidgets('nullable enum lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = api!.echoNullableEnumList(enumList); + expect(listEquals(echoObject, enumList), true); + }); + + testWidgets('nullable lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = api!.echoNullableClassList( + allNullableTypesList, + ); + for (final (int index, NativeInteropAllNullableTypes? value) in echoObject!.indexed) { + expect(value, allNullableTypesList[index]); + } + }); + + testWidgets('nullable NonNull enum lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = api!.echoNullableNonNullEnumList( + nonNullEnumList, + ); + expect(listEquals(echoObject, nonNullEnumList), true); + }); + + testWidgets('nullable NonNull lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = api!.echoNullableClassList( + nonNullNativeInteropAllNullableTypesList, + ); + for (final (int index, NativeInteropAllNullableTypes? value) in echoObject!.indexed) { + expect(value, nonNullNativeInteropAllNullableTypesList[index]); + } + }); + + testWidgets('nullable maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = api!.echoNullableMap(map); + expect(mapEquals(echoObject, map), true); + }); + + testWidgets('nullable string maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = api!.echoNullableStringMap(stringMap); + expect(mapEquals(echoObject, stringMap), true); + }); + + testWidgets('nullable int maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = api!.echoNullableIntMap(intMap); + expect(mapEquals(echoObject, intMap), true); + }); + + testWidgets('nullable enum maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = api!.echoNullableEnumMap( + enumMap, + ); + expect(mapEquals(echoObject, enumMap), true); + }); + + testWidgets('nullable class maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = api!.echoNullableNonNullStringMap(nonNullStringMap); + expect(mapEquals(echoObject, nonNullStringMap), true); + }); + + testWidgets('nullable NonNull int maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = api!.echoNullableNonNullIntMap(nonNullIntMap); + expect(mapEquals(echoObject, nonNullIntMap), true); + }); + + testWidgets('nullable NonNull enum maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = api! + .echoNullableNonNullEnumMap(nonNullEnumMap); + expect(mapEquals(echoObject, nonNullEnumMap), true); + }); + + testWidgets('nullable NonNull class maps serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = api! + .echoNullableNonNullClassMap(nonNullNativeInteropAllNullableTypesMap); + for (final MapEntry entry in echoObject!.entries) { + expect(entry.value, nonNullNativeInteropAllNullableTypesMap[entry.key]); + } + }); + + testWidgets('nullable enums serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NativeInteropAnEnum sentEnum = NativeInteropAnEnum.three; + final NativeInteropAnEnum? echoEnum = api!.echoNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('nullable enums serialize and deserialize correctly (again)', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NativeInteropAnotherEnum sentEnum = NativeInteropAnotherEnum.justInCase; + final NativeInteropAnotherEnum? echoEnum = api!.echoAnotherNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('multi word nullable enums serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NativeInteropAnEnum sentEnum = NativeInteropAnEnum.fourHundredTwentyTwo; + final NativeInteropAnEnum? echoEnum = api!.echoNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('null lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = api!.echoNullableList(null); + expect(listEquals(echoObject, null), true); + }); + + testWidgets('null maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Map? echoObject = api!.echoNullableMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null string maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Map? echoObject = api!.echoNullableStringMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null int maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Map? echoObject = api!.echoNullableIntMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null enums serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NativeInteropAnEnum? sentEnum = null; + final NativeInteropAnEnum? echoEnum = api!.echoNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('null enums serialize and deserialize correctly (again)', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NativeInteropAnotherEnum? sentEnum = null; + final NativeInteropAnotherEnum? echoEnum = api!.echoAnotherNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('null classes serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NativeInteropAllNullableTypesWithoutRecursion? echoObject = api! + .echoAllNullableTypesWithoutRecursion(null); + + expect(echoObject, isNull); + }); + + testWidgets('null Int32List serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Int32List? receivedInt32List = api!.echoNullableInt32List(null); + expect(receivedInt32List, isNull); + }); + + testWidgets('null Int64List serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Int64List? receivedInt64List = api!.echoNullableInt64List(null); + expect(receivedInt64List, isNull); + }); + + testWidgets('null Float64List serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Float64List? receivedFloat64List = api!.echoNullableFloat64List(null); + expect(receivedFloat64List, isNull); + }); + + testWidgets('optional nullable parameter', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const int sentInt = regularInt; + final int? receivedInt = api!.echoOptionalNullableInt(sentInt); + expect(receivedInt, sentInt); + }); + + testWidgets('Null optional nullable parameter', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final int? receivedNullInt = api!.echoOptionalNullableInt(); + expect(receivedNullInt, null); + }); + + testWidgets('named nullable parameter', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final String? receivedNullString = api!.echoNamedNullableString(); + expect(receivedNullString, null); + }); + }); + + group('Host async API tests', () { + testWidgets('basic void->void call works', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + expect(api!.noopAsync(), completes); + }); + + testWidgets('async errors are returned from non void methods correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + expect(() async { + await api!.throwAsyncError(); + }, throwsA(isA())); + }); + + testWidgets('async errors are returned from void methods correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + expect(() async { + await api!.throwAsyncErrorFromVoid(); + }, throwsA(isA())); + }); + + testWidgets('async flutter errors are returned from non void methods correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NativeInteropAllTypes echoObject = await api!.echoAsyncNativeInteropAllTypes( + genericNativeInteropAllTypes, + ); + + expect(echoObject, genericNativeInteropAllTypes); + }); + + testWidgets('all nullable async datatypes serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NativeInteropAllNullableTypes? echoObject = await api! + .echoAsyncNullableNativeInteropAllNullableTypes(recursiveNativeInteropAllNullableTypes); + + expect(echoObject, recursiveNativeInteropAllNullableTypes); + }); + + testWidgets('all null datatypes async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final allTypesNull = NativeInteropAllNullableTypes(); + + final NativeInteropAllNullableTypes? echoNullFilledClass = await api! + .echoAsyncNullableNativeInteropAllNullableTypes(allTypesNull); + expect(echoNullFilledClass, allTypesNull); + }); + + testWidgets( + 'all nullable async datatypes without recursion serialize and deserialize correctly', + (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final NativeInteropAllNullableTypesWithoutRecursion? echoObject = await api! + .echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + genericNativeInteropAllNullableTypesWithoutRecursion, + ); + + expect(echoObject, genericNativeInteropAllNullableTypesWithoutRecursion); + }, + ); + + testWidgets('all null datatypes without recursion async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final allTypesNull = NativeInteropAllNullableTypesWithoutRecursion(); + + final NativeInteropAllNullableTypesWithoutRecursion? echoNullFilledClass = await api! + .echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion(allTypesNull); + expect(echoNullFilledClass, allTypesNull); + }); + + testWidgets('Int async serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = await api!.echoAsyncList(list); + expect(listEquals(echoObject, list), true); + }); + + testWidgets('enum lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = await api!.echoAsyncEnumList(enumList); + expect(listEquals(echoObject, enumList), true); + }); + + testWidgets('class lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List echoObject = await api!.echoAsyncClassList( + allNullableTypesList, + ); + for (final (int index, NativeInteropAllNullableTypes? value) in echoObject.indexed) { + expect(value, allNullableTypesList[index]); + } + }); + + testWidgets('maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = await api!.echoAsyncMap(map); + expect(mapEquals(echoObject, map), true); + }); + + testWidgets('string maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = await api!.echoAsyncStringMap(stringMap); + expect(mapEquals(echoObject, stringMap), true); + }); + + testWidgets('int maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = await api!.echoAsyncIntMap(intMap); + expect(mapEquals(echoObject, intMap), true); + }); + + testWidgets('enum maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map echoObject = await api! + .echoAsyncEnumMap(enumMap); + expect(mapEquals(echoObject, enumMap), true); + }); + + testWidgets('class maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NativeInteropAnEnum sentEnum = NativeInteropAnEnum.three; + final NativeInteropAnEnum echoEnum = await api!.echoAsyncEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('enums serialize and deserialize correctly (again)', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NativeInteropAnotherEnum sentEnum = NativeInteropAnotherEnum.justInCase; + final NativeInteropAnotherEnum echoEnum = await api!.echoAnotherAsyncEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('multi word enums serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NativeInteropAnEnum sentEnum = NativeInteropAnEnum.fourHundredTwentyTwo; + final NativeInteropAnEnum echoEnum = await api!.echoAsyncEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('nullable Int async serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = await api!.echoAsyncNullableList(list); + expect(listEquals(echoObject, list), true); + }); + + testWidgets('nullable enum lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = await api!.echoAsyncNullableEnumList(enumList); + expect(listEquals(echoObject, enumList), true); + }); + + testWidgets('nullable class lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = await api! + .echoAsyncNullableClassList(allNullableTypesList); + for (final (int index, NativeInteropAllNullableTypes? value) in echoObject!.indexed) { + expect(value, allNullableTypesList[index]); + } + }); + + testWidgets('nullable maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = await api!.echoAsyncNullableMap(map); + expect(mapEquals(echoObject, map), true); + }); + + testWidgets('nullable string maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = await api!.echoAsyncNullableStringMap(stringMap); + expect(mapEquals(echoObject, stringMap), true); + }); + + testWidgets('nullable int maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = await api!.echoAsyncNullableIntMap(intMap); + expect(mapEquals(echoObject, intMap), true); + }); + + testWidgets('nullable enum maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Map? echoObject = await api! + .echoAsyncNullableEnumMap(enumMap); + expect(mapEquals(echoObject, enumMap), true); + }); + + testWidgets('nullable class maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NativeInteropAnEnum sentEnum = NativeInteropAnEnum.three; + final NativeInteropAnEnum? echoEnum = await api!.echoAsyncNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('nullable enums serialize and deserialize correctly (again)', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NativeInteropAnotherEnum sentEnum = NativeInteropAnotherEnum.justInCase; + final NativeInteropAnotherEnum? echoEnum = await api!.echoAnotherAsyncNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('nullable enums serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NativeInteropAnEnum sentEnum = NativeInteropAnEnum.fortyTwo; + final NativeInteropAnEnum? echoEnum = await api!.echoAsyncNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('null Ints async serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final int? receivedInt = await api!.echoAsyncNullableInt(null); + expect(receivedInt, null); + }); + + testWidgets('null Doubles async serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final double? receivedDouble = await api!.echoAsyncNullableDouble(null); + expect(receivedDouble, null); + }); + + testWidgets('null booleans async serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final bool? receivedBool = await api!.echoAsyncNullableBool(null); + expect(receivedBool, null); + }); + + testWidgets('null strings async serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final String? echoObject = await api!.echoAsyncNullableString(null); + expect(echoObject, null); + }); + + testWidgets('null Uint8List async serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Uint8List? receivedUint8List = await api!.echoAsyncNullableUint8List(null); + expect(receivedUint8List, null); + }); + + testWidgets('null generic Objects async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Object? receivedString = await api!.echoAsyncNullableObject(null); + expect(receivedString, null); + }); + + testWidgets('null lists serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final List? echoObject = await api!.echoAsyncNullableList(null); + expect(listEquals(echoObject, null), true); + }); + + testWidgets('null maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Map? echoObject = await api!.echoAsyncNullableMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null string maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Map? echoObject = await api!.echoAsyncNullableStringMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null int maps serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + final Map? echoObject = await api!.echoAsyncNullableIntMap(null); + expect(mapEquals(echoObject, null), true); + }); + + testWidgets('null enums serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NativeInteropAnEnum? sentEnum = null; + final NativeInteropAnEnum? echoEnum = await api!.echoAsyncNullableEnum(null); + expect(echoEnum, sentEnum); + }); + + testWidgets('null enums serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + + const NativeInteropAnotherEnum? sentEnum = null; + final NativeInteropAnotherEnum? echoEnum = await api!.echoAnotherAsyncNullableEnum(null); + expect(echoEnum, sentEnum); + }); + + testWidgets('null Int32List async serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Int32List? receivedInt32List = await api!.echoAsyncNullableInt32List(null); + expect(receivedInt32List, isNull); + }); + + testWidgets('null Int64List async serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final Int64List? receivedInt64List = await api!.echoAsyncNullableInt64List(null); + expect(receivedInt64List, isNull); + }); + + testWidgets('null Float64List async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropHostSmallApiForAndroid? apiWithSuffixOne = + // NativeInteropHostSmallApiForAndroid.getInstance(channelName: 'suffixOne'); + // final NativeInteropHostSmallApiForAndroid? apiWithSuffixTwo = + // NativeInteropHostSmallApiForAndroid.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 NativeInteropHostSmallApiForAndroid? apiWithSuffixOne = + // NativeInteropHostSmallApiForAndroid.getInstance( + // channelName: 'suffixWithNoHost'); + // await apiWithSuffixOne!.echo(sentString); + // } on ArgumentError catch (e) { + // expect(e.message, contains('suffixWithNoHost')); + // } + // try { + // final NativeInteropHostSmallApiForAndroid? apiWithSuffixTwo = + // NativeInteropHostSmallApiForAndroid.getInstance( + // channelName: 'suffixWithoutHost'); + // await apiWithSuffixTwo!.echo(sentString); + // } on ArgumentError catch (e) { + // expect(e.message, contains('suffixWithoutHost')); + // } + // }); + // }); + + group('Flutter Api', () { + final registrar = NativeInteropFlutterIntegrationCoreApiRegistrar(); + + final NativeInteropFlutterIntegrationCoreApi flutterApi = registrar.register( + NativeInteropFlutterIntegrationCoreApiImpl(), + ); + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.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 NativeInteropAllTypes echoObject = api.callFlutterEchoNativeInteropAllTypes( + genericNativeInteropAllTypes, + ); + + expect(echoObject, genericNativeInteropAllTypes); + }); + + testWidgets('all nullable datatypes serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropAllNullableTypes? echoObject = api + .callFlutterEchoNativeInteropAllNullableTypes(recursiveNativeInteropAllNullableTypes); + + expect(echoObject, recursiveNativeInteropAllNullableTypes); + }); + + testWidgets('all nullable datatypes without recursion serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropAllNullableTypesWithoutRecursion? echoObject = api + .callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion( + genericNativeInteropAllNullableTypesWithoutRecursion, + ); + + expect(echoObject, genericNativeInteropAllNullableTypesWithoutRecursion); + }); + + 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 NativeInteropAllNullableTypes 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 NativeInteropAllNullableTypes 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 NativeInteropAllNullableTypesWithoutRecursion 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 NativeInteropAllNullableTypesWithoutRecursion 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, NativeInteropAllNullableTypes? 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( + nonNullNativeInteropAllNullableTypesList, + ); + for (final (int index, NativeInteropAllNullableTypes? value) in echoObject.indexed) { + expect(value, nonNullNativeInteropAllNullableTypesList[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( + nonNullNativeInteropAllNullableTypesMap, + ); + for (final MapEntry entry in echoObject.entries) { + expect(entry.value, nonNullNativeInteropAllNullableTypesMap[entry.key]); + } + }); + + testWidgets('enums serialize and deserialize correctly', (WidgetTester _) async { + const NativeInteropAnEnum sentEnum = NativeInteropAnEnum.three; + final NativeInteropAnEnum echoEnum = api.callFlutterEchoEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('enums serialize and deserialize correctly (again)', (WidgetTester _) async { + const NativeInteropAnotherEnum sentEnum = NativeInteropAnotherEnum.justInCase; + final NativeInteropAnotherEnum echoEnum = api.callFlutterEchoNativeInteropAnotherEnum( + sentEnum, + ); + expect(echoEnum, sentEnum); + }); + + testWidgets('multi word enums serialize and deserialize correctly', (WidgetTester _) async { + const NativeInteropAnEnum sentEnum = NativeInteropAnEnum.fortyTwo; + final NativeInteropAnEnum 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, NativeInteropAllNullableTypes? 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(nonNullNativeInteropAllNullableTypesList); + for (final (int index, NativeInteropAllNullableTypes? value) in echoObject!.indexed) { + expect(value, nonNullNativeInteropAllNullableTypesList[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(nonNullNativeInteropAllNullableTypesMap); + for (final MapEntry entry in echoObject!.entries) { + expect(entry.value, nonNullNativeInteropAllNullableTypesMap[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 NativeInteropAnEnum sentEnum = NativeInteropAnEnum.three; + final NativeInteropAnEnum? echoEnum = api.callFlutterEchoNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('nullable enums serialize and deserialize correctly (again)', ( + WidgetTester _, + ) async { + const NativeInteropAnotherEnum sentEnum = NativeInteropAnotherEnum.justInCase; + final NativeInteropAnotherEnum? echoEnum = api.callFlutterEchoAnotherNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('multi word nullable enums serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const NativeInteropAnEnum sentEnum = NativeInteropAnEnum.fourHundredTwentyTwo; + final NativeInteropAnEnum? echoEnum = api.callFlutterEchoNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('null enums serialize and deserialize correctly', (WidgetTester _) async { + const NativeInteropAnEnum? sentEnum = null; + final NativeInteropAnEnum? echoEnum = api.callFlutterEchoNullableEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('null enums serialize and deserialize correctly (again)', (WidgetTester _) async { + const NativeInteropAnotherEnum? sentEnum = null; + final NativeInteropAnotherEnum? 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 NativeInteropAllTypes echoObject = await api.callFlutterEchoAsyncNativeInteropAllTypes( + genericNativeInteropAllTypes, + ); + expect(echoObject, genericNativeInteropAllTypes); + }); + + testWidgets('all nullable async datatypes serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropAllNullableTypes? echoObject = await api + .callFlutterEchoAsyncNullableNativeInteropAllNullableTypes( + recursiveNativeInteropAllNullableTypes, + ); + expect(echoObject, recursiveNativeInteropAllNullableTypes); + }); + + 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, NativeInteropAllNullableTypes? 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(nonNullNativeInteropAllNullableTypesList); + for (final (int index, NativeInteropAllNullableTypes? value) in echoObject.indexed) { + expect(value, nonNullNativeInteropAllNullableTypesList[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 NativeInteropAnEnum sentEnum = NativeInteropAnEnum.three; + final NativeInteropAnEnum 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, NativeInteropAllNullableTypes? 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 NativeInteropAnEnum sentEnum = NativeInteropAnEnum.three; + final NativeInteropAnEnum? 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(nonNullNativeInteropAllNullableTypesList); + for (final (int index, NativeInteropAllNullableTypes? value) in echoObject!.indexed) { + expect(value, nonNullNativeInteropAllNullableTypesList[index]); + } + }); + + testWidgets('null enums async serialize and deserialize correctly', (WidgetTester _) async { + final NativeInteropAnEnum? echoEnum = await api.callFlutterEchoAsyncNullableEnum(null); + expect(echoEnum, null); + }); + + testWidgets('another enum async serialize and deserialize correctly', (WidgetTester _) async { + const NativeInteropAnotherEnum sentEnum = NativeInteropAnotherEnum.justInCase; + final NativeInteropAnotherEnum echoEnum = await api.callFlutterEchoAnotherAsyncEnum(sentEnum); + expect(echoEnum, sentEnum); + }); + + testWidgets('another nullable enum async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + const NativeInteropAnotherEnum sentEnum = NativeInteropAnotherEnum.justInCase; + final NativeInteropAnotherEnum? echoEnum = await api.callFlutterEchoAnotherAsyncNullableEnum( + sentEnum, + ); + expect(echoEnum, sentEnum); + }); + + testWidgets('another null enum async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropAnotherEnum? echoEnum = await api.callFlutterEchoAnotherAsyncNullableEnum( + null, + ); + expect(echoEnum, null); + }); + + testWidgets('NativeInteropAllTypes async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropAllTypes echoObject = await api.callFlutterEchoAsyncNativeInteropAllTypes( + genericNativeInteropAllTypes, + ); + expect(echoObject, genericNativeInteropAllTypes); + }); + + testWidgets('NativeInteropAllNullableTypes async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropAllNullableTypes? echoObject = await api + .callFlutterEchoAsyncNullableNativeInteropAllNullableTypes( + genericNativeInteropAllNullableTypes, + ); + expect(echoObject, genericNativeInteropAllNullableTypes); + }); + + testWidgets('null NativeInteropAllNullableTypes async serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final NativeInteropAllNullableTypes? echoObject = await api + .callFlutterEchoAsyncNullableNativeInteropAllNullableTypes(null); + expect(echoObject, null); + }); + + testWidgets( + 'NativeInteropAllNullableTypesWithoutRecursion async serialize and deserialize correctly', + (WidgetTester _) async { + final NativeInteropAllNullableTypesWithoutRecursion? echoObject = await api + .callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + genericNativeInteropAllNullableTypesWithoutRecursion, + ); + expect(echoObject, genericNativeInteropAllNullableTypesWithoutRecursion); + }, + ); + + testWidgets( + 'null NativeInteropAllNullableTypesWithoutRecursion async serialize and deserialize correctly', + (WidgetTester _) async { + final NativeInteropAllNullableTypesWithoutRecursion? echoObject = await api + .callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion(null); + expect(echoObject, null); + }, + ); + }); + + group('Deregistration tests', () { + testWidgets('host API deregistration works natively', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final bool success = api!.testDeregisterHostApi(); + expect(success, true); + }); + + testWidgets('flutter API deregistration works natively', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final bool success = api!.testDeregisterFlutterApi(); + expect(success, true); + }); + + testWidgets('calling a deregistered Host API fails as expected', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + const instanceName = 'deregisteredHostInstanceTest'; + api!.registerAndImmediatelyDeregisterHostApi(instanceName); + + final NativeInteropHostIntegrationCoreApiForNativeInterop? deregisteredApi = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance( + channelName: instanceName, + ); + expect(() => deregisteredApi!.noop(), throwsA(anything)); + }); + + testWidgets('calling a deregistered Flutter API fails on native lookup', ( + WidgetTester _, + ) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + const instanceName = 'deregisteredFlutterInstanceTest'; + final bool success = api!.testCallDeregisteredFlutterApi(instanceName); + expect(success, true); + }); + }); + + group('Threading tests', () { + testWidgets('default calls land on main thread', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final bool isMainThread = api!.defaultIsMainThread(); + expect(isMainThread, true); + }); + + testWidgets('calls back to flutter can be made on background thread', (WidgetTester _) async { + final NativeInteropHostIntegrationCoreApiForNativeInterop? api = + NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + final bool success = await api!.callFlutterNoopOnBackgroundThread(); + expect(success, true); + }); + }); + + runComparisonBenchmarks(targetGenerator); +} + +/// Implementation of the Flutter API for Native Interop. +class NativeInteropFlutterIntegrationCoreApiImpl extends NativeInteropFlutterIntegrationCoreApi { + @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 + NativeInteropAnotherEnum? echoAnotherNullableEnum(NativeInteropAnotherEnum? 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 echoAsyncNativeInteropAllTypes( + NativeInteropAllTypes everything, + ) async { + return everything; + } + + @override + Future echoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? everything, + ) async { + return everything; + } + + @override + Future + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? 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(NativeInteropAnEnum anEnum) async { + return anEnum; + } + + @override + Future echoAnotherAsyncEnum( + NativeInteropAnotherEnum 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(NativeInteropAnEnum? anEnum) async { + return anEnum; + } + + @override + Future echoAnotherAsyncNullableEnum( + NativeInteropAnotherEnum? 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 + NativeInteropAnEnum echoEnum(NativeInteropAnEnum 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 + NativeInteropAllNullableTypes? echoNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? everything, + ) { + return everything; + } + + @override + NativeInteropAllNullableTypesWithoutRecursion? echoNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? everything, + ) { + return everything; + } + + @override + NativeInteropAllTypes echoNativeInteropAllTypes(NativeInteropAllTypes everything) { + return everything; + } + + @override + NativeInteropAnotherEnum echoNativeInteropAnotherEnum(NativeInteropAnotherEnum 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 + NativeInteropAnEnum? echoNullableEnum(NativeInteropAnEnum? 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 + NativeInteropAllNullableTypes sendMultipleNullableTypes( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ) { + return NativeInteropAllNullableTypes( + aNullableBool: aNullableBool, + aNullableInt: aNullableInt, + aNullableString: aNullableString, + ); + } + + @override + NativeInteropAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ) { + return NativeInteropAllNullableTypesWithoutRecursion( + 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/native_interop_test_types.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/native_interop_test_types.dart new file mode 100644 index 000000000000..2781bc99bec3 --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/native_interop_test_types.dart @@ -0,0 +1,391 @@ +// 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/native_interop_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 = [ + NativeInteropAnEnum.one, + NativeInteropAnEnum.two, + NativeInteropAnEnum.three, + NativeInteropAnEnum.fortyTwo, + NativeInteropAnEnum.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 = + { + NativeInteropAnEnum.one: NativeInteropAnEnum.one, + NativeInteropAnEnum.two: NativeInteropAnEnum.two, + NativeInteropAnEnum.three: NativeInteropAnEnum.three, + NativeInteropAnEnum.fortyTwo: NativeInteropAnEnum.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 = [ + NativeInteropAnEnum.one, + NativeInteropAnEnum.two, + NativeInteropAnEnum.three, + NativeInteropAnEnum.fortyTwo, + NativeInteropAnEnum.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 = + { + NativeInteropAnEnum.one: NativeInteropAnEnum.one, + NativeInteropAnEnum.two: NativeInteropAnEnum.two, + NativeInteropAnEnum.three: NativeInteropAnEnum.three, + NativeInteropAnEnum.fortyTwo: NativeInteropAnEnum.fortyTwo, + NativeInteropAnEnum.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 NativeInteropAllNullableTypesWithoutRecursion +genericNativeInteropAllNullableTypesWithoutRecursion = + NativeInteropAllNullableTypesWithoutRecursion( + 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: NativeInteropAnEnum.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 = + [ + genericNativeInteropAllNullableTypesWithoutRecursion, + NativeInteropAllNullableTypesWithoutRecursion(), + null, + ]; + +final Map allNullableTypesWithoutRecursionMap = + { + 0: genericNativeInteropAllNullableTypesWithoutRecursion, + 1: NativeInteropAllNullableTypesWithoutRecursion(), + 2: null, + }; + +final NativeInteropAllTypes genericNativeInteropAllTypes = NativeInteropAllTypes( + 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: NativeInteropAnEnum.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 = [ + genericNativeInteropAllTypes, + null, +]; + +final Map allTypesClassMap = { + 0: genericNativeInteropAllTypes, + 1: null, +}; + +final NativeInteropAllNullableTypes genericNativeInteropAllNullableTypes = + NativeInteropAllNullableTypes( + 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: NativeInteropAnEnum.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 nonNullNativeInteropAllNullableTypesList = + [ + genericNativeInteropAllNullableTypes, + NativeInteropAllNullableTypes(), + ]; + +final Map nonNullNativeInteropAllNullableTypesMap = + { + 0: genericNativeInteropAllNullableTypes, + 1: NativeInteropAllNullableTypes(), + }; + +final List +nonNullNativeInteropAllNullableTypesWithoutRecursionList = + [ + genericNativeInteropAllNullableTypesWithoutRecursion, + NativeInteropAllNullableTypesWithoutRecursion(), + ]; + +final Map +nonNullNativeInteropAllNullableTypesWithoutRecursionMap = + { + 0: genericNativeInteropAllNullableTypesWithoutRecursion, + 1: NativeInteropAllNullableTypesWithoutRecursion(), + }; + +final List allNullableTypesList = [ + genericNativeInteropAllNullableTypes, + NativeInteropAllNullableTypes(), + null, +]; + +final Map allNullableTypesMap = + { + 0: genericNativeInteropAllNullableTypes, + 1: NativeInteropAllNullableTypes(), + 2: null, + }; + +final NativeInteropAllNullableTypes recursiveNativeInteropAllNullableTypes = + NativeInteropAllNullableTypes( + 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: NativeInteropAnEnum.fourHundredTwentyTwo, + aNullableObject: 0, + allNullableTypes: genericNativeInteropAllNullableTypes, + 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, + ); + +NativeInteropAllClassesWrapper classWrapperMaker() { + return NativeInteropAllClassesWrapper( + allNullableTypes: recursiveNativeInteropAllNullableTypes, + allNullableTypesWithoutRecursion: genericNativeInteropAllNullableTypesWithoutRecursion, + allTypes: genericNativeInteropAllTypes, + classList: allTypesClassList, + classMap: allTypesClassMap, + nullableClassList: allNullableTypesWithoutRecursionList, + nullableClassMap: allNullableTypesWithoutRecursionMap, + ); +} diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/proxy_api_integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/proxy_api_integration_tests.dart new file mode 100644 index 000000000000..e52e8a64b88b --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/proxy_api_integration_tests.dart @@ -0,0 +1,712 @@ +// 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 'generated.dart'; +import 'integration_tests.dart' show TargetGenerator, proxyApiSupportedLanguages; + +/// Runs the Proxy API integration tests. + +void runProxyApiIntegrationTests(TargetGenerator targetGenerator) { + group('Proxy API Tests', () { + if (!proxyApiSupportedLanguages.contains(targetGenerator)) { + return; + } + + testWidgets('named constructor', (_) async { + final instance = ProxyApiTestClass.namedConstructor( + aBool: true, + anInt: 0, + aDouble: 0.0, + aString: '', + aUint8List: Uint8List(0), + aList: const [], + aMap: const {}, + anEnum: ProxyApiTestEnum.one, + aProxyApi: ProxyApiSuperClass(), + flutterEchoBool: (ProxyApiTestClass instance, bool aBool) => true, + flutterEchoInt: (_, _) => 3, + flutterEchoDouble: (_, _) => 1.0, + flutterEchoString: (_, _) => '', + flutterEchoUint8List: (_, _) => Uint8List(0), + flutterEchoList: (_, _) => [], + flutterEchoProxyApiList: (_, _) => [], + flutterEchoMap: (_, _) => {}, + flutterEchoEnum: (_, _) => ProxyApiTestEnum.one, + flutterEchoProxyApi: (_, _) => ProxyApiSuperClass(), + flutterEchoAsyncString: (_, _) async => '', + flutterEchoProxyApiMap: (_, _) => {}, + ); + // Ensure no error calling method on instance. + await instance.noop(); + }); + + testWidgets('noop', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + await expectLater(api.noop(), completes); + }); + + testWidgets('throwError', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + await expectLater(() => api.throwError(), throwsA(isA())); + }); + + testWidgets('throwErrorFromVoid', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + await expectLater(() => api.throwErrorFromVoid(), throwsA(isA())); + }); + + testWidgets('throwFlutterError', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + await expectLater( + () => api.throwFlutterError(), + throwsA((dynamic e) { + return e is PlatformException && + e.code == 'code' && + e.message == 'message' && + e.details == 'details'; + }), + ); + }); + + testWidgets('echoInt', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + const value = 0; + expect(await api.echoInt(value), value); + }); + + testWidgets('echoDouble', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + const value = 0.0; + expect(await api.echoDouble(value), value); + }); + + testWidgets('echoBool', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + const value = true; + expect(await api.echoBool(value), value); + }); + + testWidgets('echoString', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + const value = 'string'; + expect(await api.echoString(value), value); + }); + + testWidgets('echoUint8List', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + final value = Uint8List(0); + expect(await api.echoUint8List(value), value); + }); + + testWidgets('echoObject', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + const Object value = 'apples'; + expect(await api.echoObject(value), value); + }); + + testWidgets('echoList', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + const List value = [1, 2]; + expect(await api.echoList(value), value); + }); + + testWidgets('echoProxyApiList', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + final value = [ + _createGenericProxyApiTestClass(), + _createGenericProxyApiTestClass(), + ]; + expect(await api.echoProxyApiList(value), value); + }); + + testWidgets('echoMap', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + const value = {'apple': 'pie'}; + expect(await api.echoMap(value), value); + }); + + testWidgets('echoProxyApiMap', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + final value = {'42': _createGenericProxyApiTestClass()}; + expect(await api.echoProxyApiMap(value), value); + }); + + testWidgets('echoEnum', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + const ProxyApiTestEnum value = ProxyApiTestEnum.three; + expect(await api.echoEnum(value), value); + }); + + testWidgets('echoProxyApi', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + final value = ProxyApiSuperClass(); + expect(await api.echoProxyApi(value), value); + }); + + testWidgets('echoNullableInt', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoNullableInt(null), null); + expect(await api.echoNullableInt(1), 1); + }); + + testWidgets('echoNullableDouble', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoNullableDouble(null), null); + expect(await api.echoNullableDouble(1.0), 1.0); + }); + + testWidgets('echoNullableBool', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoNullableBool(null), null); + expect(await api.echoNullableBool(false), false); + }); + + testWidgets('echoNullableString', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoNullableString(null), null); + expect(await api.echoNullableString('aString'), 'aString'); + }); + + testWidgets('echoNullableUint8List', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoNullableUint8List(null), null); + expect(await api.echoNullableUint8List(Uint8List(0)), Uint8List(0)); + }); + + testWidgets('echoNullableObject', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoNullableObject(null), null); + expect(await api.echoNullableObject('aString'), 'aString'); + }); + + testWidgets('echoNullableList', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoNullableList(null), null); + expect(await api.echoNullableList([1]), [1]); + }); + + testWidgets('echoNullableMap', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoNullableMap(null), null); + expect(await api.echoNullableMap({'value': 1}), {'value': 1}); + }); + + testWidgets('echoNullableEnum', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoNullableEnum(null), null); + expect(await api.echoNullableEnum(ProxyApiTestEnum.one), ProxyApiTestEnum.one); + }); + + testWidgets('echoNullableProxyApi', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoNullableProxyApi(null), null); + + final proxyApi = ProxyApiSuperClass(); + expect(await api.echoNullableProxyApi(proxyApi), proxyApi); + }); + + testWidgets('noopAsync', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + await expectLater(api.noopAsync(), completes); + }); + + testWidgets('echoAsyncInt', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + const value = 0; + expect(await api.echoAsyncInt(value), value); + }); + + testWidgets('echoAsyncDouble', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + const value = 0.0; + expect(await api.echoAsyncDouble(value), value); + }); + + testWidgets('echoAsyncBool', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + const value = false; + expect(await api.echoAsyncBool(value), value); + }); + + testWidgets('echoAsyncString', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + const value = 'ping'; + expect(await api.echoAsyncString(value), value); + }); + + testWidgets('echoAsyncUint8List', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + final value = Uint8List(0); + expect(await api.echoAsyncUint8List(value), value); + }); + + testWidgets('echoAsyncObject', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + const Object value = 0; + expect(await api.echoAsyncObject(value), value); + }); + + testWidgets('echoAsyncList', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + const value = ['apple', 'pie']; + expect(await api.echoAsyncList(value), value); + }); + + testWidgets('echoAsyncMap', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + final value = {'something': ProxyApiSuperClass()}; + expect(await api.echoAsyncMap(value), value); + }); + + testWidgets('echoAsyncEnum', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + const ProxyApiTestEnum value = ProxyApiTestEnum.two; + expect(await api.echoAsyncEnum(value), value); + }); + + testWidgets('throwAsyncError', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + await expectLater(() => api.throwAsyncError(), throwsA(isA())); + }); + + testWidgets('throwAsyncErrorFromVoid', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + await expectLater(() => api.throwAsyncErrorFromVoid(), throwsA(isA())); + }); + + testWidgets('throwAsyncFlutterError', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + + await expectLater( + () => api.throwAsyncFlutterError(), + throwsA((dynamic e) { + return e is PlatformException && + e.code == 'code' && + e.message == 'message' && + e.details == 'details'; + }), + ); + }); + + testWidgets('echoAsyncNullableInt', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoAsyncNullableInt(null), null); + expect(await api.echoAsyncNullableInt(1), 1); + }); + + testWidgets('echoAsyncNullableDouble', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoAsyncNullableDouble(null), null); + expect(await api.echoAsyncNullableDouble(2.0), 2.0); + }); + + testWidgets('echoAsyncNullableBool', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoAsyncNullableBool(null), null); + expect(await api.echoAsyncNullableBool(true), true); + }); + + testWidgets('echoAsyncNullableString', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoAsyncNullableString(null), null); + expect(await api.echoAsyncNullableString('aString'), 'aString'); + }); + + testWidgets('echoAsyncNullableUint8List', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoAsyncNullableUint8List(null), null); + expect(await api.echoAsyncNullableUint8List(Uint8List(0)), Uint8List(0)); + }); + + testWidgets('echoAsyncNullableObject', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoAsyncNullableObject(null), null); + expect(await api.echoAsyncNullableObject(1), 1); + }); + + testWidgets('echoAsyncNullableList', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoAsyncNullableList(null), null); + expect(await api.echoAsyncNullableList([1]), [1]); + }); + + testWidgets('echoAsyncNullableMap', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoAsyncNullableMap(null), null); + expect(await api.echoAsyncNullableMap({'banana': 1}), { + 'banana': 1, + }); + }); + + testWidgets('echoAsyncNullableEnum', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass(); + expect(await api.echoAsyncNullableEnum(null), null); + expect(await api.echoAsyncNullableEnum(ProxyApiTestEnum.one), ProxyApiTestEnum.one); + }); + + testWidgets('staticNoop', (_) async { + await expectLater(ProxyApiTestClass.staticNoop(), completes); + }); + + testWidgets('echoStaticString', (_) async { + const value = 'static string'; + expect(await ProxyApiTestClass.echoStaticString(value), value); + }); + + testWidgets('staticAsyncNoop', (_) async { + await expectLater(ProxyApiTestClass.staticAsyncNoop(), completes); + }); + + testWidgets('callFlutterNoop', (_) async { + var called = false; + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterNoop: (ProxyApiTestClass instance) async { + called = true; + }, + ); + + await api.callFlutterNoop(); + expect(called, isTrue); + }); + + testWidgets('callFlutterThrowError', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterThrowError: (_) { + throw FlutterError('this is an error'); + }, + ); + + await expectLater( + api.callFlutterThrowError(), + throwsA( + isA().having( + (PlatformException exception) => exception.message, + 'message', + equals('this is an error'), + ), + ), + ); + }); + + testWidgets('callFlutterThrowErrorFromVoid', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterThrowErrorFromVoid: (_) { + throw FlutterError('this is an error'); + }, + ); + + await expectLater( + api.callFlutterThrowErrorFromVoid(), + throwsA( + isA().having( + (PlatformException exception) => exception.message, + 'message', + equals('this is an error'), + ), + ), + ); + }); + + testWidgets('callFlutterEchoBool', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoBool: (_, bool aBool) => aBool, + ); + + const value = true; + expect(await api.callFlutterEchoBool(value), value); + }); + + testWidgets('callFlutterEchoInt', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoInt: (_, int anInt) => anInt, + ); + + const value = 0; + expect(await api.callFlutterEchoInt(value), value); + }); + + testWidgets('callFlutterEchoDouble', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoDouble: (_, double aDouble) => aDouble, + ); + + const value = 0.0; + expect(await api.callFlutterEchoDouble(value), value); + }); + + testWidgets('callFlutterEchoString', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoString: (_, String aString) => aString, + ); + + const value = 'a string'; + expect(await api.callFlutterEchoString(value), value); + }); + + testWidgets('callFlutterEchoUint8List', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoUint8List: (_, Uint8List aUint8List) => aUint8List, + ); + + final value = Uint8List(0); + expect(await api.callFlutterEchoUint8List(value), value); + }); + + testWidgets('callFlutterEchoList', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoList: (_, List aList) => aList, + ); + + final value = [0, 0.0, true, ProxyApiSuperClass()]; + expect(await api.callFlutterEchoList(value), value); + }); + + testWidgets('callFlutterEchoProxyApiList', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoProxyApiList: (_, List aList) => aList, + ); + + final List value = [_createGenericProxyApiTestClass()]; + expect(await api.callFlutterEchoProxyApiList(value), value); + }); + + testWidgets('callFlutterEchoMap', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoMap: (_, Map aMap) => aMap, + ); + + final value = {'a String': 4}; + expect(await api.callFlutterEchoMap(value), value); + }); + + testWidgets('callFlutterEchoProxyApiMap', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoProxyApiMap: (_, Map aMap) => aMap, + ); + + final value = {'a String': _createGenericProxyApiTestClass()}; + expect(await api.callFlutterEchoProxyApiMap(value), value); + }); + + testWidgets('callFlutterEchoEnum', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoEnum: (_, ProxyApiTestEnum anEnum) => anEnum, + ); + + const ProxyApiTestEnum value = ProxyApiTestEnum.three; + expect(await api.callFlutterEchoEnum(value), value); + }); + + testWidgets('callFlutterEchoProxyApi', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoProxyApi: (_, ProxyApiSuperClass aProxyApi) => aProxyApi, + ); + + final value = ProxyApiSuperClass(); + expect(await api.callFlutterEchoProxyApi(value), value); + }); + + testWidgets('callFlutterEchoNullableBool', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoNullableBool: (_, bool? aBool) => aBool, + ); + expect(await api.callFlutterEchoNullableBool(null), null); + expect(await api.callFlutterEchoNullableBool(true), true); + }); + + testWidgets('callFlutterEchoNullableInt', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoNullableInt: (_, int? anInt) => anInt, + ); + expect(await api.callFlutterEchoNullableInt(null), null); + expect(await api.callFlutterEchoNullableInt(1), 1); + }); + + testWidgets('callFlutterEchoNullableDouble', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoNullableDouble: (_, double? aDouble) => aDouble, + ); + expect(await api.callFlutterEchoNullableDouble(null), null); + expect(await api.callFlutterEchoNullableDouble(1.0), 1.0); + }); + + testWidgets('callFlutterEchoNullableString', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoNullableString: (_, String? aString) => aString, + ); + expect(await api.callFlutterEchoNullableString(null), null); + expect(await api.callFlutterEchoNullableString('aString'), 'aString'); + }); + + testWidgets('callFlutterEchoNullableUint8List', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoNullableUint8List: (_, Uint8List? aUint8List) => aUint8List, + ); + expect(await api.callFlutterEchoNullableUint8List(null), null); + expect(await api.callFlutterEchoNullableUint8List(Uint8List(0)), Uint8List(0)); + }); + + testWidgets('callFlutterEchoNullableList', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoNullableList: (_, List? aList) => aList, + ); + expect(await api.callFlutterEchoNullableList(null), null); + expect(await api.callFlutterEchoNullableList([0]), [0]); + }); + + testWidgets('callFlutterEchoNullableMap', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoNullableMap: (_, Map? aMap) => aMap, + ); + expect(await api.callFlutterEchoNullableMap(null), null); + expect(await api.callFlutterEchoNullableMap({'str': 0}), { + 'str': 0, + }); + }); + + testWidgets('callFlutterEchoNullableEnum', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoNullableEnum: (_, ProxyApiTestEnum? anEnum) => anEnum, + ); + expect(await api.callFlutterEchoNullableEnum(null), null); + expect(await api.callFlutterEchoNullableEnum(ProxyApiTestEnum.two), ProxyApiTestEnum.two); + }); + + testWidgets('callFlutterEchoNullableProxyApi', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoNullableProxyApi: (_, ProxyApiSuperClass? aProxyApi) => aProxyApi, + ); + + expect(await api.callFlutterEchoNullableProxyApi(null), null); + + final proxyApi = ProxyApiSuperClass(); + expect(await api.callFlutterEchoNullableProxyApi(proxyApi), proxyApi); + }); + + testWidgets('callFlutterNoopAsync', (_) async { + var called = false; + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterNoopAsync: (ProxyApiTestClass instance) async { + called = true; + }, + ); + + await api.callFlutterNoopAsync(); + expect(called, isTrue); + }); + + testWidgets('callFlutterEchoAsyncString', (_) async { + final ProxyApiTestClass api = _createGenericProxyApiTestClass( + flutterEchoAsyncString: (_, String aString) async => aString, + ); + + const value = 'a string'; + expect(await api.callFlutterEchoAsyncString(value), value); + }); + }); +} + +ProxyApiTestClass _createGenericProxyApiTestClass({ + bool Function(ProxyApiTestClass, bool)? flutterEchoBool, + int Function(ProxyApiTestClass, int)? flutterEchoInt, + double Function(ProxyApiTestClass, double)? flutterEchoDouble, + String Function(ProxyApiTestClass, String)? flutterEchoString, + Uint8List Function(ProxyApiTestClass, Uint8List)? flutterEchoUint8List, + List Function(ProxyApiTestClass, List)? flutterEchoList, + List Function(ProxyApiTestClass, List)? + flutterEchoProxyApiList, + Map Function(ProxyApiTestClass, Map)? flutterEchoMap, + ProxyApiTestEnum Function(ProxyApiTestClass, ProxyApiTestEnum)? flutterEchoEnum, + ProxyApiSuperClass Function(ProxyApiTestClass, ProxyApiSuperClass)? flutterEchoProxyApi, + Future Function(ProxyApiTestClass, String)? flutterEchoAsyncString, + Map Function(ProxyApiTestClass, Map)? + flutterEchoProxyApiMap, + bool? Function(ProxyApiTestClass, bool?)? flutterEchoNullableBool, + int? Function(ProxyApiTestClass, int?)? flutterEchoNullableInt, + double? Function(ProxyApiTestClass, double?)? flutterEchoNullableDouble, + String? Function(ProxyApiTestClass, String?)? flutterEchoNullableString, + Uint8List? Function(ProxyApiTestClass, Uint8List?)? flutterEchoNullableUint8List, + List? Function(ProxyApiTestClass, List?)? flutterEchoNullableList, + Map? Function(ProxyApiTestClass, Map?)? + flutterEchoNullableMap, + ProxyApiTestEnum? Function(ProxyApiTestClass, ProxyApiTestEnum?)? flutterEchoNullableEnum, + ProxyApiSuperClass? Function(ProxyApiTestClass, ProxyApiSuperClass?)? flutterEchoNullableProxyApi, + Future Function(ProxyApiTestClass)? flutterNoopAsync, + Future Function(ProxyApiTestClass)? flutterNoop, + void Function(ProxyApiTestClass)? flutterThrowError, + void Function(ProxyApiTestClass)? flutterThrowErrorFromVoid, +}) { + return ProxyApiTestClass.namedConstructor( + aBool: true, + anInt: 0, + aDouble: 0.0, + aString: '', + aUint8List: Uint8List(0), + aList: const [], + aMap: const {}, + anEnum: ProxyApiTestEnum.one, + aProxyApi: ProxyApiSuperClass(), + flutterEchoBool: flutterEchoBool ?? (ProxyApiTestClass instance, bool aBool) => aBool, + flutterEchoInt: flutterEchoInt ?? (_, int anInt) => anInt, + flutterEchoDouble: flutterEchoDouble ?? (_, double aDouble) => aDouble, + flutterEchoString: flutterEchoString ?? (_, String aString) => aString, + flutterEchoUint8List: flutterEchoUint8List ?? (_, Uint8List aUint8List) => aUint8List, + flutterEchoList: flutterEchoList ?? (_, List aList) => aList, + flutterEchoProxyApiList: + flutterEchoProxyApiList ?? (_, List aList) => aList, + flutterEchoMap: flutterEchoMap ?? (_, Map aMap) => aMap, + flutterEchoEnum: flutterEchoEnum ?? (_, ProxyApiTestEnum anEnum) => anEnum, + flutterEchoProxyApi: flutterEchoProxyApi ?? (_, ProxyApiSuperClass aProxyApi) => aProxyApi, + flutterEchoAsyncString: flutterEchoAsyncString ?? (_, String aString) async => aString, + flutterEchoProxyApiMap: + flutterEchoProxyApiMap ?? (_, Map aMap) => aMap, + flutterEchoNullableBool: flutterEchoNullableBool ?? (_, bool? aBool) => aBool, + flutterEchoNullableInt: flutterEchoNullableInt ?? (_, int? anInt) => anInt, + flutterEchoNullableDouble: flutterEchoNullableDouble ?? (_, double? aDouble) => aDouble, + flutterEchoNullableString: flutterEchoNullableString ?? (_, String? aString) => aString, + flutterEchoNullableUint8List: + flutterEchoNullableUint8List ?? (_, Uint8List? aUint8List) => aUint8List, + flutterEchoNullableList: flutterEchoNullableList ?? (_, List? aList) => aList, + flutterEchoNullableMap: flutterEchoNullableMap ?? (_, Map? aMap) => aMap, + flutterEchoNullableEnum: flutterEchoNullableEnum ?? (_, ProxyApiTestEnum? anEnum) => anEnum, + flutterEchoNullableProxyApi: + flutterEchoNullableProxyApi ?? (_, ProxyApiSuperClass? aProxyApi) => aProxyApi, + flutterNoopAsync: flutterNoopAsync ?? (_) async {}, + flutterNoop: flutterNoop ?? (_) async {}, + flutterThrowError: flutterThrowError ?? (_) => null, + flutterThrowErrorFromVoid: flutterThrowErrorFromVoid ?? (_) {}, + ); +} 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 1fb7bb6fb76a..3896438893ef 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 @@ -1056,8 +1056,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; @@ -5790,8 +5790,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; @@ -5821,8 +5821,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 e06bdaca4009..d755ae539bdd 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 @@ -208,8 +208,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/flutter_unittests.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/flutter_unittests.gen.dart index 9ce02d4a3b71..fb3ef8cd1fe5 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 @@ -311,8 +311,8 @@ class Api { 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 bbe6644cda6b..41d6e72484ba 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 @@ -326,8 +326,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; @@ -380,8 +380,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 1e0649ef40fd..7e3a7616e329 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 @@ -78,8 +78,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/native_interop_tests.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/native_interop_tests.gen.dart new file mode 100644 index 000000000000..2dc4259c68f0 --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/native_interop_tests.gen.dart @@ -0,0 +1,22789 @@ +// 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, omit_local_variable_types, omit_obvious_local_variable_types + +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 './native_interop_tests.gen.ffi.dart' as ffi_bridge; +import './native_interop_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.NativeInteropUnusedClass.type, + )) { + return NativeInteropUnusedClass.fromJni(value.as(jni_bridge.NativeInteropUnusedClass.type)); + } else if (value.isA(jni_bridge.NativeInteropAllTypes.type)) { + return NativeInteropAllTypes.fromJni(value.as(jni_bridge.NativeInteropAllTypes.type)); + } else if (value.isA( + jni_bridge.NativeInteropAllNullableTypes.type, + )) { + return NativeInteropAllNullableTypes.fromJni( + value.as(jni_bridge.NativeInteropAllNullableTypes.type), + ); + } else if (value.isA( + jni_bridge.NativeInteropAllNullableTypesWithoutRecursion.type, + )) { + return NativeInteropAllNullableTypesWithoutRecursion.fromJni( + value.as(jni_bridge.NativeInteropAllNullableTypesWithoutRecursion.type), + ); + } else if (value.isA( + jni_bridge.NativeInteropAllClassesWrapper.type, + )) { + return NativeInteropAllClassesWrapper.fromJni( + value.as(jni_bridge.NativeInteropAllClassesWrapper.type), + ); + } else if (value.isA(jni_bridge.NativeInteropAnEnum.type)) { + return NativeInteropAnEnum.fromJni(value.as(jni_bridge.NativeInteropAnEnum.type)); + } else if (value.isA( + jni_bridge.NativeInteropAnotherEnum.type, + )) { + return NativeInteropAnotherEnum.fromJni(value.as(jni_bridge.NativeInteropAnotherEnum.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 NativeInteropUnusedClass) { + return value.toJni() as T; + } else if (value is NativeInteropAllTypes) { + return value.toJni() as T; + } else if (value is NativeInteropAllNullableTypes) { + return value.toJni() as T; + } else if (value is NativeInteropAllNullableTypesWithoutRecursion) { + return value.toJni() as T; + } else if (value is NativeInteropAllClassesWrapper) { + return value.toJni() as T; + } else if (value is NativeInteropAnEnum) { + return value.toJni() as T; + } else if (value is NativeInteropAnotherEnum) { + 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.NativeInteropTestsPigeonInternalNull.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 == NativeInteropAnEnum) { + return NativeInteropAnEnum.fromNSNumber(numValue); + } else if (type == NativeInteropAnotherEnum) { + return NativeInteropAnotherEnum.fromNSNumber(numValue); + } + + return numValue.longValue; + } else if (NSString.isA(value)) { + return NSString.as(value).toDartString(); + } else if (ffi_bridge.NativeInteropTestsPigeonTypedData.isA(value)) { + return _getValueFromPigeonTypedData(value as ffi_bridge.NativeInteropTestsPigeonTypedData); + } 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.NativeInteropTestsNumberWrapper.isA(value)) { + return _convertNumberWrapperToDart(ffi_bridge.NativeInteropTestsNumberWrapper.as(value)); + } else if (ffi_bridge.NativeInteropUnusedClassBridge.isA(value)) { + return NativeInteropUnusedClass.fromFfi(ffi_bridge.NativeInteropUnusedClassBridge.as(value)); + } else if (ffi_bridge.NativeInteropAllTypesBridge.isA(value)) { + return NativeInteropAllTypes.fromFfi(ffi_bridge.NativeInteropAllTypesBridge.as(value)); + } else if (ffi_bridge.NativeInteropAllNullableTypesBridge.isA(value)) { + return NativeInteropAllNullableTypes.fromFfi( + ffi_bridge.NativeInteropAllNullableTypesBridge.as(value), + ); + } else if (ffi_bridge.NativeInteropAllNullableTypesWithoutRecursionBridge.isA(value)) { + return NativeInteropAllNullableTypesWithoutRecursion.fromFfi( + ffi_bridge.NativeInteropAllNullableTypesWithoutRecursionBridge.as(value), + ); + } else if (ffi_bridge.NativeInteropAllClassesWrapperBridge.isA(value)) { + return NativeInteropAllClassesWrapper.fromFfi( + ffi_bridge.NativeInteropAllClassesWrapperBridge.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.NativeInteropTestsPigeonInternalNull() 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 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 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 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 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 NativeInteropAllTypes? entry in value) { + res.addObject( + entry == null + ? ffi_bridge.NativeInteropTestsPigeonInternalNull() + : writeValue(entry, generic: true), + ); + } + return res as T; + } else if (value is List && _isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final NativeInteropAnEnum 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 NativeInteropAllNullableTypes 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( + entry == null + ? ffi_bridge.NativeInteropTestsPigeonInternalNull() + : 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.NativeInteropTestsPigeonInternalNull() + : 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.NativeInteropTestsPigeonInternalNull() + : 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.NativeInteropTestsPigeonInternalNull() + : writeValue(entry, generic: true), + ); + } + return res as T; + } else if (value is List && _isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final NativeInteropAnEnum? entry in value) { + res.addObject( + entry == null + ? ffi_bridge.NativeInteropTestsPigeonInternalNull() + : writeValue(entry, generic: true), + ); + } + return res as T; + } else if (value is List && + _isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final NativeInteropAllNullableTypes? entry in value) { + res.addObject( + entry == null + ? ffi_bridge.NativeInteropTestsPigeonInternalNull() + : writeValue(entry, generic: true), + ); + } + return res as T; + } else if (value is List && + _isTypeOrNullableType(T)) { + final NSMutableArray res = NSMutableArray(); + for (final NativeInteropAllNullableTypesWithoutRecursion? entry in value) { + res.addObject( + entry == null + ? ffi_bridge.NativeInteropTestsPigeonInternalNull() + : 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.NativeInteropTestsPigeonInternalNull() + : 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.NativeInteropTestsPigeonInternalNull() + : 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.NativeInteropTestsPigeonInternalNull() + : 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 NativeInteropUnusedClass) { + return value.toFfi() as T; + } else if (value is NativeInteropAllTypes) { + return value.toFfi() as T; + } else if (value is NativeInteropAllNullableTypes) { + return value.toFfi() as T; + } else if (value is NativeInteropAllNullableTypesWithoutRecursion) { + return value.toFfi() as T; + } else if (value is NativeInteropAllClassesWrapper) { + return value.toFfi() as T; + } else { + throw ArgumentError.value(value); + } + } +} + +ffi_bridge.NativeInteropTestsPigeonTypedData _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.NativeInteropTestsPigeonTypedData.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.NativeInteropTestsPigeonTypedData.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.NativeInteropTestsPigeonTypedData.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.NativeInteropTestsPigeonTypedData.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.NativeInteropTestsPigeonTypedData.alloc().initWithData(nsData, type: 4); + } + throw ArgumentError.value(value); +} + +Object? _getValueFromPigeonTypedData(ffi_bridge.NativeInteropTestsPigeonTypedData value) { + final NSData data = value.data; + final Pointer bytes = data.bytes; + return switch (value.type) { + 0 => Uint8List.fromList(bytes.cast().asTypedList(data.length)), + 1 => Int32List.fromList(bytes.cast().asTypedList(data.length ~/ 4)), + 2 => Int64List.fromList(bytes.cast().asTypedList(data.length ~/ 8)), + 3 => Float32List.fromList(bytes.cast().asTypedList(data.length ~/ 4)), + 4 => Float64List.fromList(bytes.cast().asTypedList(data.length ~/ 8)), + _ => throw ArgumentError.value(value), + }; +} + +Object? _convertNumberWrapperToDart(ffi_bridge.NativeInteropTestsNumberWrapper 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 NativeInteropAnEnum.fromNSNumber(value.number); + case 5: + return NativeInteropAnotherEnum.fromNSNumber(value.number); + default: + throw ArgumentError.value(value); + } +} + +ffi_bridge.NativeInteropTestsNumberWrapper _convertToFfiNumberWrapper(Object value) { + switch (value) { + case int _: + return ffi_bridge.NativeInteropTestsNumberWrapper.alloc().initWithNumber( + NSNumber.alloc().initWithLong(value), + type: 1, + ); + case double _: + return ffi_bridge.NativeInteropTestsNumberWrapper.alloc().initWithNumber( + NSNumber.alloc().initWithDouble(value), + type: 2, + ); + case bool _: + return ffi_bridge.NativeInteropTestsNumberWrapper.alloc().initWithNumber( + NSNumber.alloc().initWithLong(value ? 1 : 0), + type: 3, + ); + case NativeInteropAnEnum _: + return ffi_bridge.NativeInteropTestsNumberWrapper.alloc().initWithNumber( + value.toNSNumber(), + type: 4, + ); + case NativeInteropAnotherEnum _: + return ffi_bridge.NativeInteropTestsNumberWrapper.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.NativeInteropTestsError error) { + if (error.code != null) { + throw _wrapFfiError(error); + } +} + +PlatformException _wrapFfiError(ffi_bridge.NativeInteropTestsError error) => PlatformException( + code: error.code!.toDartString(), + message: error.message?.toDartString(), + details: NSString.isA(error.details) ? error.details!.toDartString() : error.details, +); + +void _reportFfiError(ffi_bridge.NativeInteropTestsError 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.NativeInteropTestsError.type)) { + final jni_bridge.NativeInteropTestsError pigeonError = e.as( + jni_bridge.NativeInteropTestsError.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 NativeInteropAnEnum { + one, + two, + three, + fortyTwo, + fourHundredTwentyTwo; + + jni_bridge.NativeInteropAnEnum toJni() { + return jni_bridge.NativeInteropAnEnum.Companion.ofRaw(index)!; + } + + static NativeInteropAnEnum? fromJni(jni_bridge.NativeInteropAnEnum? jniEnum) { + return jniEnum == null ? null : NativeInteropAnEnum.values[jniEnum.raw]; + } + + NSNumber toFfi() { + return _PigeonFfiCodec.writeValue(index); + } + + NSNumber toNSNumber() { + return NSNumber.alloc().initWithLong(index); + } + + static NativeInteropAnEnum? fromNSNumber(NSNumber? ffiEnum) { + return ffiEnum == null ? null : NativeInteropAnEnum.values[ffiEnum.intValue]; + } +} + +enum NativeInteropAnotherEnum { + justInCase; + + jni_bridge.NativeInteropAnotherEnum toJni() { + return jni_bridge.NativeInteropAnotherEnum.Companion.ofRaw(index)!; + } + + static NativeInteropAnotherEnum? fromJni(jni_bridge.NativeInteropAnotherEnum? jniEnum) { + return jniEnum == null ? null : NativeInteropAnotherEnum.values[jniEnum.raw]; + } + + NSNumber toFfi() { + return _PigeonFfiCodec.writeValue(index); + } + + NSNumber toNSNumber() { + return NSNumber.alloc().initWithLong(index); + } + + static NativeInteropAnotherEnum? fromNSNumber(NSNumber? ffiEnum) { + return ffiEnum == null ? null : NativeInteropAnotherEnum.values[ffiEnum.intValue]; + } +} + +class NativeInteropUnusedClass { + NativeInteropUnusedClass({this.aField}); + + Object? aField; + + List _toList() { + return [aField]; + } + + jni_bridge.NativeInteropUnusedClass toJni() { + return jni_bridge.NativeInteropUnusedClass(_PigeonJniCodec.writeValue(aField)); + } + + ffi_bridge.NativeInteropUnusedClassBridge toFfi() { + return ffi_bridge.NativeInteropUnusedClassBridge.alloc().initWithAField( + _PigeonFfiCodec.writeValue(aField, generic: true), + ); + } + + Object encode() { + return _toList(); + } + + static NativeInteropUnusedClass? fromJni(jni_bridge.NativeInteropUnusedClass? jniClass) { + return jniClass == null + ? null + : NativeInteropUnusedClass(aField: _PigeonJniCodec.readValue(jniClass.aField)); + } + + static NativeInteropUnusedClass? fromFfi(ffi_bridge.NativeInteropUnusedClassBridge? ffiClass) { + return ffiClass == null + ? null + : NativeInteropUnusedClass(aField: _PigeonFfiCodec.readValue(ffiClass.aField)); + } + + static NativeInteropUnusedClass decode(Object result) { + result as List; + return NativeInteropUnusedClass(aField: result[0]); + } + + @override + // ignore: avoid_equals_and_hash_code_on_mutable_classes + bool operator ==(Object other) { + if (other is! NativeInteropUnusedClass || 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 'NativeInteropUnusedClass(aField: $aField)'; + } +} + +/// A class containing all supported types. +class NativeInteropAllTypes { + NativeInteropAllTypes({ + 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 = NativeInteropAnEnum.one, + this.anotherEnum = NativeInteropAnotherEnum.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; + + NativeInteropAnEnum anEnum; + + NativeInteropAnotherEnum 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.NativeInteropAllTypes toJni() { + return jni_bridge.NativeInteropAllTypes( + 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.NativeInteropAllTypesBridge toFfi() { + return ffi_bridge.NativeInteropAllTypesBridge.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.NativeInteropAnEnum.values[anEnum.index], + anotherEnum: ffi_bridge.NativeInteropAnotherEnum.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 NativeInteropAllTypes? fromJni(jni_bridge.NativeInteropAllTypes? jniClass) { + return jniClass == null + ? null + : NativeInteropAllTypes( + 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: NativeInteropAnEnum.fromJni(jniClass.anEnum)!, + anotherEnum: NativeInteropAnotherEnum.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 NativeInteropAllTypes? fromFfi(ffi_bridge.NativeInteropAllTypesBridge? ffiClass) { + return ffiClass == null + ? null + : NativeInteropAllTypes( + 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: NativeInteropAnEnum.values[ffiClass.anEnum.index], + anotherEnum: NativeInteropAnotherEnum.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, NativeInteropAnEnum)! + 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, + NativeInteropAnEnum, + NativeInteropAnEnum, + )! + 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 NativeInteropAllTypes decode(Object result) { + result as List; + return NativeInteropAllTypes( + 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 NativeInteropAnEnum, + anotherEnum: result[9]! as NativeInteropAnotherEnum, + 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! NativeInteropAllTypes || 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 'NativeInteropAllTypes(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)'; + } +} + +/// A class containing all supported nullable types. +class NativeInteropAllNullableTypes { + NativeInteropAllNullableTypes({ + 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; + + NativeInteropAnEnum? aNullableEnum; + + NativeInteropAnotherEnum? anotherNullableEnum; + + String? aNullableString; + + Object? aNullableObject; + + NativeInteropAllNullableTypes? 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.NativeInteropAllNullableTypes toJni() { + return jni_bridge.NativeInteropAllNullableTypes( + _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?.toJni(), + anotherNullableEnum?.toJni(), + _PigeonJniCodec.writeValue(aNullableString), + _PigeonJniCodec.writeValue(aNullableObject), + 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.NativeInteropAllNullableTypesBridge toFfi() { + return ffi_bridge.NativeInteropAllNullableTypesBridge.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?.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 NativeInteropAllNullableTypes? fromJni( + jni_bridge.NativeInteropAllNullableTypes? jniClass, + ) { + return jniClass == null + ? null + : NativeInteropAllNullableTypes( + 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: NativeInteropAnEnum.fromJni(jniClass.aNullableEnum), + anotherNullableEnum: NativeInteropAnotherEnum.fromJni(jniClass.anotherNullableEnum), + aNullableString: jniClass.aNullableString?.toDartString(releaseOriginal: true), + aNullableObject: _PigeonJniCodec.readValue(jniClass.aNullableObject), + allNullableTypes: NativeInteropAllNullableTypes.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 NativeInteropAllNullableTypes? fromFfi( + ffi_bridge.NativeInteropAllNullableTypesBridge? ffiClass, + ) { + return ffiClass == null + ? null + : NativeInteropAllNullableTypes( + 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 + : NativeInteropAnEnum.values[ffiClass.aNullableEnum!.longValue], + anotherNullableEnum: ffiClass.anotherNullableEnum == null + ? null + : NativeInteropAnotherEnum.values[ffiClass.anotherNullableEnum!.longValue], + aNullableString: ffiClass.aNullableString?.toDartString(), + aNullableObject: _PigeonFfiCodec.readValue(ffiClass.aNullableObject), + allNullableTypes: NativeInteropAllNullableTypes.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, NativeInteropAnEnum) + 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, + NativeInteropAnEnum, + NativeInteropAnEnum, + ) + 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 NativeInteropAllNullableTypes decode(Object result) { + result as List; + return NativeInteropAllNullableTypes( + 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 NativeInteropAnEnum?, + anotherNullableEnum: result[9] as NativeInteropAnotherEnum?, + aNullableString: result[10] as String?, + aNullableObject: result[11], + allNullableTypes: result[12] as NativeInteropAllNullableTypes?, + 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! NativeInteropAllNullableTypes || 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 'NativeInteropAllNullableTypes(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)'; + } +} + +/// The primary purpose for this class is to ensure coverage of Swift structs +/// with nullable items, as the primary [NativeInteropAllNullableTypes] class is being used to +/// test Swift classes. +class NativeInteropAllNullableTypesWithoutRecursion { + NativeInteropAllNullableTypesWithoutRecursion({ + 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; + + NativeInteropAnEnum? aNullableEnum; + + NativeInteropAnotherEnum? 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.NativeInteropAllNullableTypesWithoutRecursion toJni() { + return jni_bridge.NativeInteropAllNullableTypesWithoutRecursion( + _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?.toJni(), + 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.NativeInteropAllNullableTypesWithoutRecursionBridge toFfi() { + return ffi_bridge.NativeInteropAllNullableTypesWithoutRecursionBridge.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 NativeInteropAllNullableTypesWithoutRecursion? fromJni( + jni_bridge.NativeInteropAllNullableTypesWithoutRecursion? jniClass, + ) { + return jniClass == null + ? null + : NativeInteropAllNullableTypesWithoutRecursion( + 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: NativeInteropAnEnum.fromJni(jniClass.aNullableEnum), + anotherNullableEnum: NativeInteropAnotherEnum.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 NativeInteropAllNullableTypesWithoutRecursion? fromFfi( + ffi_bridge.NativeInteropAllNullableTypesWithoutRecursionBridge? ffiClass, + ) { + return ffiClass == null + ? null + : NativeInteropAllNullableTypesWithoutRecursion( + 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 + : NativeInteropAnEnum.values[ffiClass.aNullableEnum!.longValue], + anotherNullableEnum: ffiClass.anotherNullableEnum == null + ? null + : NativeInteropAnotherEnum.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, NativeInteropAnEnum) + 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, + NativeInteropAnEnum, + NativeInteropAnEnum, + ) + 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 NativeInteropAllNullableTypesWithoutRecursion decode(Object result) { + result as List; + return NativeInteropAllNullableTypesWithoutRecursion( + 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 NativeInteropAnEnum?, + anotherNullableEnum: result[9] as NativeInteropAnotherEnum?, + 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! NativeInteropAllNullableTypesWithoutRecursion || + 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 'NativeInteropAllNullableTypesWithoutRecursion(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)'; + } +} + +/// A class for testing nested class handling. +/// +/// This is needed to test nested nullable and non-nullable classes, +/// `NativeInteropAllNullableTypes` is non-nullable here as it is easier to instantiate +/// than `NativeInteropAllTypes` when testing doesn't require both (ie. testing null classes). +class NativeInteropAllClassesWrapper { + NativeInteropAllClassesWrapper({ + required this.allNullableTypes, + this.allNullableTypesWithoutRecursion, + this.allTypes, + required this.classList, + this.nullableClassList, + required this.classMap, + this.nullableClassMap, + }); + + NativeInteropAllNullableTypes allNullableTypes; + + NativeInteropAllNullableTypesWithoutRecursion? allNullableTypesWithoutRecursion; + + NativeInteropAllTypes? allTypes; + + List classList; + + List? nullableClassList; + + Map classMap; + + Map? nullableClassMap; + + List _toList() { + return [ + allNullableTypes, + allNullableTypesWithoutRecursion, + allTypes, + classList, + nullableClassList, + classMap, + nullableClassMap, + ]; + } + + jni_bridge.NativeInteropAllClassesWrapper toJni() { + return jni_bridge.NativeInteropAllClassesWrapper( + allNullableTypes.toJni(), + allNullableTypesWithoutRecursion?.toJni(), + allTypes?.toJni(), + _PigeonJniCodec.writeValue>(classList), + _PigeonJniCodec.writeValue?>( + nullableClassList, + ), + _PigeonJniCodec.writeValue>(classMap), + _PigeonJniCodec.writeValue< + JMap? + >(nullableClassMap), + ); + } + + ffi_bridge.NativeInteropAllClassesWrapperBridge toFfi() { + return ffi_bridge.NativeInteropAllClassesWrapperBridge.alloc().initWithAllNullableTypes( + allNullableTypes.toFfi(), + allNullableTypesWithoutRecursion: allNullableTypesWithoutRecursion?.toFfi(), + allTypes: allTypes?.toFfi(), + classList: _PigeonFfiCodec.writeValue(classList), + nullableClassList: _PigeonFfiCodec.writeValue(nullableClassList), + classMap: _PigeonFfiCodec.writeValue(classMap), + nullableClassMap: _PigeonFfiCodec.writeValue(nullableClassMap), + ); + } + + Object encode() { + return _toList(); + } + + static NativeInteropAllClassesWrapper? fromJni( + jni_bridge.NativeInteropAllClassesWrapper? jniClass, + ) { + return jniClass == null + ? null + : NativeInteropAllClassesWrapper( + allNullableTypes: NativeInteropAllNullableTypes.fromJni(jniClass.allNullableTypes)!, + allNullableTypesWithoutRecursion: NativeInteropAllNullableTypesWithoutRecursion.fromJni( + jniClass.allNullableTypesWithoutRecursion, + ), + allTypes: NativeInteropAllTypes.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 NativeInteropAllClassesWrapper? fromFfi( + ffi_bridge.NativeInteropAllClassesWrapperBridge? ffiClass, + ) { + return ffiClass == null + ? null + : NativeInteropAllClassesWrapper( + allNullableTypes: NativeInteropAllNullableTypes.fromFfi(ffiClass.allNullableTypes)!, + allNullableTypesWithoutRecursion: NativeInteropAllNullableTypesWithoutRecursion.fromFfi( + ffiClass.allNullableTypesWithoutRecursion, + ), + allTypes: NativeInteropAllTypes.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 NativeInteropAllClassesWrapper decode(Object result) { + result as List; + return NativeInteropAllClassesWrapper( + allNullableTypes: result[0]! as NativeInteropAllNullableTypes, + allNullableTypesWithoutRecursion: result[1] as NativeInteropAllNullableTypesWithoutRecursion?, + allTypes: result[2] as NativeInteropAllTypes?, + 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! NativeInteropAllClassesWrapper || 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 'NativeInteropAllClassesWrapper(allNullableTypes: $allNullableTypes, allNullableTypesWithoutRecursion: $allNullableTypesWithoutRecursion, allTypes: $allTypes, classList: $classList, nullableClassList: $nullableClassList, classMap: $classMap, nullableClassMap: $nullableClassMap)'; + } +} + +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 NativeInteropAnEnum) { + buffer.putUint8(129); + writeValue(buffer, value.index); + } else if (value is NativeInteropAnotherEnum) { + buffer.putUint8(130); + writeValue(buffer, value.index); + } else if (value is NativeInteropUnusedClass) { + buffer.putUint8(131); + writeValue(buffer, value.encode()); + } else if (value is NativeInteropAllTypes) { + buffer.putUint8(132); + writeValue(buffer, value.encode()); + } else if (value is NativeInteropAllNullableTypes) { + buffer.putUint8(133); + writeValue(buffer, value.encode()); + } else if (value is NativeInteropAllNullableTypesWithoutRecursion) { + buffer.putUint8(134); + writeValue(buffer, value.encode()); + } else if (value is NativeInteropAllClassesWrapper) { + 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 : NativeInteropAnEnum.values[value]; + case 130: + final value = readValue(buffer) as int?; + return value == null ? null : NativeInteropAnotherEnum.values[value]; + case 131: + return NativeInteropUnusedClass.decode(readValue(buffer)!); + case 132: + return NativeInteropAllTypes.decode(readValue(buffer)!); + case 133: + return NativeInteropAllNullableTypes.decode(readValue(buffer)!); + case 134: + return NativeInteropAllNullableTypesWithoutRecursion.decode(readValue(buffer)!); + case 135: + return NativeInteropAllClassesWrapper.decode(readValue(buffer)!); + default: + return super.readValueOfType(type, buffer); + } + } +} + +const String defaultInstanceName = 'PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u'; + +class NativeInteropHostIntegrationCoreApiForNativeInterop { + NativeInteropHostIntegrationCoreApiForNativeInterop._withRegistrar({ + jni_bridge.NativeInteropHostIntegrationCoreApiRegistrar? jniApi, + ffi_bridge.NativeInteropHostIntegrationCoreApiSetup? ffiApi, + }) : _jniApi = jniApi, + _ffiApi = ffiApi; + + /// Returns instance of NativeInteropHostIntegrationCoreApiForNativeInterop with specified [channelName] if one has been registered. + static NativeInteropHostIntegrationCoreApiForNativeInterop? getInstance({ + String channelName = defaultInstanceName, + }) { + final NativeInteropHostIntegrationCoreApiForNativeInterop res; + if (Platform.isAndroid) { + final jni_bridge.NativeInteropHostIntegrationCoreApiRegistrar? link = + jni_bridge.NativeInteropHostIntegrationCoreApiRegistrar().getInstance( + channelName.toJString(), + ); + if (link == null) { + _throwNoInstanceError(channelName); + } + res = NativeInteropHostIntegrationCoreApiForNativeInterop._withRegistrar(jniApi: link); + } else if (Platform.isIOS || Platform.isMacOS) { + final ffi_bridge.NativeInteropHostIntegrationCoreApiSetup? link = ffi_bridge + .NativeInteropHostIntegrationCoreApiSetup.getInstanceWithName(NSString(channelName)); + if (link == null) { + _throwNoInstanceError(channelName); + } + res = NativeInteropHostIntegrationCoreApiForNativeInterop._withRegistrar(ffiApi: link); + } else { + throw UnsupportedError( + 'Native Interop is not supported on this platform. Use NativeInteropHostIntegrationCoreApi instead.', + ); + } + return res; + } + + late final jni_bridge.NativeInteropHostIntegrationCoreApiRegistrar? _jniApi; + late final ffi_bridge.NativeInteropHostIntegrationCoreApiSetup? _ffiApi; + + void noop() { + try { + if (_jniApi != null) { + return _jniApi.noop(); + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + _ffiApi.noopWithWrappedError(error); + _throwIfFfiError(error); + return; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NativeInteropAllTypes echoAllTypes(NativeInteropAllTypes everything) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllTypes res = _jniApi.echoAllTypes(everything.toJni()); + final NativeInteropAllTypes dartTypeRes = NativeInteropAllTypes.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final ffi_bridge.NativeInteropAllTypesBridge? res = _ffiApi.echoAllTypesWithEverything( + everything.toFfi(), + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAllTypes dartTypeRes = NativeInteropAllTypes.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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + _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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final NSArray? res = _ffiApi.echoEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res, NativeInteropAnEnum)! 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final NSArray? res = _ffiApi.echoNonNullEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res, NativeInteropAnEnum)! 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final NSDictionary? res = _ffiApi.echoEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res, NativeInteropAnEnum, NativeInteropAnEnum)! + 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>( + classMap, + ), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final NSDictionary? res = _ffiApi.echoNonNullEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res, NativeInteropAnEnum, NativeInteropAnEnum)! + 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>( + classMap, + ), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + 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); + } + } + + NativeInteropAllClassesWrapper echoClassWrapper(NativeInteropAllClassesWrapper wrapper) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllClassesWrapper res = _jniApi.echoClassWrapper( + wrapper.toJni(), + ); + final NativeInteropAllClassesWrapper dartTypeRes = NativeInteropAllClassesWrapper.fromJni( + res, + )!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final ffi_bridge.NativeInteropAllClassesWrapperBridge? res = _ffiApi + .echoClassWrapperWithWrapper(wrapper.toFfi(), wrappedError: error); + _throwIfFfiError(error); + final NativeInteropAllClassesWrapper dartTypeRes = NativeInteropAllClassesWrapper.fromFfi( + res, + )!; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NativeInteropAnEnum echoEnum(NativeInteropAnEnum anEnum) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAnEnum res = _jniApi.echoEnum(anEnum.toJni()); + final NativeInteropAnEnum dartTypeRes = NativeInteropAnEnum.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final NSNumber? res = _ffiApi.echoEnumWithAnEnum( + ffi_bridge.NativeInteropAnEnum.values[anEnum.index], + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAnEnum dartTypeRes = + _PigeonFfiCodec.readValue(res, NativeInteropAnEnum)! as NativeInteropAnEnum; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NativeInteropAnotherEnum echoAnotherEnum(NativeInteropAnotherEnum anotherEnum) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAnotherEnum res = _jniApi.echoAnotherEnum( + anotherEnum.toJni(), + ); + final NativeInteropAnotherEnum dartTypeRes = NativeInteropAnotherEnum.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final NSNumber? res = _ffiApi.echoAnotherEnumWithAnotherEnum( + ffi_bridge.NativeInteropAnotherEnum.values[anotherEnum.index], + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAnotherEnum dartTypeRes = + _PigeonFfiCodec.readValue(res, NativeInteropAnotherEnum)! as NativeInteropAnotherEnum; + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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); + } + } + + NativeInteropAllNullableTypes? echoAllNullableTypes(NativeInteropAllNullableTypes? everything) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllNullableTypes? res = _jniApi.echoAllNullableTypes( + everything?.toJni(), + ); + final NativeInteropAllNullableTypes? dartTypeRes = NativeInteropAllNullableTypes.fromJni( + res, + ); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final ffi_bridge.NativeInteropAllNullableTypesBridge? res = _ffiApi + .echoAllNullableTypesWithEverything(everything?.toFfi(), wrappedError: error); + _throwIfFfiError(error); + final NativeInteropAllNullableTypes? dartTypeRes = NativeInteropAllNullableTypes.fromFfi( + res, + ); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NativeInteropAllNullableTypesWithoutRecursion? echoAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? everything, + ) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllNullableTypesWithoutRecursion? res = _jniApi + .echoAllNullableTypesWithoutRecursion(everything?.toJni()); + final NativeInteropAllNullableTypesWithoutRecursion? dartTypeRes = + NativeInteropAllNullableTypesWithoutRecursion.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final ffi_bridge.NativeInteropAllNullableTypesWithoutRecursionBridge? res = _ffiApi + .echoAllNullableTypesWithoutRecursionWithEverything( + everything?.toFfi(), + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAllNullableTypesWithoutRecursion? dartTypeRes = + NativeInteropAllNullableTypesWithoutRecursion.fromFfi(res); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + String? extractNestedNullableString(NativeInteropAllClassesWrapper 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.NativeInteropTestsError(); + 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); + } + } + + NativeInteropAllClassesWrapper createNestedNullableString(String? nullableString) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllClassesWrapper res = _jniApi.createNestedNullableString( + _PigeonJniCodec.writeValue(nullableString), + ); + final NativeInteropAllClassesWrapper dartTypeRes = NativeInteropAllClassesWrapper.fromJni( + res, + )!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final ffi_bridge.NativeInteropAllClassesWrapperBridge? res = _ffiApi + .createNestedNullableStringWithNullableString( + _PigeonFfiCodec.writeValue(nullableString), + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAllClassesWrapper dartTypeRes = NativeInteropAllClassesWrapper.fromFfi( + res, + )!; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NativeInteropAllNullableTypes sendMultipleNullableTypes( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllNullableTypes res = _jniApi.sendMultipleNullableTypes( + _PigeonJniCodec.writeValue(aNullableBool), + _PigeonJniCodec.writeValue(aNullableInt), + _PigeonJniCodec.writeValue(aNullableString), + ); + final NativeInteropAllNullableTypes dartTypeRes = NativeInteropAllNullableTypes.fromJni( + res, + )!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final ffi_bridge.NativeInteropAllNullableTypesBridge? res = _ffiApi + .sendMultipleNullableTypesWithANullableBool( + _PigeonFfiCodec.writeValue(aNullableBool), + aNullableInt: _PigeonFfiCodec.writeValue(aNullableInt), + aNullableString: _PigeonFfiCodec.writeValue(aNullableString), + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAllNullableTypes dartTypeRes = NativeInteropAllNullableTypes.fromFfi( + res, + )!; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NativeInteropAllNullableTypesWithoutRecursion sendMultipleNullableTypesWithoutRecursion( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllNullableTypesWithoutRecursion res = _jniApi + .sendMultipleNullableTypesWithoutRecursion( + _PigeonJniCodec.writeValue(aNullableBool), + _PigeonJniCodec.writeValue(aNullableInt), + _PigeonJniCodec.writeValue(aNullableString), + ); + final NativeInteropAllNullableTypesWithoutRecursion dartTypeRes = + NativeInteropAllNullableTypesWithoutRecursion.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final ffi_bridge.NativeInteropAllNullableTypesWithoutRecursionBridge? res = _ffiApi + .sendMultipleNullableTypesWithoutRecursionWithANullableBool( + _PigeonFfiCodec.writeValue(aNullableBool), + aNullableInt: _PigeonFfiCodec.writeValue(aNullableInt), + aNullableString: _PigeonFfiCodec.writeValue(aNullableString), + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAllNullableTypesWithoutRecursion dartTypeRes = + NativeInteropAllNullableTypesWithoutRecursion.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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final NSArray? res = _ffiApi.echoNullableEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NativeInteropAnEnum) 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final NSArray? res = _ffiApi.echoNullableNonNullEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NativeInteropAnEnum) 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final NSDictionary? res = _ffiApi.echoNullableEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NativeInteropAnEnum, NativeInteropAnEnum) + 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?>( + classMap, + ), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final NSDictionary? res = _ffiApi.echoNullableNonNullEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NativeInteropAnEnum, NativeInteropAnEnum) + 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?>( + classMap, + ), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + 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); + } + } + + NativeInteropAnEnum? echoNullableEnum(NativeInteropAnEnum? anEnum) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAnEnum? res = _jniApi.echoNullableEnum(anEnum?.toJni()); + final NativeInteropAnEnum? dartTypeRes = NativeInteropAnEnum.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final NSNumber? res = _ffiApi.echoNullableEnumWithAnEnum( + _PigeonFfiCodec.writeValue(anEnum), + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAnEnum? dartTypeRes = + _PigeonFfiCodec.readValue(res, NativeInteropAnEnum) as NativeInteropAnEnum?; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NativeInteropAnotherEnum? echoAnotherNullableEnum(NativeInteropAnotherEnum? anotherEnum) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAnotherEnum? res = _jniApi.echoAnotherNullableEnum( + anotherEnum?.toJni(), + ); + final NativeInteropAnotherEnum? dartTypeRes = NativeInteropAnotherEnum.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final NSNumber? res = _ffiApi.echoAnotherNullableEnumWithAnotherEnum( + _PigeonFfiCodec.writeValue(anotherEnum), + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAnotherEnum? dartTypeRes = + _PigeonFfiCodec.readValue(res, NativeInteropAnotherEnum) as NativeInteropAnotherEnum?; + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncUint8ListWithAUint8List( + _PigeonFfiCodec.writeValue(aUint8List), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.listener(( + ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncInt32ListWithAInt32List( + _PigeonFfiCodec.writeValue(aInt32List), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.listener(( + ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncInt64ListWithAInt64List( + _PigeonFfiCodec.writeValue(aInt64List), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.listener(( + ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncFloat64ListWithAFloat64List( + _PigeonFfiCodec.writeValue(aFloat64List), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.listener(( + ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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, NativeInteropAnEnum)! 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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, NativeInteropAnEnum, NativeInteropAnEnum)! + 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>( + classMap, + ), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + 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(NativeInteropAnEnum anEnum) async { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAnEnum res = await _jniApi.echoAsyncEnum(anEnum.toJni()); + final NativeInteropAnEnum dartTypeRes = NativeInteropAnEnum.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncEnumWithAnEnum( + ffi_bridge.NativeInteropAnEnum.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, NativeInteropAnEnum)! as NativeInteropAnEnum, + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAnotherAsyncEnum( + NativeInteropAnotherEnum anotherEnum, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAnotherEnum res = await _jniApi.echoAnotherAsyncEnum( + anotherEnum.toJni(), + ); + final NativeInteropAnotherEnum dartTypeRes = NativeInteropAnotherEnum.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAnotherAsyncEnumWithAnotherEnum( + ffi_bridge.NativeInteropAnotherEnum.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, NativeInteropAnotherEnum)! + as NativeInteropAnotherEnum, + ); + } + }), + ); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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 echoAsyncNativeInteropAllTypes( + NativeInteropAllTypes everything, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllTypes res = await _jniApi.echoAsyncNativeInteropAllTypes( + everything.toJni(), + ); + final NativeInteropAllTypes dartTypeRes = NativeInteropAllTypes.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncNativeInteropAllTypesWithEverything( + everything.toFfi(), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NativeInteropAllTypesBridge.listener(( + ffi_bridge.NativeInteropAllTypesBridge? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(NativeInteropAllTypes.fromFfi(res)!); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? everything, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllNullableTypes? res = await _jniApi + .echoAsyncNullableNativeInteropAllNullableTypes(everything?.toJni()); + final NativeInteropAllNullableTypes? dartTypeRes = NativeInteropAllNullableTypes.fromJni( + res, + ); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final Completer completer = + Completer(); + _ffiApi.echoAsyncNullableNativeInteropAllNullableTypesWithEverything( + everything?.toFfi(), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropAllNullableTypesBridge.listener(( + ffi_bridge.NativeInteropAllNullableTypesBridge? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(NativeInteropAllNullableTypes.fromFfi(res)); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? everything, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllNullableTypesWithoutRecursion? res = await _jniApi + .echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion(everything?.toJni()); + final NativeInteropAllNullableTypesWithoutRecursion? dartTypeRes = + NativeInteropAllNullableTypesWithoutRecursion.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final Completer completer = + Completer(); + _ffiApi.echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything( + everything?.toFfi(), + wrappedError: error, + completionHandler: + ffi_bridge + .ObjCBlock_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge.listener(( + ffi_bridge.NativeInteropAllNullableTypesWithoutRecursionBridge? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(NativeInteropAllNullableTypesWithoutRecursion.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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncNullableUint8ListWithAUint8List( + _PigeonFfiCodec.writeValue(aUint8List), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.listener(( + ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncNullableInt32ListWithAInt32List( + _PigeonFfiCodec.writeValue(aInt32List), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.listener(( + ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncNullableInt64ListWithAInt64List( + _PigeonFfiCodec.writeValue(aInt64List), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.listener(( + ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.echoAsyncNullableFloat64ListWithAFloat64List( + _PigeonFfiCodec.writeValue(aFloat64List), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.listener(( + ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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, NativeInteropAnEnum) 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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, NativeInteropAnEnum, NativeInteropAnEnum) + 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?>( + classMap, + ), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + 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(NativeInteropAnEnum? anEnum) async { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAnEnum? res = await _jniApi.echoAsyncNullableEnum( + anEnum?.toJni(), + ); + final NativeInteropAnEnum? dartTypeRes = NativeInteropAnEnum.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + 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, NativeInteropAnEnum) as NativeInteropAnEnum?, + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future echoAnotherAsyncNullableEnum( + NativeInteropAnotherEnum? anotherEnum, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAnotherEnum? res = await _jniApi.echoAnotherAsyncNullableEnum( + anotherEnum?.toJni(), + ); + final NativeInteropAnotherEnum? dartTypeRes = NativeInteropAnotherEnum.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + 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, NativeInteropAnotherEnum) + as NativeInteropAnotherEnum?, + ); + } + }), + ); + 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.NativeInteropTestsError(); + _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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + _ffiApi.callFlutterThrowErrorFromVoidWithWrappedError(error); + _throwIfFfiError(error); + return; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NativeInteropAllTypes callFlutterEchoNativeInteropAllTypes(NativeInteropAllTypes everything) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllTypes res = _jniApi.callFlutterEchoNativeInteropAllTypes( + everything.toJni(), + ); + final NativeInteropAllTypes dartTypeRes = NativeInteropAllTypes.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final ffi_bridge.NativeInteropAllTypesBridge? res = _ffiApi + .callFlutterEchoNativeInteropAllTypesWithEverything( + everything.toFfi(), + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAllTypes dartTypeRes = NativeInteropAllTypes.fromFfi(res)!; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NativeInteropAllNullableTypes? callFlutterEchoNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? everything, + ) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllNullableTypes? res = _jniApi + .callFlutterEchoNativeInteropAllNullableTypes(everything?.toJni()); + final NativeInteropAllNullableTypes? dartTypeRes = NativeInteropAllNullableTypes.fromJni( + res, + ); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final ffi_bridge.NativeInteropAllNullableTypesBridge? res = _ffiApi + .callFlutterEchoNativeInteropAllNullableTypesWithEverything( + everything?.toFfi(), + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAllNullableTypes? dartTypeRes = NativeInteropAllNullableTypes.fromFfi( + res, + ); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NativeInteropAllNullableTypes callFlutterSendMultipleNullableTypes( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllNullableTypes res = _jniApi + .callFlutterSendMultipleNullableTypes( + _PigeonJniCodec.writeValue(aNullableBool), + _PigeonJniCodec.writeValue(aNullableInt), + _PigeonJniCodec.writeValue(aNullableString), + ); + final NativeInteropAllNullableTypes dartTypeRes = NativeInteropAllNullableTypes.fromJni( + res, + )!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final ffi_bridge.NativeInteropAllNullableTypesBridge? res = _ffiApi + .callFlutterSendMultipleNullableTypesWithANullableBool( + _PigeonFfiCodec.writeValue(aNullableBool), + aNullableInt: _PigeonFfiCodec.writeValue(aNullableInt), + aNullableString: _PigeonFfiCodec.writeValue(aNullableString), + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAllNullableTypes dartTypeRes = NativeInteropAllNullableTypes.fromFfi( + res, + )!; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NativeInteropAllNullableTypesWithoutRecursion? + callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? everything, + ) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllNullableTypesWithoutRecursion? res = _jniApi + .callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion(everything?.toJni()); + final NativeInteropAllNullableTypesWithoutRecursion? dartTypeRes = + NativeInteropAllNullableTypesWithoutRecursion.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final ffi_bridge.NativeInteropAllNullableTypesWithoutRecursionBridge? res = _ffiApi + .callFlutterEchoNativeInteropAllNullableTypesWithoutRecursionWithEverything( + everything?.toFfi(), + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAllNullableTypesWithoutRecursion? dartTypeRes = + NativeInteropAllNullableTypesWithoutRecursion.fromFfi(res); + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NativeInteropAllNullableTypesWithoutRecursion + callFlutterSendMultipleNullableTypesWithoutRecursion( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllNullableTypesWithoutRecursion res = _jniApi + .callFlutterSendMultipleNullableTypesWithoutRecursion( + _PigeonJniCodec.writeValue(aNullableBool), + _PigeonJniCodec.writeValue(aNullableInt), + _PigeonJniCodec.writeValue(aNullableString), + ); + final NativeInteropAllNullableTypesWithoutRecursion dartTypeRes = + NativeInteropAllNullableTypesWithoutRecursion.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final ffi_bridge.NativeInteropAllNullableTypesWithoutRecursionBridge? res = _ffiApi + .callFlutterSendMultipleNullableTypesWithoutRecursionWithANullableBool( + _PigeonFfiCodec.writeValue(aNullableBool), + aNullableInt: _PigeonFfiCodec.writeValue(aNullableInt), + aNullableString: _PigeonFfiCodec.writeValue(aNullableString), + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAllNullableTypesWithoutRecursion dartTypeRes = + NativeInteropAllNullableTypesWithoutRecursion.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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final NSArray? res = _ffiApi.callFlutterEchoEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res, NativeInteropAnEnum)! 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final NSArray? res = _ffiApi.callFlutterEchoNonNullEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List dartTypeRes = + (_PigeonFfiCodec.readValue(res, NativeInteropAnEnum)! 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final NSDictionary? res = _ffiApi.callFlutterEchoEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res, NativeInteropAnEnum, NativeInteropAnEnum)! + 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>( + classMap, + ), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final NSDictionary? res = _ffiApi.callFlutterEchoNonNullEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map dartTypeRes = + (_PigeonFfiCodec.readValue(res, NativeInteropAnEnum, NativeInteropAnEnum)! + 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>( + classMap, + ), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + 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); + } + } + + NativeInteropAnEnum callFlutterEchoEnum(NativeInteropAnEnum anEnum) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAnEnum res = _jniApi.callFlutterEchoEnum(anEnum.toJni()); + final NativeInteropAnEnum dartTypeRes = NativeInteropAnEnum.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final NSNumber? res = _ffiApi.callFlutterEchoEnumWithAnEnum( + ffi_bridge.NativeInteropAnEnum.values[anEnum.index], + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAnEnum dartTypeRes = + _PigeonFfiCodec.readValue(res, NativeInteropAnEnum)! as NativeInteropAnEnum; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NativeInteropAnotherEnum callFlutterEchoNativeInteropAnotherEnum( + NativeInteropAnotherEnum anotherEnum, + ) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAnotherEnum res = _jniApi + .callFlutterEchoNativeInteropAnotherEnum(anotherEnum.toJni()); + final NativeInteropAnotherEnum dartTypeRes = NativeInteropAnotherEnum.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final NSNumber? res = _ffiApi.callFlutterEchoNativeInteropAnotherEnumWithAnotherEnum( + ffi_bridge.NativeInteropAnotherEnum.values[anotherEnum.index], + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAnotherEnum dartTypeRes = + _PigeonFfiCodec.readValue(res, NativeInteropAnotherEnum)! as NativeInteropAnotherEnum; + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final NSArray? res = _ffiApi.callFlutterEchoNullableEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NativeInteropAnEnum) 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final NSArray? res = _ffiApi.callFlutterEchoNullableNonNullEnumListWithEnumList( + _PigeonFfiCodec.writeValue(enumList), + wrappedError: error, + ); + _throwIfFfiError(error); + final List? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NativeInteropAnEnum) 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final NSDictionary? res = _ffiApi.callFlutterEchoNullableEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NativeInteropAnEnum, NativeInteropAnEnum) + 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?>( + classMap, + ), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final NSDictionary? res = _ffiApi.callFlutterEchoNullableNonNullEnumMapWithEnumMap( + _PigeonFfiCodec.writeValue(enumMap), + wrappedError: error, + ); + _throwIfFfiError(error); + final Map? dartTypeRes = + (_PigeonFfiCodec.readValue(res, NativeInteropAnEnum, NativeInteropAnEnum) + 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?>( + classMap, + ), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + 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); + } + } + + NativeInteropAnEnum? callFlutterEchoNullableEnum(NativeInteropAnEnum? anEnum) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAnEnum? res = _jniApi.callFlutterEchoNullableEnum( + anEnum?.toJni(), + ); + final NativeInteropAnEnum? dartTypeRes = NativeInteropAnEnum.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final NSNumber? res = _ffiApi.callFlutterEchoNullableEnumWithAnEnum( + _PigeonFfiCodec.writeValue(anEnum), + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAnEnum? dartTypeRes = + _PigeonFfiCodec.readValue(res, NativeInteropAnEnum) as NativeInteropAnEnum?; + return dartTypeRes; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + NativeInteropAnotherEnum? callFlutterEchoAnotherNullableEnum( + NativeInteropAnotherEnum? anotherEnum, + ) { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAnotherEnum? res = _jniApi.callFlutterEchoAnotherNullableEnum( + anotherEnum?.toJni(), + ); + final NativeInteropAnotherEnum? dartTypeRes = NativeInteropAnotherEnum.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final NSNumber? res = _ffiApi.callFlutterEchoAnotherNullableEnumWithAnotherEnum( + _PigeonFfiCodec.writeValue(anotherEnum), + wrappedError: error, + ); + _throwIfFfiError(error); + final NativeInteropAnotherEnum? dartTypeRes = + _PigeonFfiCodec.readValue(res, NativeInteropAnotherEnum) as NativeInteropAnotherEnum?; + 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.NativeInteropTestsError(); + 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 callFlutterEchoAsyncNativeInteropAllTypes( + NativeInteropAllTypes everything, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllTypes res = await _jniApi + .callFlutterEchoAsyncNativeInteropAllTypes(everything.toJni()); + final NativeInteropAllTypes dartTypeRes = NativeInteropAllTypes.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncNativeInteropAllTypesWithEverything( + everything.toFfi(), + wrappedError: error, + completionHandler: ffi_bridge.ObjCBlock_ffiVoid_NativeInteropAllTypesBridge.listener(( + ffi_bridge.NativeInteropAllTypesBridge? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(NativeInteropAllTypes.fromFfi(res)!); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? everything, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllNullableTypes? res = await _jniApi + .callFlutterEchoAsyncNullableNativeInteropAllNullableTypes(everything?.toJni()); + final NativeInteropAllNullableTypes? dartTypeRes = NativeInteropAllNullableTypes.fromJni( + res, + ); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final Completer completer = + Completer(); + _ffiApi.callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithEverything( + everything?.toFfi(), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropAllNullableTypesBridge.listener(( + ffi_bridge.NativeInteropAllNullableTypesBridge? res, + ) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete(NativeInteropAllNullableTypes.fromFfi(res)); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future + callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? everything, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAllNullableTypesWithoutRecursion? res = await _jniApi + .callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything?.toJni(), + ); + final NativeInteropAllNullableTypesWithoutRecursion? dartTypeRes = + NativeInteropAllNullableTypesWithoutRecursion.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final Completer completer = + Completer(); + _ffiApi + .callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything( + everything?.toFfi(), + wrappedError: error, + completionHandler: + ffi_bridge + .ObjCBlock_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge.listener( + (ffi_bridge.NativeInteropAllNullableTypesWithoutRecursionBridge? res) { + if (error.code != null) { + completer.completeError(_wrapFfiError(error)); + } else { + completer.complete( + NativeInteropAllNullableTypesWithoutRecursion.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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncUint8ListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.listener(( + ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncInt32ListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.listener(( + ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncInt64ListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.listener(( + ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncFloat64ListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.listener(( + ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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, NativeInteropAnEnum)! 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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, NativeInteropAnEnum)! 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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, NativeInteropAnEnum, NativeInteropAnEnum)! + 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>( + classMap, + ), + ); + final Map dartTypeRes = + (_PigeonJniCodec.readValue(res)! as Map) + .cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + 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(NativeInteropAnEnum anEnum) async { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAnEnum res = await _jniApi.callFlutterEchoAsyncEnum( + anEnum.toJni(), + ); + final NativeInteropAnEnum dartTypeRes = NativeInteropAnEnum.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncEnumWithAnEnum( + ffi_bridge.NativeInteropAnEnum.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, NativeInteropAnEnum)! as NativeInteropAnEnum, + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAnotherAsyncEnum( + NativeInteropAnotherEnum anotherEnum, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAnotherEnum res = await _jniApi + .callFlutterEchoAnotherAsyncEnum(anotherEnum.toJni()); + final NativeInteropAnotherEnum dartTypeRes = NativeInteropAnotherEnum.fromJni(res)!; + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAnotherAsyncEnumWithAnotherEnum( + ffi_bridge.NativeInteropAnotherEnum.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, NativeInteropAnotherEnum)! + as NativeInteropAnotherEnum, + ); + } + }), + ); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncNullableUint8ListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.listener(( + ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncNullableInt32ListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.listener(( + ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncNullableInt64ListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.listener(( + ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + final Completer completer = Completer(); + _ffiApi.callFlutterEchoAsyncNullableFloat64ListWithList( + _PigeonFfiCodec.writeValue(list), + wrappedError: error, + completionHandler: + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.listener(( + ffi_bridge.NativeInteropTestsPigeonTypedData? 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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, NativeInteropAnEnum) 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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, NativeInteropAnEnum) 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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, NativeInteropAnEnum, NativeInteropAnEnum) + 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?>( + classMap, + ), + ); + final Map? dartTypeRes = + (_PigeonJniCodec.readValue(res) as Map?) + ?.cast(); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + 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(NativeInteropAnEnum? anEnum) async { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAnEnum? res = await _jniApi.callFlutterEchoAsyncNullableEnum( + anEnum?.toJni(), + ); + final NativeInteropAnEnum? dartTypeRes = NativeInteropAnEnum.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + 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, NativeInteropAnEnum) as NativeInteropAnEnum?, + ); + } + }), + ); + return await completer.future; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + Future callFlutterEchoAnotherAsyncNullableEnum( + NativeInteropAnotherEnum? anotherEnum, + ) async { + try { + if (_jniApi != null) { + final jni_bridge.NativeInteropAnotherEnum? res = await _jniApi + .callFlutterEchoAnotherAsyncNullableEnum(anotherEnum?.toJni()); + final NativeInteropAnotherEnum? dartTypeRes = NativeInteropAnotherEnum.fromJni(res); + return dartTypeRes; + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + 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, NativeInteropAnotherEnum) + as NativeInteropAnotherEnum?, + ); + } + }), + ); + 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.NativeInteropTestsError(); + 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.NativeInteropTestsError(); + 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); + } + } + + bool testDeregisterHostApi() { + try { + if (_jniApi != null) { + return _jniApi.testDeregisterHostApi(); + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final NSNumber? res = _ffiApi.testDeregisterHostApiWithWrappedError(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); + } + } + + bool testDeregisterFlutterApi() { + try { + if (_jniApi != null) { + return _jniApi.testDeregisterFlutterApi(); + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final NSNumber? res = _ffiApi.testDeregisterFlutterApiWithWrappedError(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); + } + } + + void registerAndImmediatelyDeregisterHostApi(String name) { + try { + if (_jniApi != null) { + return _jniApi.registerAndImmediatelyDeregisterHostApi( + _PigeonJniCodec.writeValue(name), + ); + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + _ffiApi.registerAndImmediatelyDeregisterHostApiWithName( + _PigeonFfiCodec.writeValue(name), + wrappedError: error, + ); + _throwIfFfiError(error); + return; + } else { + throw Exception('No JNI or FFI api available'); + } + } on JThrowable catch (e) { + throw _wrapJniException(e); + } + } + + bool testCallDeregisteredFlutterApi(String name) { + try { + if (_jniApi != null) { + return _jniApi.testCallDeregisteredFlutterApi(_PigeonJniCodec.writeValue(name)); + } else if (_ffiApi != null) { + final error = ffi_bridge.NativeInteropTestsError(); + final NSNumber? res = _ffiApi.testCallDeregisteredFlutterApiWithName( + _PigeonFfiCodec.writeValue(name), + 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); + } + } +} + +/// The core interface that each host language plugin must implement in +/// platform_test integration tests. +class NativeInteropHostIntegrationCoreApi { + /// Constructor for [NativeInteropHostIntegrationCoreApi]. 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. + NativeInteropHostIntegrationCoreApi({ + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + NativeInteropHostIntegrationCoreApiForNativeInterop? nativeInteropApi, + }) : pigeonVar_binaryMessenger = binaryMessenger, + pigeonVar_messageChannelSuffix = messageChannelSuffix.isNotEmpty + ? '.$messageChannelSuffix' + : '', + _nativeInteropApi = nativeInteropApi; + + /// Creates an instance of [NativeInteropHostIntegrationCoreApi] that requests an instance of + /// [NativeInteropHostIntegrationCoreApiForNativeInterop] 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 NativeInteropHostIntegrationCoreApi.createWithNativeInteropApi({ + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) { + NativeInteropHostIntegrationCoreApiForNativeInterop? nativeInteropApi; + String nativeInteropApiInstanceName = ''; + if (Platform.isAndroid || Platform.isIOS || Platform.isMacOS) { + if (messageChannelSuffix.isEmpty) { + nativeInteropApi = NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance(); + } else { + nativeInteropApiInstanceName = messageChannelSuffix; + nativeInteropApi = NativeInteropHostIntegrationCoreApiForNativeInterop.getInstance( + channelName: messageChannelSuffix, + ); + } + } else { + throw UnsupportedError( + 'Native Interop is not supported on this platform. Use the default constructor of NativeInteropHostIntegrationCoreApi instead.', + ); + } + if (nativeInteropApi == null) { + throw ArgumentError( + 'No NativeInteropHostIntegrationCoreApi instance with ${nativeInteropApiInstanceName.isEmpty ? 'no ' : ''} instance name ${nativeInteropApiInstanceName.isNotEmpty ? '"$nativeInteropApiInstanceName" ' : ''}found.', + ); + } + return NativeInteropHostIntegrationCoreApi( + binaryMessenger: binaryMessenger, + messageChannelSuffix: messageChannelSuffix, + nativeInteropApi: nativeInteropApi, + ); + } + + final BinaryMessenger? pigeonVar_binaryMessenger; + static const MessageCodec pigeonChannelCodec = _PigeonCodec(); + + final String pigeonVar_messageChannelSuffix; + + final NativeInteropHostIntegrationCoreApiForNativeInterop? _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.NativeInteropHostIntegrationCoreApi.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(NativeInteropAllTypes everything) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.echoAllTypes(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAllTypes; + } + + /// 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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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( + NativeInteropAllClassesWrapper wrapper, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.echoClassWrapper(wrapper); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAllClassesWrapper; + } + + /// Returns the passed enum to test serialization and deserialization. + Future echoEnum(NativeInteropAnEnum anEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.echoEnum(anEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAnEnum; + } + + /// Returns the passed enum to test serialization and deserialization. + Future echoAnotherEnum(NativeInteropAnotherEnum anotherEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.echoAnotherEnum(anotherEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAnotherEnum; + } + + /// 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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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( + NativeInteropAllNullableTypes? everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.echoAllNullableTypes(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAllNullableTypes?; + } + + /// Returns the passed object, to test serialization and deserialization. + Future echoAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.echoAllNullableTypesWithoutRecursion(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAllNullableTypesWithoutRecursion?; + } + + /// Returns the inner `aString` value from the wrapped object, to test + /// sending of nested objects. + Future extractNestedNullableString(NativeInteropAllClassesWrapper wrapper) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.extractNestedNullableString(wrapper); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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 NativeInteropAllClassesWrapper; + } + + 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.NativeInteropHostIntegrationCoreApi.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 NativeInteropAllNullableTypes; + } + + /// Returns passed in arguments of multiple types. + 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.NativeInteropHostIntegrationCoreApi.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 NativeInteropAllNullableTypesWithoutRecursion; + } + + /// 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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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(NativeInteropAnEnum? anEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.echoNullableEnum(anEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAnEnum?; + } + + Future echoAnotherNullableEnum( + NativeInteropAnotherEnum? anotherEnum, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.echoAnotherNullableEnum(anotherEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAnotherEnum?; + } + + /// 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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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(NativeInteropAnEnum anEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncEnum(anEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAnEnum; + } + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + Future echoAnotherAsyncEnum( + NativeInteropAnotherEnum anotherEnum, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.echoAnotherAsyncEnum(anotherEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAnotherEnum; + } + + /// 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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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 echoAsyncNativeInteropAllTypes( + NativeInteropAllTypes everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNativeInteropAllTypes(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.echoAsyncNativeInteropAllTypes$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 NativeInteropAllTypes; + } + + /// Returns the passed object, to test serialization and deserialization. + Future echoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableNativeInteropAllNullableTypes(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.echoAsyncNullableNativeInteropAllNullableTypes$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 NativeInteropAllNullableTypes?; + } + + /// Returns the passed object, to test serialization and deserialization. + Future + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything, + ); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion$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 NativeInteropAllNullableTypesWithoutRecursion?; + } + + /// 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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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(NativeInteropAnEnum? anEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.echoAsyncNullableEnum(anEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAnEnum?; + } + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + Future echoAnotherAsyncNullableEnum( + NativeInteropAnotherEnum? anotherEnum, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.echoAnotherAsyncNullableEnum(anotherEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAnotherEnum?; + } + + Future callFlutterNoop() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterNoop(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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 callFlutterEchoNativeInteropAllTypes( + NativeInteropAllTypes everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNativeInteropAllTypes(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.callFlutterEchoNativeInteropAllTypes$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 NativeInteropAllTypes; + } + + Future callFlutterEchoNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNativeInteropAllNullableTypes(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.callFlutterEchoNativeInteropAllNullableTypes$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 NativeInteropAllNullableTypes?; + } + + 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.NativeInteropHostIntegrationCoreApi.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 NativeInteropAllNullableTypes; + } + + Future + callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion( + everything, + ); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion$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 NativeInteropAllNullableTypesWithoutRecursion?; + } + + 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.NativeInteropHostIntegrationCoreApi.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 NativeInteropAllNullableTypesWithoutRecursion; + } + + 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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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(NativeInteropAnEnum anEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoEnum(anEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAnEnum; + } + + Future callFlutterEchoNativeInteropAnotherEnum( + NativeInteropAnotherEnum anotherEnum, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNativeInteropAnotherEnum(anotherEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.callFlutterEchoNativeInteropAnotherEnum$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 NativeInteropAnotherEnum; + } + + 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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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(NativeInteropAnEnum? anEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoNullableEnum(anEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAnEnum?; + } + + Future callFlutterEchoAnotherNullableEnum( + NativeInteropAnotherEnum? anotherEnum, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAnotherNullableEnum(anotherEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAnotherEnum?; + } + + Future callFlutterNoopAsync() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterNoopAsync(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 callFlutterEchoAsyncNativeInteropAllTypes( + NativeInteropAllTypes everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNativeInteropAllTypes(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.callFlutterEchoAsyncNativeInteropAllTypes$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 NativeInteropAllTypes; + } + + Future callFlutterEchoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableNativeInteropAllNullableTypes( + everything, + ); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.callFlutterEchoAsyncNullableNativeInteropAllNullableTypes$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 NativeInteropAllNullableTypes?; + } + + Future + callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? everything, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi + .callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion(everything); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion$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 NativeInteropAllNullableTypesWithoutRecursion?; + } + + 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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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(NativeInteropAnEnum anEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncEnum(anEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAnEnum; + } + + Future callFlutterEchoAnotherAsyncEnum( + NativeInteropAnotherEnum anotherEnum, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAnotherAsyncEnum(anotherEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAnotherEnum; + } + + 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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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.NativeInteropHostIntegrationCoreApi.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(NativeInteropAnEnum? anEnum) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAsyncNullableEnum(anEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAnEnum?; + } + + Future callFlutterEchoAnotherAsyncNullableEnum( + NativeInteropAnotherEnum? anotherEnum, + ) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.callFlutterEchoAnotherAsyncNullableEnum(anotherEnum); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.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 NativeInteropAnotherEnum?; + } + + /// 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.NativeInteropHostIntegrationCoreApi.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 [NativeInteropFlutterIntegrationCoreApi]. + /// + /// 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.NativeInteropHostIntegrationCoreApi.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; + } + + /// Tests deregistering a Host API natively. + Future testDeregisterHostApi() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.testDeregisterHostApi(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.testDeregisterHostApi$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; + } + + /// Tests deregistering a Flutter API natively. + Future testDeregisterFlutterApi() async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.testDeregisterFlutterApi(); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.testDeregisterFlutterApi$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; + } + + /// Registers and immediately deregisters a Host API under [name]. + Future registerAndImmediatelyDeregisterHostApi(String name) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.registerAndImmediatelyDeregisterHostApi(name); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.registerAndImmediatelyDeregisterHostApi$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([name]); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + _extractReplyValueOrThrow(pigeonVar_replyList, pigeonVar_channelName, isNullValid: true); + } + + /// Tests that calling a deregistered Flutter API under [name] fails / returns null. + Future testCallDeregisteredFlutterApi(String name) async { + if ((Platform.isAndroid || Platform.isIOS || Platform.isMacOS) && _nativeInteropApi != null) { + return _nativeInteropApi.testCallDeregisteredFlutterApi(name); + } + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropHostIntegrationCoreApi.testCallDeregisteredFlutterApi$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send([name]); + 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 NativeInteropFlutterIntegrationCoreApiRegistrar + with jni_bridge.$NativeInteropFlutterIntegrationCoreApi { + NativeInteropFlutterIntegrationCoreApi? dartApi; + + NativeInteropFlutterIntegrationCoreApi register( + NativeInteropFlutterIntegrationCoreApi api, { + String name = defaultInstanceName, + }) { + dartApi = api; + + if (Platform.isAndroid) { + final jni_bridge.NativeInteropFlutterIntegrationCoreApi impl = + jni_bridge.NativeInteropFlutterIntegrationCoreApi.implement(this); + jni_bridge.NativeInteropFlutterIntegrationCoreApiRegistrar().registerInstance( + impl, + name.toJString(), + ); + } + if (Platform.isIOS || Platform.isMacOS) { + final ObjCProtocolBuilder builder = ObjCProtocolBuilder( + debugName: 'NativeInteropFlutterIntegrationCoreApiBridge', + ); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.noopWithError_.implement( + builder, + (ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + dartApi!.noop(); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + return; + } + }, + ); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwFlutterErrorWithError_ + .implement(builder, (ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final Object? response = dartApi!.throwFlutterError(); + return _PigeonFfiCodec.writeValue(response, generic: true); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwErrorWithError_ + .implement(builder, (ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final Object? response = dartApi!.throwError(); + return _PigeonFfiCodec.writeValue(response, generic: true); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwErrorFromVoidWithError_ + .implement(builder, (ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + dartApi!.throwErrorFromVoid(); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + return; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllTypesWithEverything_error_ + .implement(builder, ( + ffi_bridge.NativeInteropAllTypesBridge? everything, + ffi_bridge.NativeInteropTestsError errorOut, + ) { + try { + if (dartApi != null) { + final NativeInteropAllTypes response = dartApi!.echoNativeInteropAllTypes( + NativeInteropAllTypes.fromFfi(everything)!, + ); + return response.toFfi(); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllNullableTypesWithEverything_error_ + .implement(builder, ( + ffi_bridge.NativeInteropAllNullableTypesBridge? everything, + ffi_bridge.NativeInteropTestsError errorOut, + ) { + try { + if (dartApi != null) { + final NativeInteropAllNullableTypes? response = dartApi! + .echoNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes.fromFfi(everything), + ); + return response?.toFfi(); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_ + .implement(builder, ( + NSNumber? aNullableBool, + NSNumber? aNullableInt, + NSString? aNullableString, + ffi_bridge.NativeInteropTestsError errorOut, + ) { + try { + if (dartApi != null) { + final NativeInteropAllNullableTypes response = dartApi!.sendMultipleNullableTypes( + aNullableBool?.boolValue, + aNullableInt?.longValue, + aNullableString?.toDartString(), + ); + return response.toFfi(); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_ + .implement(builder, ( + ffi_bridge.NativeInteropAllNullableTypesWithoutRecursionBridge? everything, + ffi_bridge.NativeInteropTestsError errorOut, + ) { + try { + if (dartApi != null) { + final NativeInteropAllNullableTypesWithoutRecursion? response = dartApi! + .echoNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion.fromFfi(everything), + ); + return response?.toFfi(); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_ + .implement(builder, ( + NSNumber? aNullableBool, + NSNumber? aNullableInt, + NSString? aNullableString, + ffi_bridge.NativeInteropTestsError errorOut, + ) { + try { + if (dartApi != null) { + final NativeInteropAllNullableTypesWithoutRecursion response = dartApi! + .sendMultipleNullableTypesWithoutRecursion( + aNullableBool?.boolValue, + aNullableInt?.longValue, + aNullableString?.toDartString(), + ); + return response.toFfi(); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoBoolWithABool_error_ + .implement(builder, (NSNumber? aBool, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final bool response = dartApi!.echoBool(aBool!.boolValue); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoIntWithAnInt_error_ + .implement(builder, (NSNumber? anInt, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final int response = dartApi!.echoInt(anInt!.longValue); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoDoubleWithADouble_error_ + .implement(builder, (NSNumber? aDouble, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final double response = dartApi!.echoDouble(aDouble!.doubleValue); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoStringWithAString_error_ + .implement(builder, (NSString? aString, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final String response = dartApi!.echoString(aString!.toDartString()); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoUint8ListWithList_error_ + .implement(builder, ( + ffi_bridge.NativeInteropTestsPigeonTypedData? list, + ffi_bridge.NativeInteropTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Uint8List response = dartApi!.echoUint8List( + _PigeonFfiCodec.readValue(list)! as Uint8List, + ); + return _PigeonFfiCodec.writeValue( + response, + ); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoInt32ListWithList_error_ + .implement(builder, ( + ffi_bridge.NativeInteropTestsPigeonTypedData? list, + ffi_bridge.NativeInteropTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Int32List response = dartApi!.echoInt32List( + _PigeonFfiCodec.readValue(list)! as Int32List, + ); + return _PigeonFfiCodec.writeValue( + response, + ); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoInt64ListWithList_error_ + .implement(builder, ( + ffi_bridge.NativeInteropTestsPigeonTypedData? list, + ffi_bridge.NativeInteropTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Int64List response = dartApi!.echoInt64List( + _PigeonFfiCodec.readValue(list)! as Int64List, + ); + return _PigeonFfiCodec.writeValue( + response, + ); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoFloat64ListWithList_error_ + .implement(builder, ( + ffi_bridge.NativeInteropTestsPigeonTypedData? list, + ffi_bridge.NativeInteropTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Float64List response = dartApi!.echoFloat64List( + _PigeonFfiCodec.readValue(list)! as Float64List, + ); + return _PigeonFfiCodec.writeValue( + response, + ); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoListWithList_error_ + .implement(builder, (NSArray? list, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final List response = dartApi!.echoList( + (_PigeonFfiCodec.readValue(list)! as List).cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoEnumListWithEnumList_error_ + .implement(builder, (NSArray? enumList, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final List response = dartApi!.echoEnumList( + (_PigeonFfiCodec.readValue(enumList, NativeInteropAnEnum)! as List) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoClassListWithClassList_error_ + .implement(builder, (NSArray? classList, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final List response = dartApi!.echoClassList( + (_PigeonFfiCodec.readValue(classList)! as List) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNonNullEnumListWithEnumList_error_ + .implement(builder, (NSArray? enumList, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final List response = dartApi!.echoNonNullEnumList( + (_PigeonFfiCodec.readValue(enumList, NativeInteropAnEnum)! as List) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNonNullClassListWithClassList_error_ + .implement(builder, (NSArray? classList, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final List response = dartApi!.echoNonNullClassList( + (_PigeonFfiCodec.readValue(classList)! as List) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoMapWithMap_error_ + .implement(builder, (NSDictionary? map, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final Map response = dartApi!.echoMap( + (_PigeonFfiCodec.readValue(map)! as Map) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoStringMapWithStringMap_error_ + .implement(builder, ( + NSDictionary? stringMap, + ffi_bridge.NativeInteropTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map response = dartApi!.echoStringMap( + (_PigeonFfiCodec.readValue(stringMap)! as Map) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoIntMapWithIntMap_error_ + .implement(builder, (NSDictionary? intMap, ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumMapWithEnumMap_error_ + .implement(builder, (NSDictionary? enumMap, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final Map response = dartApi! + .echoEnumMap( + (_PigeonFfiCodec.readValue(enumMap, NativeInteropAnEnum, NativeInteropAnEnum)! + as Map) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoClassMapWithClassMap_error_ + .implement(builder, ( + NSDictionary? classMap, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNonNullStringMapWithStringMap_error_ + .implement(builder, ( + NSDictionary? stringMap, + ffi_bridge.NativeInteropTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map response = dartApi!.echoNonNullStringMap( + (_PigeonFfiCodec.readValue(stringMap)! as Map) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNonNullIntMapWithIntMap_error_ + .implement(builder, (NSDictionary? intMap, ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNonNullEnumMapWithEnumMap_error_ + .implement(builder, (NSDictionary? enumMap, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final Map response = dartApi! + .echoNonNullEnumMap( + (_PigeonFfiCodec.readValue(enumMap, NativeInteropAnEnum, NativeInteropAnEnum)! + as Map) + .cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNonNullClassMapWithClassMap_error_ + .implement(builder, ( + NSDictionary? classMap, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumWithAnEnum_error_ + .implement(builder, (NSNumber? anEnum, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final NativeInteropAnEnum response = dartApi!.echoEnum( + _PigeonFfiCodec.readValue(anEnum, NativeInteropAnEnum)! as NativeInteropAnEnum, + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAnotherEnumWithAnotherEnum_error_ + .implement(builder, (NSNumber? anotherEnum, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final NativeInteropAnotherEnum response = dartApi!.echoNativeInteropAnotherEnum( + _PigeonFfiCodec.readValue(anotherEnum, NativeInteropAnotherEnum)! + as NativeInteropAnotherEnum, + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableBoolWithABool_error_ + .implement(builder, (NSNumber? aBool, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final bool? response = dartApi!.echoNullableBool(aBool?.boolValue); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableIntWithAnInt_error_ + .implement(builder, (NSNumber? anInt, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final int? response = dartApi!.echoNullableInt(anInt?.longValue); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableDoubleWithADouble_error_ + .implement(builder, (NSNumber? aDouble, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final double? response = dartApi!.echoNullableDouble(aDouble?.doubleValue); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableStringWithAString_error_ + .implement(builder, (NSString? aString, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final String? response = dartApi!.echoNullableString(aString?.toDartString()); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableUint8ListWithList_error_ + .implement(builder, ( + ffi_bridge.NativeInteropTestsPigeonTypedData? list, + ffi_bridge.NativeInteropTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Uint8List? response = dartApi!.echoNullableUint8List( + _PigeonFfiCodec.readValue(list) as Uint8List?, + ); + return _PigeonFfiCodec.writeValue( + response, + ); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableInt32ListWithList_error_ + .implement(builder, ( + ffi_bridge.NativeInteropTestsPigeonTypedData? list, + ffi_bridge.NativeInteropTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Int32List? response = dartApi!.echoNullableInt32List( + _PigeonFfiCodec.readValue(list) as Int32List?, + ); + return _PigeonFfiCodec.writeValue( + response, + ); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableInt64ListWithList_error_ + .implement(builder, ( + ffi_bridge.NativeInteropTestsPigeonTypedData? list, + ffi_bridge.NativeInteropTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Int64List? response = dartApi!.echoNullableInt64List( + _PigeonFfiCodec.readValue(list) as Int64List?, + ); + return _PigeonFfiCodec.writeValue( + response, + ); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableFloat64ListWithList_error_ + .implement(builder, ( + ffi_bridge.NativeInteropTestsPigeonTypedData? list, + ffi_bridge.NativeInteropTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Float64List? response = dartApi!.echoNullableFloat64List( + _PigeonFfiCodec.readValue(list) as Float64List?, + ); + return _PigeonFfiCodec.writeValue( + response, + ); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableListWithList_error_ + .implement(builder, (NSArray? list, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final List? response = dartApi!.echoNullableList( + (_PigeonFfiCodec.readValue(list) as List?)?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumListWithEnumList_error_ + .implement(builder, (NSArray? enumList, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final List? response = dartApi!.echoNullableEnumList( + (_PigeonFfiCodec.readValue(enumList, NativeInteropAnEnum) as List?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableClassListWithClassList_error_ + .implement(builder, (NSArray? classList, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final List? response = dartApi! + .echoNullableClassList( + (_PigeonFfiCodec.readValue(classList) as List?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumListWithEnumList_error_ + .implement(builder, (NSArray? enumList, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final List? response = dartApi!.echoNullableNonNullEnumList( + (_PigeonFfiCodec.readValue(enumList, NativeInteropAnEnum) as List?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassListWithClassList_error_ + .implement(builder, (NSArray? classList, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final List? response = dartApi! + .echoNullableNonNullClassList( + (_PigeonFfiCodec.readValue(classList) as List?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableMapWithMap_error_ + .implement(builder, (NSDictionary? map, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final Map? response = dartApi!.echoNullableMap( + (_PigeonFfiCodec.readValue(map) as Map?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableStringMapWithStringMap_error_ + .implement(builder, ( + NSDictionary? stringMap, + ffi_bridge.NativeInteropTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map? response = dartApi!.echoNullableStringMap( + (_PigeonFfiCodec.readValue(stringMap) as Map?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableIntMapWithIntMap_error_ + .implement(builder, (NSDictionary? intMap, ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumMapWithEnumMap_error_ + .implement(builder, (NSDictionary? enumMap, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final Map? response = dartApi! + .echoNullableEnumMap( + (_PigeonFfiCodec.readValue(enumMap, NativeInteropAnEnum, NativeInteropAnEnum) + as Map?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableClassMapWithClassMap_error_ + .implement(builder, ( + NSDictionary? classMap, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullStringMapWithStringMap_error_ + .implement(builder, ( + NSDictionary? stringMap, + ffi_bridge.NativeInteropTestsError errorOut, + ) { + try { + if (dartApi != null) { + final Map? response = dartApi!.echoNullableNonNullStringMap( + (_PigeonFfiCodec.readValue(stringMap) as Map?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullIntMapWithIntMap_error_ + .implement(builder, (NSDictionary? intMap, ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumMapWithEnumMap_error_ + .implement(builder, (NSDictionary? enumMap, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final Map? response = dartApi! + .echoNullableNonNullEnumMap( + (_PigeonFfiCodec.readValue(enumMap, NativeInteropAnEnum, NativeInteropAnEnum) + as Map?) + ?.cast(), + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassMapWithClassMap_error_ + .implement(builder, ( + NSDictionary? classMap, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableEnumWithAnEnum_error_ + .implement(builder, (NSNumber? anEnum, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final NativeInteropAnEnum? response = dartApi!.echoNullableEnum( + _PigeonFfiCodec.readValue(anEnum, NativeInteropAnEnum) as NativeInteropAnEnum?, + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherNullableEnumWithAnotherEnum_error_ + .implement(builder, (NSNumber? anotherEnum, ffi_bridge.NativeInteropTestsError errorOut) { + try { + if (dartApi != null) { + final NativeInteropAnotherEnum? response = dartApi!.echoAnotherNullableEnum( + _PigeonFfiCodec.readValue(anotherEnum, NativeInteropAnotherEnum) + as NativeInteropAnotherEnum?, + ); + return _PigeonFfiCodec.writeValue(response); + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + return null; + } + } catch (e) { + _reportFfiError(errorOut, e); + return null; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .noopAsyncWithError_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .throwFlutterErrorAsyncWithError_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NativeInteropAllTypesBridge? everything, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNativeInteropAllTypes(NativeInteropAllTypes.fromFfi(everything)!) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropAllTypesBridge$CallExtension( + completionHandler, + ).call(response.toFfi()); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropAllTypesBridge$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropAllTypesBridge$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropAllTypesBridge$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NativeInteropAllNullableTypesBridge? everything, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes.fromFfi(everything), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropAllNullableTypesBridge$CallExtension( + completionHandler, + ).call(response?.toFfi()); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropAllNullableTypesBridge$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropAllNullableTypesBridge$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropAllNullableTypesBridge$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NativeInteropAllNullableTypesWithoutRecursionBridge? everything, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock< + Void Function(ffi_bridge.NativeInteropAllNullableTypesWithoutRecursionBridge?) + > + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion.fromFfi(everything), + ) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge$CallExtension( + completionHandler, + ).call(response?.toFfi()); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncBoolWithABool_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? aBool, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntWithAnInt_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? anInt, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncDoubleWithADouble_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? aDouble, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringWithAString_error_completionHandler_ + .implementAsListener(builder, ( + NSString? aString, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncUint8ListWithList_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NativeInteropTestsPigeonTypedData? list, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncUint8List(_PigeonFfiCodec.readValue(list)! as Uint8List) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue( + response, + ), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt32ListWithList_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NativeInteropTestsPigeonTypedData? list, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncInt32List(_PigeonFfiCodec.readValue(list)! as Int32List) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue( + response, + ), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt64ListWithList_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NativeInteropTestsPigeonTypedData? list, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncInt64List(_PigeonFfiCodec.readValue(list)! as Int64List) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue( + response, + ), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncFloat64ListWithList_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NativeInteropTestsPigeonTypedData? list, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncFloat64List(_PigeonFfiCodec.readValue(list)! as Float64List) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue( + response, + ), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncObjectWithAnObject_error_completionHandler_ + .implementAsListener(builder, ( + NSObject? anObject, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncListWithList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? list, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumListWithEnumList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? enumList, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncEnumList( + (_PigeonFfiCodec.readValue(enumList, NativeInteropAnEnum)! 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassListWithClassList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? classList, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? enumList, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNonNullEnumList( + (_PigeonFfiCodec.readValue(enumList, NativeInteropAnEnum)! 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullClassListWithClassList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? classList, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncMapWithMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? map, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringMapWithStringMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? stringMap, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntMapWithIntMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? intMap, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumMapWithEnumMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? enumMap, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncEnumMap( + (_PigeonFfiCodec.readValue(enumMap, NativeInteropAnEnum, NativeInteropAnEnum)! + 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassMapWithClassMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? classMap, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumWithAnEnum_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? anEnum, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncEnum( + _PigeonFfiCodec.readValue(anEnum, NativeInteropAnEnum)! + as NativeInteropAnEnum, + ) + .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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? anotherEnum, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAnotherAsyncEnum( + _PigeonFfiCodec.readValue(anotherEnum, NativeInteropAnotherEnum)! + as NativeInteropAnotherEnum, + ) + .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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableBoolWithABool_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? aBool, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntWithAnInt_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? anInt, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableDoubleWithADouble_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? aDouble, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringWithAString_error_completionHandler_ + .implementAsListener(builder, ( + NSString? aString, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableUint8ListWithList_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NativeInteropTestsPigeonTypedData? list, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableUint8List(_PigeonFfiCodec.readValue(list) as Uint8List?) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue( + response, + ), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt32ListWithList_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NativeInteropTestsPigeonTypedData? list, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableInt32List(_PigeonFfiCodec.readValue(list) as Int32List?) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue( + response, + ), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt64ListWithList_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NativeInteropTestsPigeonTypedData? list, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableInt64List(_PigeonFfiCodec.readValue(list) as Int64List?) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue( + response, + ), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableFloat64ListWithList_error_completionHandler_ + .implementAsListener(builder, ( + ffi_bridge.NativeInteropTestsPigeonTypedData? list, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock + completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableFloat64List(_PigeonFfiCodec.readValue(list) as Float64List?) + .then( + (response) { + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call( + _PigeonFfiCodec.writeValue( + response, + ), + ); + }, + onError: (Object e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + }, + ); + return; + } else { + _reportFfiError( + errorOut, + 'ArgumentError: NativeInteropFlutterIntegrationCoreApi was not registered.', + ); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + } catch (e) { + _reportFfiError(errorOut, e); + ffi_bridge.ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData$CallExtension( + completionHandler, + ).call(null); + return; + } + }); + ffi_bridge + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableObjectWithAnObject_error_completionHandler_ + .implementAsListener(builder, ( + NSObject? anObject, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableListWithList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? list, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumListWithEnumList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? enumList, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableEnumList( + (_PigeonFfiCodec.readValue(enumList, NativeInteropAnEnum) 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassListWithClassList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? classList, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? enumList, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableNonNullEnumList( + (_PigeonFfiCodec.readValue(enumList, NativeInteropAnEnum) 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_ + .implementAsListener(builder, ( + NSArray? classList, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableMapWithMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? map, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringMapWithStringMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? stringMap, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntMapWithIntMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? intMap, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? enumMap, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableEnumMap( + (_PigeonFfiCodec.readValue(enumMap, NativeInteropAnEnum, NativeInteropAnEnum) + 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassMapWithClassMap_error_completionHandler_ + .implementAsListener(builder, ( + NSDictionary? classMap, + ffi_bridge.NativeInteropTestsError 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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumWithAnEnum_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? anEnum, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAsyncNullableEnum( + _PigeonFfiCodec.readValue(anEnum, NativeInteropAnEnum) + as NativeInteropAnEnum?, + ) + .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: NativeInteropFlutterIntegrationCoreApi 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 + .NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_ + .implementAsListener(builder, ( + NSNumber? anotherEnum, + ffi_bridge.NativeInteropTestsError errorOut, + ObjCBlock completionHandler, + ) { + try { + if (dartApi != null) { + dartApi! + .echoAnotherAsyncNullableEnum( + _PigeonFfiCodec.readValue(anotherEnum, NativeInteropAnotherEnum) + as NativeInteropAnotherEnum?, + ) + .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: NativeInteropFlutterIntegrationCoreApi 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.NativeInteropFlutterIntegrationCoreApiBridge$Builder.$protocol, + ); + final ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge impl = + ffi_bridge.NativeInteropFlutterIntegrationCoreApiBridge.as(builder.build()); + ffi_bridge.NativeInteropFlutterIntegrationCoreApiRegistrar.registerInstanceWithApi( + impl, + name: NSString(name), + ); + } + return api; + } + + @override + void noop() { + if (dartApi != null) { + dartApi!.noop(); + return; + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JObject? throwFlutterError() { + if (dartApi != null) { + final Object? response = dartApi!.throwFlutterError(); + return _PigeonJniCodec.writeValue(response); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + JObject? throwError() { + if (dartApi != null) { + final Object? response = dartApi!.throwError(); + return _PigeonJniCodec.writeValue(response); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + void throwErrorFromVoid() { + if (dartApi != null) { + dartApi!.throwErrorFromVoid(); + return; + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NativeInteropAllTypes echoNativeInteropAllTypes( + jni_bridge.NativeInteropAllTypes everything, + ) { + if (dartApi != null) { + final NativeInteropAllTypes response = dartApi!.echoNativeInteropAllTypes( + NativeInteropAllTypes.fromJni(everything)!, + ); + return response.toJni(); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NativeInteropAllNullableTypes? echoNativeInteropAllNullableTypes( + jni_bridge.NativeInteropAllNullableTypes? everything, + ) { + if (dartApi != null) { + final NativeInteropAllNullableTypes? response = dartApi!.echoNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes.fromJni(everything), + ); + return response?.toJni(); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NativeInteropAllNullableTypes sendMultipleNullableTypes( + JBoolean? aNullableBool, + JLong? aNullableInt, + JString? aNullableString, + ) { + if (dartApi != null) { + final NativeInteropAllNullableTypes response = dartApi!.sendMultipleNullableTypes( + aNullableBool?.toDartBool(releaseOriginal: true), + aNullableInt?.toDartInt(releaseOriginal: true), + aNullableString?.toDartString(releaseOriginal: true), + ); + return response.toJni(); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NativeInteropAllNullableTypesWithoutRecursion? + echoNativeInteropAllNullableTypesWithoutRecursion( + jni_bridge.NativeInteropAllNullableTypesWithoutRecursion? everything, + ) { + if (dartApi != null) { + final NativeInteropAllNullableTypesWithoutRecursion? response = dartApi! + .echoNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion.fromJni(everything), + ); + return response?.toJni(); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NativeInteropAllNullableTypesWithoutRecursion + sendMultipleNullableTypesWithoutRecursion( + JBoolean? aNullableBool, + JLong? aNullableInt, + JString? aNullableString, + ) { + if (dartApi != null) { + final NativeInteropAllNullableTypesWithoutRecursion response = dartApi! + .sendMultipleNullableTypesWithoutRecursion( + aNullableBool?.toDartBool(releaseOriginal: true), + aNullableInt?.toDartInt(releaseOriginal: true), + aNullableString?.toDartString(releaseOriginal: true), + ); + return response.toJni(); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + bool echoBool(bool aBool) { + if (dartApi != null) { + final bool response = dartApi!.echoBool(aBool); + return response; + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + int echoInt(int anInt) { + if (dartApi != null) { + final int response = dartApi!.echoInt(anInt); + return response; + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + double echoDouble(double aDouble) { + if (dartApi != null) { + final double response = dartApi!.echoDouble(aDouble); + return response; + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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>( + response, + ); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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>( + response, + ); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NativeInteropAnEnum echoEnum(jni_bridge.NativeInteropAnEnum anEnum) { + if (dartApi != null) { + final NativeInteropAnEnum response = dartApi!.echoEnum(NativeInteropAnEnum.fromJni(anEnum)!); + return response.toJni(); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NativeInteropAnotherEnum echoNativeInteropAnotherEnum( + jni_bridge.NativeInteropAnotherEnum anotherEnum, + ) { + if (dartApi != null) { + final NativeInteropAnotherEnum response = dartApi!.echoNativeInteropAnotherEnum( + NativeInteropAnotherEnum.fromJni(anotherEnum)!, + ); + return response.toJni(); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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?>( + response, + ); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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?>( + response, + ); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NativeInteropAnEnum? echoNullableEnum(jni_bridge.NativeInteropAnEnum? anEnum) { + if (dartApi != null) { + final NativeInteropAnEnum? response = dartApi!.echoNullableEnum( + NativeInteropAnEnum.fromJni(anEnum), + ); + return response?.toJni(); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + jni_bridge.NativeInteropAnotherEnum? echoAnotherNullableEnum( + jni_bridge.NativeInteropAnotherEnum? anotherEnum, + ) { + if (dartApi != null) { + final NativeInteropAnotherEnum? response = dartApi!.echoAnotherNullableEnum( + NativeInteropAnotherEnum.fromJni(anotherEnum), + ); + return response?.toJni(); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future noopAsync() { + if (dartApi != null) { + return dartApi!.noopAsync().then((response) { + return _PigeonJniCodec._kotlinUnit; + }); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future throwFlutterErrorAsync() { + if (dartApi != null) { + return dartApi!.throwFlutterErrorAsync().then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncNativeInteropAllTypes( + jni_bridge.NativeInteropAllTypes everything, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncNativeInteropAllTypes(NativeInteropAllTypes.fromJni(everything)!) + .then((response) { + return response.toJni(); + }); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncNullableNativeInteropAllNullableTypes( + jni_bridge.NativeInteropAllNullableTypes? everything, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes.fromJni(everything), + ) + .then((response) { + return response?.toJni(); + }); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + jni_bridge.NativeInteropAllNullableTypesWithoutRecursion? everything, + ) { + if (dartApi != null) { + return dartApi! + .echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion.fromJni(everything), + ) + .then((response) { + return response?.toJni(); + }); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncBool(bool aBool) { + if (dartApi != null) { + return dartApi!.echoAsyncBool(aBool).then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncInt(int anInt) { + if (dartApi != null) { + return dartApi!.echoAsyncInt(anInt).then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncDouble(double aDouble) { + if (dartApi != null) { + return dartApi!.echoAsyncDouble(aDouble).then((response) { + return _PigeonJniCodec.writeValue(response); + }); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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>( + response, + ); + }); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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>( + response, + ); + }); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncEnum(jni_bridge.NativeInteropAnEnum anEnum) { + if (dartApi != null) { + return dartApi!.echoAsyncEnum(NativeInteropAnEnum.fromJni(anEnum)!).then((response) { + return response.toJni(); + }); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAnotherAsyncEnum( + jni_bridge.NativeInteropAnotherEnum anotherEnum, + ) { + if (dartApi != null) { + return dartApi!.echoAnotherAsyncEnum(NativeInteropAnotherEnum.fromJni(anotherEnum)!).then(( + response, + ) { + return response.toJni(); + }); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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?>( + response, + ); + }); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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?>( + response, + ); + }); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi 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('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAsyncNullableEnum( + jni_bridge.NativeInteropAnEnum? anEnum, + ) { + if (dartApi != null) { + return dartApi!.echoAsyncNullableEnum(NativeInteropAnEnum.fromJni(anEnum)).then((response) { + return response?.toJni(); + }); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } + + @override + Future echoAnotherAsyncNullableEnum( + jni_bridge.NativeInteropAnotherEnum? anotherEnum, + ) { + if (dartApi != null) { + return dartApi! + .echoAnotherAsyncNullableEnum(NativeInteropAnotherEnum.fromJni(anotherEnum)) + .then((response) { + return response?.toJni(); + }); + } else { + throw ArgumentError('NativeInteropFlutterIntegrationCoreApi was not registered.'); + } + } +} + +abstract class NativeInteropFlutterIntegrationCoreApi { + 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. + NativeInteropAllTypes echoNativeInteropAllTypes(NativeInteropAllTypes everything); + + /// Returns the passed object, to test serialization and deserialization. + NativeInteropAllNullableTypes? echoNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? everything, + ); + + /// Returns passed in arguments of multiple types. + /// + /// Tests multiple-arity FlutterApi handling. + NativeInteropAllNullableTypes sendMultipleNullableTypes( + bool? aNullableBool, + int? aNullableInt, + String? aNullableString, + ); + + /// Returns the passed object, to test serialization and deserialization. + NativeInteropAllNullableTypesWithoutRecursion? echoNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? everything, + ); + + /// Returns passed in arguments of multiple types. + /// + /// Tests multiple-arity FlutterApi handling. + NativeInteropAllNullableTypesWithoutRecursion 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. + NativeInteropAnEnum echoEnum(NativeInteropAnEnum anEnum); + + /// Returns the passed enum to test serialization and deserialization. + NativeInteropAnotherEnum echoNativeInteropAnotherEnum(NativeInteropAnotherEnum 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. + NativeInteropAnEnum? echoNullableEnum(NativeInteropAnEnum? anEnum); + + /// Returns the passed enum to test serialization and deserialization. + NativeInteropAnotherEnum? echoAnotherNullableEnum(NativeInteropAnotherEnum? anotherEnum); + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + Future noopAsync(); + + Future throwFlutterErrorAsync(); + + Future echoAsyncNativeInteropAllTypes(NativeInteropAllTypes everything); + + Future echoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? everything, + ); + + Future + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? 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(NativeInteropAnEnum anEnum); + + Future echoAnotherAsyncEnum(NativeInteropAnotherEnum 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(NativeInteropAnEnum? anEnum); + + Future echoAnotherAsyncNullableEnum( + NativeInteropAnotherEnum? anotherEnum, + ); + + static void setUp( + NativeInteropFlutterIntegrationCoreApi? api, { + BinaryMessenger? binaryMessenger, + String messageChannelSuffix = '', + }) { + if (Platform.isAndroid && api != null) { + NativeInteropFlutterIntegrationCoreApiRegistrar().register( + api, + name: messageChannelSuffix.isEmpty ? defaultInstanceName : messageChannelSuffix, + ); + } + + if ((Platform.isIOS || Platform.isMacOS) && api != null) { + NativeInteropFlutterIntegrationCoreApiRegistrar().register( + api, + name: messageChannelSuffix.isEmpty ? defaultInstanceName : messageChannelSuffix, + ); + } + + messageChannelSuffix = messageChannelSuffix.isNotEmpty ? '.$messageChannelSuffix' : ''; + { + final pigeonVar_channel = BasicMessageChannel( + 'dev.flutter.pigeon.pigeon_integration_tests.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.echoNativeInteropAllTypes$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 NativeInteropAllTypes arg_everything = args[0]! as NativeInteropAllTypes; + try { + final NativeInteropAllTypes output = api.echoNativeInteropAllTypes(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.NativeInteropFlutterIntegrationCoreApi.echoNativeInteropAllNullableTypes$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 NativeInteropAllNullableTypes? arg_everything = + args[0] as NativeInteropAllNullableTypes?; + try { + final NativeInteropAllNullableTypes? output = api.echoNativeInteropAllNullableTypes( + 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.NativeInteropFlutterIntegrationCoreApi.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 NativeInteropAllNullableTypes 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.NativeInteropFlutterIntegrationCoreApi.echoNativeInteropAllNullableTypesWithoutRecursion$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 NativeInteropAllNullableTypesWithoutRecursion? arg_everything = + args[0] as NativeInteropAllNullableTypesWithoutRecursion?; + try { + final NativeInteropAllNullableTypesWithoutRecursion? output = api + .echoNativeInteropAllNullableTypesWithoutRecursion(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.NativeInteropFlutterIntegrationCoreApi.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 NativeInteropAllNullableTypesWithoutRecursion 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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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 NativeInteropAnEnum arg_anEnum = args[0]! as NativeInteropAnEnum; + try { + final NativeInteropAnEnum 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.NativeInteropFlutterIntegrationCoreApi.echoNativeInteropAnotherEnum$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 NativeInteropAnotherEnum arg_anotherEnum = args[0]! as NativeInteropAnotherEnum; + try { + final NativeInteropAnotherEnum output = api.echoNativeInteropAnotherEnum( + 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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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 NativeInteropAnEnum? arg_anEnum = args[0] as NativeInteropAnEnum?; + try { + final NativeInteropAnEnum? 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.NativeInteropFlutterIntegrationCoreApi.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 NativeInteropAnotherEnum? arg_anotherEnum = args[0] as NativeInteropAnotherEnum?; + try { + final NativeInteropAnotherEnum? 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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.echoAsyncNativeInteropAllTypes$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 NativeInteropAllTypes arg_everything = args[0]! as NativeInteropAllTypes; + try { + final NativeInteropAllTypes output = await api.echoAsyncNativeInteropAllTypes( + 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.NativeInteropFlutterIntegrationCoreApi.echoAsyncNullableNativeInteropAllNullableTypes$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 NativeInteropAllNullableTypes? arg_everything = + args[0] as NativeInteropAllNullableTypes?; + try { + final NativeInteropAllNullableTypes? output = await api + .echoAsyncNullableNativeInteropAllNullableTypes(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.NativeInteropFlutterIntegrationCoreApi.echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion$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 NativeInteropAllNullableTypesWithoutRecursion? arg_everything = + args[0] as NativeInteropAllNullableTypesWithoutRecursion?; + try { + final NativeInteropAllNullableTypesWithoutRecursion? output = await api + .echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion(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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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 NativeInteropAnEnum arg_anEnum = args[0]! as NativeInteropAnEnum; + try { + final NativeInteropAnEnum 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.NativeInteropFlutterIntegrationCoreApi.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 NativeInteropAnotherEnum arg_anotherEnum = args[0]! as NativeInteropAnotherEnum; + try { + final NativeInteropAnotherEnum 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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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.NativeInteropFlutterIntegrationCoreApi.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 NativeInteropAnEnum? arg_anEnum = args[0] as NativeInteropAnEnum?; + try { + final NativeInteropAnEnum? 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.NativeInteropFlutterIntegrationCoreApi.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 NativeInteropAnotherEnum? arg_anotherEnum = args[0] as NativeInteropAnotherEnum?; + try { + final NativeInteropAnotherEnum? 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 NativeInteropFlutterIntegrationCoreApi implement( + NativeInteropFlutterIntegrationCoreApi api, { + String name = '', + }) { + return NativeInteropFlutterIntegrationCoreApiRegistrar().register(api, name: name); + } +} diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/native_interop_tests.gen.ffi.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/native_interop_tests.gen.ffi.dart new file mode 100644 index 000000000000..c668e878b6a9 --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/native_interop_tests.gen.ffi.dart @@ -0,0 +1,29755 @@ +// 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 _julz8q_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 _julz8q_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 _julz8q_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 _julz8q_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 _julz8q_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 _julz8q_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 _julz8q_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 _julz8q_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 _julz8q_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 _julz8q_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 _julz8q_wrapBlockingBlock_xtuoz7( + ffi.Pointer block, + ffi.Pointer listnerBlock, + ffi.Pointer context, +); + +@ffi.Native Function(ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _julz8q_wrapListenerBlock_18v1jvf( + ffi.Pointer block, +); + +@ffi.Native Function(ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _julz8q_wrapListenerBlock_1pl9qdv( + ffi.Pointer block, +); + +@ffi.Native Function(ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _julz8q_wrapListenerBlock_bklti2( + ffi.Pointer block, +); + +@ffi.Native Function(ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _julz8q_wrapListenerBlock_jk1ljc( + ffi.Pointer block, +); + +@ffi.Native Function(ffi.Pointer)>(isLeaf: true) +external ffi.Pointer _julz8q_wrapListenerBlock_xtuoz7( + ffi.Pointer block, +); + +/// 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'), + }; +} + +/// A class for testing nested class handling. +/// This is needed to test nested nullable and non-nullable classes, +/// NativeInteropAllNullableTypes is non-nullable here as it is easier to instantiate +/// than NativeInteropAllTypes when testing doesn’t require both (ie. testing null classes). +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +extension type NativeInteropAllClassesWrapperBridge._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NativeInteropAllClassesWrapperBridge] that points to the same underlying object as [other]. + NativeInteropAllClassesWrapperBridge.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NativeInteropAllClassesWrapperBridge] that wraps the given raw object pointer. + NativeInteropAllClassesWrapperBridge.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 [NativeInteropAllClassesWrapperBridge]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NativeInteropAllClassesWrapperBridge, + ); + + /// alloc + static NativeInteropAllClassesWrapperBridge alloc() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropAllClassesWrapperBridge, _sel_alloc); + return NativeInteropAllClassesWrapperBridge.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NativeInteropAllClassesWrapperBridge allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NativeInteropAllClassesWrapperBridge, + _sel_allocWithZone_, + zone, + ); + return NativeInteropAllClassesWrapperBridge.fromPointer($ret, retain: false, release: true); + } +} + +extension NativeInteropAllClassesWrapperBridge$Methods on NativeInteropAllClassesWrapperBridge { + /// allNullableTypes + NativeInteropAllNullableTypesBridge get allNullableTypes { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_allNullableTypes); + return NativeInteropAllNullableTypesBridge.fromPointer($ret, retain: true, release: true); + } + + /// allNullableTypesWithoutRecursion + NativeInteropAllNullableTypesWithoutRecursionBridge? get allNullableTypesWithoutRecursion { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_allNullableTypesWithoutRecursion); + return $ret.address == 0 + ? null + : NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// allTypes + NativeInteropAllTypesBridge? get allTypes { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_allTypes); + return $ret.address == 0 + ? null + : NativeInteropAllTypesBridge.fromPointer($ret, retain: true, release: true); + } + + /// classList + objc.NSArray get classList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_classList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// classMap + objc.NSDictionary get classMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_classMap); + return objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// initWithAllNullableTypes:allNullableTypesWithoutRecursion:allTypes:classList:nullableClassList:classMap:nullableClassMap: + NativeInteropAllClassesWrapperBridge initWithAllNullableTypes( + NativeInteropAllNullableTypesBridge allNullableTypes, { + NativeInteropAllNullableTypesWithoutRecursionBridge? allNullableTypesWithoutRecursion, + NativeInteropAllTypesBridge? allTypes, + required objc.NSArray classList, + objc.NSArray? nullableClassList, + required objc.NSDictionary classMap, + objc.NSDictionary? nullableClassMap, + }) { + 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 NativeInteropAllClassesWrapperBridge.fromPointer($ret, retain: false, release: true); + } + + /// nullableClassList + objc.NSArray? get nullableClassList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_nullableClassList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// nullableClassMap + objc.NSDictionary? get nullableClassMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_nullableClassMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// setAllNullableTypes: + set allNullableTypes(NativeInteropAllNullableTypesBridge value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setAllNullableTypes_, value.ref.pointer); + } + + /// setAllNullableTypesWithoutRecursion: + set allNullableTypesWithoutRecursion(NativeInteropAllNullableTypesWithoutRecursionBridge? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setAllNullableTypesWithoutRecursion_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setAllTypes: + set allTypes(NativeInteropAllTypesBridge? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setAllTypes_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setClassList: + set classList(objc.NSArray value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setClassList_, value.ref.pointer); + } + + /// setClassMap: + set classMap(objc.NSDictionary value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setClassMap_, value.ref.pointer); + } + + /// setNullableClassList: + set nullableClassList(objc.NSArray? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setNullableClassList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setNullableClassMap: + set nullableClassMap(objc.NSDictionary? value) { + _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. +extension type NativeInteropAllNullableTypesBridge._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NativeInteropAllNullableTypesBridge] that points to the same underlying object as [other]. + NativeInteropAllNullableTypesBridge.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NativeInteropAllNullableTypesBridge] that wraps the given raw object pointer. + NativeInteropAllNullableTypesBridge.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 [NativeInteropAllNullableTypesBridge]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NativeInteropAllNullableTypesBridge, + ); + + /// alloc + static NativeInteropAllNullableTypesBridge alloc() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropAllNullableTypesBridge, _sel_alloc); + return NativeInteropAllNullableTypesBridge.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NativeInteropAllNullableTypesBridge allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NativeInteropAllNullableTypesBridge, + _sel_allocWithZone_, + zone, + ); + return NativeInteropAllNullableTypesBridge.fromPointer($ret, retain: false, release: true); + } +} + +extension NativeInteropAllNullableTypesBridge$Methods on NativeInteropAllNullableTypesBridge { + /// aNullable4ByteArray + NativeInteropTestsPigeonTypedData? get aNullable4ByteArray { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullable4ByteArray); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// aNullable8ByteArray + NativeInteropTestsPigeonTypedData? get aNullable8ByteArray { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullable8ByteArray); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// aNullableBool + objc.NSNumber? get aNullableBool { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableBool); + return $ret.address == 0 ? null : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// aNullableByteArray + NativeInteropTestsPigeonTypedData? get aNullableByteArray { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableByteArray); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// aNullableDouble + objc.NSNumber? get aNullableDouble { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableDouble); + return $ret.address == 0 ? null : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// aNullableEnum + objc.NSNumber? get aNullableEnum { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableEnum); + return $ret.address == 0 ? null : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// aNullableFloatArray + NativeInteropTestsPigeonTypedData? get aNullableFloatArray { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableFloatArray); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// aNullableInt + objc.NSNumber? get aNullableInt { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableInt); + return $ret.address == 0 ? null : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// aNullableInt64 + objc.NSNumber? get aNullableInt64 { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableInt64); + return $ret.address == 0 ? null : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// aNullableObject + objc.NSObject? get aNullableObject { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableObject); + return $ret.address == 0 ? null : objc.NSObject.fromPointer($ret, retain: true, release: true); + } + + /// aNullableString + objc.NSString? get aNullableString { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableString); + return $ret.address == 0 ? null : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// allNullableTypes + NativeInteropAllNullableTypesBridge? get allNullableTypes { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_allNullableTypes); + return $ret.address == 0 + ? null + : NativeInteropAllNullableTypesBridge.fromPointer($ret, retain: true, release: true); + } + + /// anotherNullableEnum + objc.NSNumber? get anotherNullableEnum { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_anotherNullableEnum); + return $ret.address == 0 ? null : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// boolList + objc.NSArray? get boolList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_boolList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// doubleList + objc.NSArray? get doubleList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_doubleList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// enumList + objc.NSArray? get enumList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_enumList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// enumMap + objc.NSDictionary? get enumMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_enumMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, 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: + NativeInteropAllNullableTypesBridge initWithANullableBool( + objc.NSNumber? aNullableBool, { + objc.NSNumber? aNullableInt, + objc.NSNumber? aNullableInt64, + objc.NSNumber? aNullableDouble, + NativeInteropTestsPigeonTypedData? aNullableByteArray, + NativeInteropTestsPigeonTypedData? aNullable4ByteArray, + NativeInteropTestsPigeonTypedData? aNullable8ByteArray, + NativeInteropTestsPigeonTypedData? aNullableFloatArray, + objc.NSNumber? aNullableEnum, + objc.NSNumber? anotherNullableEnum, + objc.NSString? aNullableString, + objc.NSObject? aNullableObject, + NativeInteropAllNullableTypesBridge? 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, + }) { + 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 NativeInteropAllNullableTypesBridge.fromPointer($ret, retain: false, release: true); + } + + /// intList + objc.NSArray? get intList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_intList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// intMap + objc.NSDictionary? get intMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_intMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// list + objc.NSArray? get list { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_list); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// listList + objc.NSArray? get listList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_listList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// listMap + objc.NSDictionary? get listMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_listMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// map + objc.NSDictionary? get map { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_map); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// mapList + objc.NSArray? get mapList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_mapList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// mapMap + objc.NSDictionary? get mapMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_mapMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// objectList + objc.NSArray? get objectList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_objectList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// objectMap + objc.NSDictionary? get objectMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_objectMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// recursiveClassList + objc.NSArray? get recursiveClassList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_recursiveClassList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// recursiveClassMap + objc.NSDictionary? get recursiveClassMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_recursiveClassMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// setANullable4ByteArray: + set aNullable4ByteArray(NativeInteropTestsPigeonTypedData? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullable4ByteArray_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullable8ByteArray: + set aNullable8ByteArray(NativeInteropTestsPigeonTypedData? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullable8ByteArray_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableBool: + set aNullableBool(objc.NSNumber? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableBool_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableByteArray: + set aNullableByteArray(NativeInteropTestsPigeonTypedData? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableByteArray_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableDouble: + set aNullableDouble(objc.NSNumber? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableDouble_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableEnum: + set aNullableEnum(objc.NSNumber? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableEnum_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableFloatArray: + set aNullableFloatArray(NativeInteropTestsPigeonTypedData? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableFloatArray_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableInt64: + set aNullableInt64(objc.NSNumber? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableInt64_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableInt: + set aNullableInt(objc.NSNumber? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableInt_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableObject: + set aNullableObject(objc.NSObject? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableObject_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableString: + set aNullableString(objc.NSString? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableString_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setAllNullableTypes: + set allNullableTypes(NativeInteropAllNullableTypesBridge? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setAllNullableTypes_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setAnotherNullableEnum: + set anotherNullableEnum(objc.NSNumber? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setAnotherNullableEnum_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setBoolList: + set boolList(objc.NSArray? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setBoolList_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setDoubleList: + set doubleList(objc.NSArray? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setDoubleList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setEnumList: + set enumList(objc.NSArray? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setEnumList_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setEnumMap: + set enumMap(objc.NSDictionary? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setEnumMap_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setIntList: + set intList(objc.NSArray? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setIntList_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setIntMap: + set intMap(objc.NSDictionary? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setIntMap_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setList: + set list(objc.NSArray? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setList_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setListList: + set listList(objc.NSArray? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setListList_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setListMap: + set listMap(objc.NSDictionary? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setListMap_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setMap: + set map(objc.NSDictionary? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setMap_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setMapList: + set mapList(objc.NSArray? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setMapList_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setMapMap: + set mapMap(objc.NSDictionary? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setMapMap_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setObjectList: + set objectList(objc.NSArray? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setObjectList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setObjectMap: + set objectMap(objc.NSDictionary? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setObjectMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setRecursiveClassList: + set recursiveClassList(objc.NSArray? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setRecursiveClassList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setRecursiveClassMap: + set recursiveClassMap(objc.NSDictionary? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setRecursiveClassMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setStringList: + set stringList(objc.NSArray? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setStringList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setStringMap: + set stringMap(objc.NSDictionary? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setStringMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// stringList + objc.NSArray? get stringList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_stringList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// stringMap + objc.NSDictionary? get stringMap { + 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 [NativeInteropAllNullableTypes] class is being used to +/// test Swift classes. +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +extension type NativeInteropAllNullableTypesWithoutRecursionBridge._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NativeInteropAllNullableTypesWithoutRecursionBridge] that points to the same underlying object as [other]. + NativeInteropAllNullableTypesWithoutRecursionBridge.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NativeInteropAllNullableTypesWithoutRecursionBridge] that wraps the given raw object pointer. + NativeInteropAllNullableTypesWithoutRecursionBridge.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 [NativeInteropAllNullableTypesWithoutRecursionBridge]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NativeInteropAllNullableTypesWithoutRecursionBridge, + ); + + /// alloc + static NativeInteropAllNullableTypesWithoutRecursionBridge alloc() { + final $ret = _objc_msgSend_151sglz( + _class_NativeInteropAllNullableTypesWithoutRecursionBridge, + _sel_alloc, + ); + return NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// allocWithZone: + static NativeInteropAllNullableTypesWithoutRecursionBridge allocWithZone( + ffi.Pointer zone, + ) { + final $ret = _objc_msgSend_1cwp428( + _class_NativeInteropAllNullableTypesWithoutRecursionBridge, + _sel_allocWithZone_, + zone, + ); + return NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } +} + +extension NativeInteropAllNullableTypesWithoutRecursionBridge$Methods + on NativeInteropAllNullableTypesWithoutRecursionBridge { + /// aNullable4ByteArray + NativeInteropTestsPigeonTypedData? get aNullable4ByteArray { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullable4ByteArray); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// aNullable8ByteArray + NativeInteropTestsPigeonTypedData? get aNullable8ByteArray { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullable8ByteArray); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// aNullableBool + objc.NSNumber? get aNullableBool { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableBool); + return $ret.address == 0 ? null : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// aNullableByteArray + NativeInteropTestsPigeonTypedData? get aNullableByteArray { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableByteArray); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// aNullableDouble + objc.NSNumber? get aNullableDouble { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableDouble); + return $ret.address == 0 ? null : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// aNullableEnum + objc.NSNumber? get aNullableEnum { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableEnum); + return $ret.address == 0 ? null : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// aNullableFloatArray + NativeInteropTestsPigeonTypedData? get aNullableFloatArray { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableFloatArray); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// aNullableInt + objc.NSNumber? get aNullableInt { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableInt); + return $ret.address == 0 ? null : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// aNullableInt64 + objc.NSNumber? get aNullableInt64 { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableInt64); + return $ret.address == 0 ? null : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// aNullableObject + objc.NSObject? get aNullableObject { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableObject); + return $ret.address == 0 ? null : objc.NSObject.fromPointer($ret, retain: true, release: true); + } + + /// aNullableString + objc.NSString? get aNullableString { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aNullableString); + return $ret.address == 0 ? null : objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// anotherNullableEnum + objc.NSNumber? get anotherNullableEnum { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_anotherNullableEnum); + return $ret.address == 0 ? null : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// boolList + objc.NSArray? get boolList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_boolList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// doubleList + objc.NSArray? get doubleList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_doubleList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// enumList + objc.NSArray? get enumList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_enumList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// enumMap + objc.NSDictionary? get enumMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_enumMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, 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: + NativeInteropAllNullableTypesWithoutRecursionBridge initWithANullableBool( + objc.NSNumber? aNullableBool, { + objc.NSNumber? aNullableInt, + objc.NSNumber? aNullableInt64, + objc.NSNumber? aNullableDouble, + NativeInteropTestsPigeonTypedData? aNullableByteArray, + NativeInteropTestsPigeonTypedData? aNullable4ByteArray, + NativeInteropTestsPigeonTypedData? aNullable8ByteArray, + NativeInteropTestsPigeonTypedData? 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, + }) { + 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 NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// intList + objc.NSArray? get intList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_intList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// intMap + objc.NSDictionary? get intMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_intMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// list + objc.NSArray? get list { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_list); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// listList + objc.NSArray? get listList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_listList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// listMap + objc.NSDictionary? get listMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_listMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// map + objc.NSDictionary? get map { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_map); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// mapList + objc.NSArray? get mapList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_mapList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// mapMap + objc.NSDictionary? get mapMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_mapMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// objectList + objc.NSArray? get objectList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_objectList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// objectMap + objc.NSDictionary? get objectMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_objectMap); + return $ret.address == 0 + ? null + : objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// setANullable4ByteArray: + set aNullable4ByteArray(NativeInteropTestsPigeonTypedData? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullable4ByteArray_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullable8ByteArray: + set aNullable8ByteArray(NativeInteropTestsPigeonTypedData? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullable8ByteArray_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableBool: + set aNullableBool(objc.NSNumber? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableBool_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableByteArray: + set aNullableByteArray(NativeInteropTestsPigeonTypedData? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableByteArray_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableDouble: + set aNullableDouble(objc.NSNumber? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableDouble_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableEnum: + set aNullableEnum(objc.NSNumber? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableEnum_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableFloatArray: + set aNullableFloatArray(NativeInteropTestsPigeonTypedData? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableFloatArray_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableInt64: + set aNullableInt64(objc.NSNumber? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableInt64_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableInt: + set aNullableInt(objc.NSNumber? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableInt_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableObject: + set aNullableObject(objc.NSObject? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableObject_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setANullableString: + set aNullableString(objc.NSString? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setANullableString_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setAnotherNullableEnum: + set anotherNullableEnum(objc.NSNumber? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setAnotherNullableEnum_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setBoolList: + set boolList(objc.NSArray? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setBoolList_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setDoubleList: + set doubleList(objc.NSArray? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setDoubleList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setEnumList: + set enumList(objc.NSArray? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setEnumList_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setEnumMap: + set enumMap(objc.NSDictionary? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setEnumMap_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setIntList: + set intList(objc.NSArray? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setIntList_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setIntMap: + set intMap(objc.NSDictionary? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setIntMap_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setList: + set list(objc.NSArray? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setList_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setListList: + set listList(objc.NSArray? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setListList_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setListMap: + set listMap(objc.NSDictionary? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setListMap_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setMap: + set map(objc.NSDictionary? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setMap_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setMapList: + set mapList(objc.NSArray? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setMapList_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setMapMap: + set mapMap(objc.NSDictionary? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setMapMap_, value?.ref.pointer ?? ffi.nullptr); + } + + /// setObjectList: + set objectList(objc.NSArray? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setObjectList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setObjectMap: + set objectMap(objc.NSDictionary? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setObjectMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setStringList: + set stringList(objc.NSArray? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setStringList_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// setStringMap: + set stringMap(objc.NSDictionary? value) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_setStringMap_, + value?.ref.pointer ?? ffi.nullptr, + ); + } + + /// stringList + objc.NSArray? get stringList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_stringList); + return $ret.address == 0 ? null : objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// stringMap + objc.NSDictionary? get stringMap { + 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. +extension type NativeInteropAllTypesBridge._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NativeInteropAllTypesBridge] that points to the same underlying object as [other]. + NativeInteropAllTypesBridge.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NativeInteropAllTypesBridge] that wraps the given raw object pointer. + NativeInteropAllTypesBridge.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 [NativeInteropAllTypesBridge]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NativeInteropAllTypesBridge, + ); + + /// alloc + static NativeInteropAllTypesBridge alloc() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropAllTypesBridge, _sel_alloc); + return NativeInteropAllTypesBridge.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NativeInteropAllTypesBridge allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NativeInteropAllTypesBridge, + _sel_allocWithZone_, + zone, + ); + return NativeInteropAllTypesBridge.fromPointer($ret, retain: false, release: true); + } +} + +extension NativeInteropAllTypesBridge$Methods on NativeInteropAllTypesBridge { + /// a4ByteArray + NativeInteropTestsPigeonTypedData get a4ByteArray { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_a4ByteArray); + return NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// a8ByteArray + NativeInteropTestsPigeonTypedData get a8ByteArray { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_a8ByteArray); + return NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// aBool + bool get aBool { + return _objc_msgSend_91o635(object$.ref.pointer, _sel_aBool); + } + + /// aByteArray + NativeInteropTestsPigeonTypedData get aByteArray { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aByteArray); + return NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// aDouble + double get aDouble { + return objc.useMsgSendVariants + ? _objc_msgSend_1ukqyt8Fpret(object$.ref.pointer, _sel_aDouble) + : _objc_msgSend_1ukqyt8(object$.ref.pointer, _sel_aDouble); + } + + /// aFloatArray + NativeInteropTestsPigeonTypedData get aFloatArray { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aFloatArray); + return NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// aString + objc.NSString get aString { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aString); + return objc.NSString.fromPointer($ret, retain: true, release: true); + } + + /// anEnum + NativeInteropAnEnum get anEnum { + final $ret = _objc_msgSend_13e57b1(object$.ref.pointer, _sel_anEnum); + return NativeInteropAnEnum.fromValue($ret); + } + + /// anInt + int get anInt { + return _objc_msgSend_pysgoz(object$.ref.pointer, _sel_anInt); + } + + /// anInt64 + int get anInt64 { + return _objc_msgSend_pysgoz(object$.ref.pointer, _sel_anInt64); + } + + /// anObject + objc.NSObject get anObject { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_anObject); + return objc.NSObject.fromPointer($ret, retain: true, release: true); + } + + /// anotherEnum + NativeInteropAnotherEnum get anotherEnum { + final $ret = _objc_msgSend_xw7tjf(object$.ref.pointer, _sel_anotherEnum); + return NativeInteropAnotherEnum.fromValue($ret); + } + + /// boolList + objc.NSArray get boolList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_boolList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// doubleList + objc.NSArray get doubleList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_doubleList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// enumList + objc.NSArray get enumList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_enumList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// enumMap + objc.NSDictionary get enumMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_enumMap); + return objc.NSDictionary.fromPointer($ret, retain: true, 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: + NativeInteropAllTypesBridge initWithABool( + bool aBool, { + required int anInt, + required int anInt64, + required double aDouble, + required NativeInteropTestsPigeonTypedData aByteArray, + required NativeInteropTestsPigeonTypedData a4ByteArray, + required NativeInteropTestsPigeonTypedData a8ByteArray, + required NativeInteropTestsPigeonTypedData aFloatArray, + required NativeInteropAnEnum anEnum, + required NativeInteropAnotherEnum 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, + }) { + final $ret = _objc_msgSend_1rzlw7q( + 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 NativeInteropAllTypesBridge.fromPointer($ret, retain: false, release: true); + } + + /// intList + objc.NSArray get intList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_intList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// intMap + objc.NSDictionary get intMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_intMap); + return objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// list + objc.NSArray get list { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_list); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// listList + objc.NSArray get listList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_listList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// listMap + objc.NSDictionary get listMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_listMap); + return objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// map + objc.NSDictionary get map { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_map); + return objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// mapList + objc.NSArray get mapList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_mapList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// mapMap + objc.NSDictionary get mapMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_mapMap); + return objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// objectList + objc.NSArray get objectList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_objectList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// objectMap + objc.NSDictionary get objectMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_objectMap); + return objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } + + /// setA4ByteArray: + set a4ByteArray(NativeInteropTestsPigeonTypedData value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setA4ByteArray_, value.ref.pointer); + } + + /// setA8ByteArray: + set a8ByteArray(NativeInteropTestsPigeonTypedData value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setA8ByteArray_, value.ref.pointer); + } + + /// setABool: + set aBool(bool value) { + _objc_msgSend_1s56lr9(object$.ref.pointer, _sel_setABool_, value); + } + + /// setAByteArray: + set aByteArray(NativeInteropTestsPigeonTypedData value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setAByteArray_, value.ref.pointer); + } + + /// setADouble: + set aDouble(double value) { + _objc_msgSend_hwm8nu(object$.ref.pointer, _sel_setADouble_, value); + } + + /// setAFloatArray: + set aFloatArray(NativeInteropTestsPigeonTypedData value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setAFloatArray_, value.ref.pointer); + } + + /// setAString: + set aString(objc.NSString value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setAString_, value.ref.pointer); + } + + /// setAnEnum: + set anEnum(NativeInteropAnEnum value) { + _objc_msgSend_wqpzrx(object$.ref.pointer, _sel_setAnEnum_, value.value); + } + + /// setAnInt64: + set anInt64(int value) { + _objc_msgSend_17gvxvj(object$.ref.pointer, _sel_setAnInt64_, value); + } + + /// setAnInt: + set anInt(int value) { + _objc_msgSend_17gvxvj(object$.ref.pointer, _sel_setAnInt_, value); + } + + /// setAnObject: + set anObject(objc.NSObject value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setAnObject_, value.ref.pointer); + } + + /// setAnotherEnum: + set anotherEnum(NativeInteropAnotherEnum value) { + _objc_msgSend_1ptq3i3(object$.ref.pointer, _sel_setAnotherEnum_, value.value); + } + + /// setBoolList: + set boolList(objc.NSArray value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setBoolList_, value.ref.pointer); + } + + /// setDoubleList: + set doubleList(objc.NSArray value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setDoubleList_, value.ref.pointer); + } + + /// setEnumList: + set enumList(objc.NSArray value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setEnumList_, value.ref.pointer); + } + + /// setEnumMap: + set enumMap(objc.NSDictionary value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setEnumMap_, value.ref.pointer); + } + + /// setIntList: + set intList(objc.NSArray value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setIntList_, value.ref.pointer); + } + + /// setIntMap: + set intMap(objc.NSDictionary value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setIntMap_, value.ref.pointer); + } + + /// setList: + set list(objc.NSArray value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setList_, value.ref.pointer); + } + + /// setListList: + set listList(objc.NSArray value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setListList_, value.ref.pointer); + } + + /// setListMap: + set listMap(objc.NSDictionary value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setListMap_, value.ref.pointer); + } + + /// setMap: + set map(objc.NSDictionary value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setMap_, value.ref.pointer); + } + + /// setMapList: + set mapList(objc.NSArray value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setMapList_, value.ref.pointer); + } + + /// setMapMap: + set mapMap(objc.NSDictionary value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setMapMap_, value.ref.pointer); + } + + /// setObjectList: + set objectList(objc.NSArray value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setObjectList_, value.ref.pointer); + } + + /// setObjectMap: + set objectMap(objc.NSDictionary value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setObjectMap_, value.ref.pointer); + } + + /// setStringList: + set stringList(objc.NSArray value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setStringList_, value.ref.pointer); + } + + /// setStringMap: + set stringMap(objc.NSDictionary value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setStringMap_, value.ref.pointer); + } + + /// stringList + objc.NSArray get stringList { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_stringList); + return objc.NSArray.fromPointer($ret, retain: true, release: true); + } + + /// stringMap + objc.NSDictionary get stringMap { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_stringMap); + return objc.NSDictionary.fromPointer($ret, retain: true, release: true); + } +} + +enum NativeInteropAnEnum { + NativeInteropAnEnumOne(0), + NativeInteropAnEnumTwo(1), + NativeInteropAnEnumThree(2), + NativeInteropAnEnumFortyTwo(3), + NativeInteropAnEnumFourHundredTwentyTwo(4); + + final int value; + const NativeInteropAnEnum(this.value); + + static NativeInteropAnEnum fromValue(int value) => switch (value) { + 0 => NativeInteropAnEnumOne, + 1 => NativeInteropAnEnumTwo, + 2 => NativeInteropAnEnumThree, + 3 => NativeInteropAnEnumFortyTwo, + 4 => NativeInteropAnEnumFourHundredTwentyTwo, + _ => throw ArgumentError('Unknown value for NativeInteropAnEnum: $value'), + }; +} + +enum NativeInteropAnotherEnum { + NativeInteropAnotherEnumJustInCase(0); + + final int value; + const NativeInteropAnotherEnum(this.value); + + static NativeInteropAnotherEnum fromValue(int value) => switch (value) { + 0 => NativeInteropAnotherEnumJustInCase, + _ => throw ArgumentError('Unknown value for NativeInteropAnotherEnum: $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. +extension type NativeInteropFlutterIntegrationCoreApiBridge._(objc.ObjCProtocol object$) + implements objc.ObjCProtocol { + /// Constructs a [NativeInteropFlutterIntegrationCoreApiBridge] that points to the same underlying object as [other]. + NativeInteropFlutterIntegrationCoreApiBridge.as(objc.ObjCObject other) : object$ = other; + + /// Constructs a [NativeInteropFlutterIntegrationCoreApiBridge] that wraps the given raw object pointer. + NativeInteropFlutterIntegrationCoreApiBridge.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 [NativeInteropFlutterIntegrationCoreApiBridge]. + static bool conformsTo(objc.ObjCObject obj) { + return _objc_msgSend_e3qsqz( + obj.ref.pointer, + _sel_conformsToProtocol_, + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + ); + } +} + +extension NativeInteropFlutterIntegrationCoreApiBridge$Methods + on NativeInteropFlutterIntegrationCoreApiBridge { + /// echoAnotherAsyncEnumWithAnotherEnum:error:completionHandler: + void echoAnotherAsyncEnumWithAnotherEnum( + objc.NSNumber? anotherEnum, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + anotherEnum?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAnotherAsyncNullableEnumWithAnotherEnum:error:completionHandler: + void echoAnotherAsyncNullableEnumWithAnotherEnum( + objc.NSNumber? anotherEnum, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _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. + objc.NSNumber? echoAnotherNullableEnumWithAnotherEnum( + objc.NSNumber? anotherEnum, { + required NativeInteropTestsError error, + }) { + 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: + void echoAsyncBoolWithABool( + objc.NSNumber? aBool, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncBoolWithABool_error_completionHandler_, + aBool?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncClassListWithClassList:error:completionHandler: + void echoAsyncClassListWithClassList( + objc.NSArray? classList, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncClassListWithClassList_error_completionHandler_, + classList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncClassMapWithClassMap:error:completionHandler: + void echoAsyncClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncClassMapWithClassMap_error_completionHandler_, + classMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncDoubleWithADouble:error:completionHandler: + void echoAsyncDoubleWithADouble( + objc.NSNumber? aDouble, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncDoubleWithADouble_error_completionHandler_, + aDouble?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncEnumListWithEnumList:error:completionHandler: + void echoAsyncEnumListWithEnumList( + objc.NSArray? enumList, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncEnumListWithEnumList_error_completionHandler_, + enumList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncEnumMapWithEnumMap:error:completionHandler: + void echoAsyncEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncEnumMapWithEnumMap_error_completionHandler_, + enumMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncEnumWithAnEnum:error:completionHandler: + void echoAsyncEnumWithAnEnum( + objc.NSNumber? anEnum, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncEnumWithAnEnum_error_completionHandler_, + anEnum?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncFloat64ListWithList:error:completionHandler: + void echoAsyncFloat64ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncFloat64ListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncInt32ListWithList:error:completionHandler: + void echoAsyncInt32ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncInt32ListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncInt64ListWithList:error:completionHandler: + void echoAsyncInt64ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncInt64ListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncIntMapWithIntMap:error:completionHandler: + void echoAsyncIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncIntMapWithIntMap_error_completionHandler_, + intMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncIntWithAnInt:error:completionHandler: + void echoAsyncIntWithAnInt( + objc.NSNumber? anInt, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncIntWithAnInt_error_completionHandler_, + anInt?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncListWithList:error:completionHandler: + void echoAsyncListWithList( + objc.NSArray? list, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncMapWithMap:error:completionHandler: + void echoAsyncMapWithMap( + objc.NSDictionary? map, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncMapWithMap_error_completionHandler_, + map?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNativeInteropAllTypesWithEverything:error:completionHandler: + void echoAsyncNativeInteropAllTypesWithEverything( + NativeInteropAllTypesBridge? everything, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_, + everything?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNonNullClassListWithClassList:error:completionHandler: + void echoAsyncNonNullClassListWithClassList( + objc.NSArray? classList, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNonNullClassListWithClassList_error_completionHandler_, + classList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNonNullEnumListWithEnumList:error:completionHandler: + void echoAsyncNonNullEnumListWithEnumList( + objc.NSArray? enumList, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + enumList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableBoolWithABool:error:completionHandler: + void echoAsyncNullableBoolWithABool( + objc.NSNumber? aBool, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableBoolWithABool_error_completionHandler_, + aBool?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableClassListWithClassList:error:completionHandler: + void echoAsyncNullableClassListWithClassList( + objc.NSArray? classList, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableClassListWithClassList_error_completionHandler_, + classList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableClassMapWithClassMap:error:completionHandler: + void echoAsyncNullableClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + classMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableDoubleWithADouble:error:completionHandler: + void echoAsyncNullableDoubleWithADouble( + objc.NSNumber? aDouble, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableDoubleWithADouble_error_completionHandler_, + aDouble?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableEnumListWithEnumList:error:completionHandler: + void echoAsyncNullableEnumListWithEnumList( + objc.NSArray? enumList, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + enumList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableEnumMapWithEnumMap:error:completionHandler: + void echoAsyncNullableEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + enumMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableEnumWithAnEnum:error:completionHandler: + void echoAsyncNullableEnumWithAnEnum( + objc.NSNumber? anEnum, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + anEnum?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableFloat64ListWithList:error:completionHandler: + void echoAsyncNullableFloat64ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableFloat64ListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableInt32ListWithList:error:completionHandler: + void echoAsyncNullableInt32ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableInt32ListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableInt64ListWithList:error:completionHandler: + void echoAsyncNullableInt64ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableInt64ListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableIntMapWithIntMap:error:completionHandler: + void echoAsyncNullableIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + intMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableIntWithAnInt:error:completionHandler: + void echoAsyncNullableIntWithAnInt( + objc.NSNumber? anInt, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableIntWithAnInt_error_completionHandler_, + anInt?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableListWithList:error:completionHandler: + void echoAsyncNullableListWithList( + objc.NSArray? list, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableMapWithMap:error:completionHandler: + void echoAsyncNullableMapWithMap( + objc.NSDictionary? map, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableMapWithMap_error_completionHandler_, + map?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableNativeInteropAllNullableTypesWithEverything:error:completionHandler: + void echoAsyncNullableNativeInteropAllNullableTypesWithEverything( + NativeInteropAllNullableTypesBridge? everything, { + required NativeInteropTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_, + everything?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything:error:completionHandler: + void echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything( + NativeInteropAllNullableTypesWithoutRecursionBridge? everything, { + required NativeInteropTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + everything?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableNonNullClassListWithClassList:error:completionHandler: + void echoAsyncNullableNonNullClassListWithClassList( + objc.NSArray? classList, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + classList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableNonNullEnumListWithEnumList:error:completionHandler: + void echoAsyncNullableNonNullEnumListWithEnumList( + objc.NSArray? enumList, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + enumList?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableObjectWithAnObject:error:completionHandler: + void echoAsyncNullableObjectWithAnObject( + objc.NSObject? anObject, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableObjectWithAnObject_error_completionHandler_, + anObject?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableStringMapWithStringMap:error:completionHandler: + void echoAsyncNullableStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + stringMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableStringWithAString:error:completionHandler: + void echoAsyncNullableStringWithAString( + objc.NSString? aString, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableStringWithAString_error_completionHandler_, + aString?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncNullableUint8ListWithList:error:completionHandler: + void echoAsyncNullableUint8ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableUint8ListWithList_error_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncObjectWithAnObject:error:completionHandler: + void echoAsyncObjectWithAnObject( + objc.NSObject? anObject, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncObjectWithAnObject_error_completionHandler_, + anObject?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncStringMapWithStringMap:error:completionHandler: + void echoAsyncStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncStringMapWithStringMap_error_completionHandler_, + stringMap?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncStringWithAString:error:completionHandler: + void echoAsyncStringWithAString( + objc.NSString? aString, { + required NativeInteropTestsError error, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncStringWithAString_error_completionHandler_, + aString?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// echoAsyncUint8ListWithList:error:completionHandler: + void echoAsyncUint8ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError error, + required objc.ObjCBlock + completionHandler, + }) { + _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. + objc.NSNumber? echoBoolWithABool(objc.NSNumber? aBool, {required NativeInteropTestsError error}) { + 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. + objc.NSArray? echoClassListWithClassList( + objc.NSArray? classList, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSDictionary? echoClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSNumber? echoDoubleWithADouble( + objc.NSNumber? aDouble, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSArray? echoEnumListWithEnumList( + objc.NSArray? enumList, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSDictionary? echoEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSNumber? echoEnumWithAnEnum( + objc.NSNumber? anEnum, { + required NativeInteropTestsError error, + }) { + 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. + NativeInteropTestsPigeonTypedData? echoFloat64ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError error, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoFloat64ListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed int32 list, to test serialization and deserialization. + NativeInteropTestsPigeonTypedData? echoInt32ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError error, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoInt32ListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed int64 list, to test serialization and deserialization. + NativeInteropTestsPigeonTypedData? echoInt64ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError error, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoInt64ListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + objc.NSDictionary? echoIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSNumber? echoIntWithAnInt(objc.NSNumber? anInt, {required NativeInteropTestsError error}) { + 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. + objc.NSArray? echoListWithList(objc.NSArray? list, {required NativeInteropTestsError error}) { + 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. + objc.NSDictionary? echoMapWithMap( + objc.NSDictionary? map, { + required NativeInteropTestsError error, + }) { + 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. + NativeInteropAllNullableTypesBridge? echoNativeInteropAllNullableTypesWithEverything( + NativeInteropAllNullableTypesBridge? everything, { + required NativeInteropTestsError error, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNativeInteropAllNullableTypesWithEverything_error_, + everything?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropAllNullableTypesBridge.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed object, to test serialization and deserialization. + NativeInteropAllNullableTypesWithoutRecursionBridge? + echoNativeInteropAllNullableTypesWithoutRecursionWithEverything( + NativeInteropAllNullableTypesWithoutRecursionBridge? everything, { + required NativeInteropTestsError error, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_, + everything?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// Returns the passed object, to test serialization and deserialization. + NativeInteropAllTypesBridge? echoNativeInteropAllTypesWithEverything( + NativeInteropAllTypesBridge? everything, { + required NativeInteropTestsError error, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNativeInteropAllTypesWithEverything_error_, + everything?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropAllTypesBridge.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed enum to test serialization and deserialization. + objc.NSNumber? echoNativeInteropAnotherEnumWithAnotherEnum( + objc.NSNumber? anotherEnum, { + required NativeInteropTestsError error, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNativeInteropAnotherEnumWithAnotherEnum_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. + objc.NSArray? echoNonNullClassListWithClassList( + objc.NSArray? classList, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSDictionary? echoNonNullClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSArray? echoNonNullEnumListWithEnumList( + objc.NSArray? enumList, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSDictionary? echoNonNullEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSDictionary? echoNonNullIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSDictionary? echoNonNullStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSNumber? echoNullableBoolWithABool( + objc.NSNumber? aBool, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSArray? echoNullableClassListWithClassList( + objc.NSArray? classList, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSDictionary? echoNullableClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSNumber? echoNullableDoubleWithADouble( + objc.NSNumber? aDouble, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSArray? echoNullableEnumListWithEnumList( + objc.NSArray? enumList, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSDictionary? echoNullableEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSNumber? echoNullableEnumWithAnEnum( + objc.NSNumber? anEnum, { + required NativeInteropTestsError error, + }) { + 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. + NativeInteropTestsPigeonTypedData? echoNullableFloat64ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError error, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableFloat64ListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed int32 list, to test serialization and deserialization. + NativeInteropTestsPigeonTypedData? echoNullableInt32ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError error, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableInt32ListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed int64 list, to test serialization and deserialization. + NativeInteropTestsPigeonTypedData? echoNullableInt64ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError error, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableInt64ListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + objc.NSDictionary? echoNullableIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSNumber? echoNullableIntWithAnInt( + objc.NSNumber? anInt, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSArray? echoNullableListWithList( + objc.NSArray? list, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSDictionary? echoNullableMapWithMap( + objc.NSDictionary? map, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSArray? echoNullableNonNullClassListWithClassList( + objc.NSArray? classList, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSDictionary? echoNullableNonNullClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSArray? echoNullableNonNullEnumListWithEnumList( + objc.NSArray? enumList, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSDictionary? echoNullableNonNullEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSDictionary? echoNullableNonNullIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSDictionary? echoNullableNonNullStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSDictionary? echoNullableStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSString? echoNullableStringWithAString( + objc.NSString? aString, { + required NativeInteropTestsError error, + }) { + 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. + NativeInteropTestsPigeonTypedData? echoNullableUint8ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError error, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableUint8ListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + objc.NSDictionary? echoStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NativeInteropTestsError error, + }) { + 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. + objc.NSString? echoStringWithAString( + objc.NSString? aString, { + required NativeInteropTestsError error, + }) { + 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. + NativeInteropTestsPigeonTypedData? echoUint8ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError error, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoUint8ListWithList_error_, + list?.ref.pointer ?? ffi.nullptr, + error.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + void noopAsyncWithError( + NativeInteropTestsError error, { + required objc.ObjCBlock completionHandler, + }) { + _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. + void noopWithError(NativeInteropTestsError error) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_noopWithError_, error.ref.pointer); + } + + /// Returns passed in arguments of multiple types. + /// Tests multiple-arity FlutterApi handling. + NativeInteropAllNullableTypesBridge? sendMultipleNullableTypesWithANullableBool( + objc.NSNumber? aNullableBool, { + objc.NSNumber? aNullableInt, + objc.NSString? aNullableString, + required NativeInteropTestsError error, + }) { + 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 + : NativeInteropAllNullableTypesBridge.fromPointer($ret, retain: true, release: true); + } + + /// Returns passed in arguments of multiple types. + /// Tests multiple-arity FlutterApi handling. + NativeInteropAllNullableTypesWithoutRecursionBridge? + sendMultipleNullableTypesWithoutRecursionWithANullableBool( + objc.NSNumber? aNullableBool, { + objc.NSNumber? aNullableInt, + objc.NSString? aNullableString, + required NativeInteropTestsError error, + }) { + 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 + : NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// Responds with an error from an async void function. + void throwErrorFromVoidWithError(NativeInteropTestsError error) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_throwErrorFromVoidWithError_, error.ref.pointer); + } + + /// Responds with an error from an async function returning a value. + objc.NSObject? throwErrorWithError(NativeInteropTestsError error) { + 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: + void throwFlutterErrorAsyncWithError( + NativeInteropTestsError error, { + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_o762yo( + object$.ref.pointer, + _sel_throwFlutterErrorAsyncWithError_completionHandler_, + error.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns a Flutter error, to test error handling. + objc.NSObject? throwFlutterErrorWithError(NativeInteropTestsError error) { + 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 NativeInteropFlutterIntegrationCoreApiBridge$Builder { + /// Returns the [objc.Protocol] object for this protocol. + static objc.Protocol get $protocol => + objc.Protocol.fromPointer(_protocol_NativeInteropFlutterIntegrationCoreApiBridge.cast()); + + /// Builds an object that implements the NativeInteropFlutterIntegrationCoreApiBridge 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 NativeInteropFlutterIntegrationCoreApiBridge implement({ + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoAnotherNullableEnumWithAnotherEnum_error_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumWithAnEnum_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncFloat64ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncInt32ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncMapWithMap_error_completionHandler_, + required void Function( + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt32ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableMapWithMap_error_completionHandler_, + required void Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_, + required void Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringWithAString_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableUint8ListWithList_error_completionHandler_, + required void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncStringWithAString_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncUint8ListWithList_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoEnumWithAnEnum_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoFloat64ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoInt32ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) echoListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoMapWithMap_error_, + required NativeInteropAllNullableTypesBridge? Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllNullableTypesWithEverything_error_, + required NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_, + required NativeInteropAllTypesBridge? Function( + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllTypesWithEverything_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNativeInteropAnotherEnumWithAnotherEnum_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullStringMapWithStringMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableEnumWithAnEnum_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableFloat64ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableInt32ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableMapWithMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullStringMapWithStringMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NativeInteropTestsError) + echoNullableStringWithAString_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableUint8ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NativeInteropTestsError) + echoStringWithAString_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoUint8ListWithList_error_, + required void Function(NativeInteropTestsError, objc.ObjCBlock) + noopAsyncWithError_completionHandler_, + required void Function(NativeInteropTestsError) noopWithError_, + required NativeInteropAllNullableTypesBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + required NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + required void Function(NativeInteropTestsError) throwErrorFromVoidWithError_, + required objc.NSObject? Function(NativeInteropTestsError) throwErrorWithError_, + required void Function( + NativeInteropTestsError, + objc.ObjCBlock, + ) + throwFlutterErrorAsyncWithError_completionHandler_, + required objc.NSObject? Function(NativeInteropTestsError) throwFlutterErrorWithError_, + bool $keepIsolateAlive = true, + }) { + final builder = objc.ObjCProtocolBuilder( + debugName: 'NativeInteropFlutterIntegrationCoreApiBridge', + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_ + .implement(builder, echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_ + .implement(builder, echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherNullableEnumWithAnotherEnum_error_ + .implement(builder, echoAnotherNullableEnumWithAnotherEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncBoolWithABool_error_completionHandler_ + .implement(builder, echoAsyncBoolWithABool_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassListWithClassList_error_completionHandler_ + .implement(builder, echoAsyncClassListWithClassList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassMapWithClassMap_error_completionHandler_ + .implement(builder, echoAsyncClassMapWithClassMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncDoubleWithADouble_error_completionHandler_ + .implement(builder, echoAsyncDoubleWithADouble_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumListWithEnumList_error_completionHandler_ + .implement(builder, echoAsyncEnumListWithEnumList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumMapWithEnumMap_error_completionHandler_ + .implement(builder, echoAsyncEnumMapWithEnumMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumWithAnEnum_error_completionHandler_ + .implement(builder, echoAsyncEnumWithAnEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncFloat64ListWithList_error_completionHandler_ + .implement(builder, echoAsyncFloat64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt32ListWithList_error_completionHandler_ + .implement(builder, echoAsyncInt32ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt64ListWithList_error_completionHandler_ + .implement(builder, echoAsyncInt64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntMapWithIntMap_error_completionHandler_ + .implement(builder, echoAsyncIntMapWithIntMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntWithAnInt_error_completionHandler_ + .implement(builder, echoAsyncIntWithAnInt_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncListWithList_error_completionHandler_ + .implement(builder, echoAsyncListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncMapWithMap_error_completionHandler_ + .implement(builder, echoAsyncMapWithMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_ + .implement(builder, echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullClassListWithClassList_error_completionHandler_ + .implement(builder, echoAsyncNonNullClassListWithClassList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullEnumListWithEnumList_error_completionHandler_ + .implement(builder, echoAsyncNonNullEnumListWithEnumList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableBoolWithABool_error_completionHandler_ + .implement(builder, echoAsyncNullableBoolWithABool_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassListWithClassList_error_completionHandler_ + .implement(builder, echoAsyncNullableClassListWithClassList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassMapWithClassMap_error_completionHandler_ + .implement(builder, echoAsyncNullableClassMapWithClassMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableDoubleWithADouble_error_completionHandler_ + .implement(builder, echoAsyncNullableDoubleWithADouble_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumListWithEnumList_error_completionHandler_ + .implement(builder, echoAsyncNullableEnumListWithEnumList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_ + .implement(builder, echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumWithAnEnum_error_completionHandler_ + .implement(builder, echoAsyncNullableEnumWithAnEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableFloat64ListWithList_error_completionHandler_ + .implement(builder, echoAsyncNullableFloat64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt32ListWithList_error_completionHandler_ + .implement(builder, echoAsyncNullableInt32ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt64ListWithList_error_completionHandler_ + .implement(builder, echoAsyncNullableInt64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntMapWithIntMap_error_completionHandler_ + .implement(builder, echoAsyncNullableIntMapWithIntMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntWithAnInt_error_completionHandler_ + .implement(builder, echoAsyncNullableIntWithAnInt_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableListWithList_error_completionHandler_ + .implement(builder, echoAsyncNullableListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableMapWithMap_error_completionHandler_ + .implement(builder, echoAsyncNullableMapWithMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_ + .implement( + builder, + echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ + .implement( + builder, + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_ + .implement(builder, echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableObjectWithAnObject_error_completionHandler_ + .implement(builder, echoAsyncNullableObjectWithAnObject_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringMapWithStringMap_error_completionHandler_ + .implement(builder, echoAsyncNullableStringMapWithStringMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringWithAString_error_completionHandler_ + .implement(builder, echoAsyncNullableStringWithAString_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableUint8ListWithList_error_completionHandler_ + .implement(builder, echoAsyncNullableUint8ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncObjectWithAnObject_error_completionHandler_ + .implement(builder, echoAsyncObjectWithAnObject_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringMapWithStringMap_error_completionHandler_ + .implement(builder, echoAsyncStringMapWithStringMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringWithAString_error_completionHandler_ + .implement(builder, echoAsyncStringWithAString_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncUint8ListWithList_error_completionHandler_ + .implement(builder, echoAsyncUint8ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoBoolWithABool_error_.implement( + builder, + echoBoolWithABool_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoClassListWithClassList_error_ + .implement(builder, echoClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoClassMapWithClassMap_error_.implement( + builder, + echoClassMapWithClassMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoDoubleWithADouble_error_.implement( + builder, + echoDoubleWithADouble_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumListWithEnumList_error_.implement( + builder, + echoEnumListWithEnumList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumMapWithEnumMap_error_.implement( + builder, + echoEnumMapWithEnumMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumWithAnEnum_error_.implement( + builder, + echoEnumWithAnEnum_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoFloat64ListWithList_error_.implement( + builder, + echoFloat64ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoInt32ListWithList_error_.implement( + builder, + echoInt32ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoInt64ListWithList_error_.implement( + builder, + echoInt64ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoIntMapWithIntMap_error_.implement( + builder, + echoIntMapWithIntMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoIntWithAnInt_error_.implement( + builder, + echoIntWithAnInt_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoListWithList_error_.implement( + builder, + echoListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoMapWithMap_error_.implement( + builder, + echoMapWithMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllNullableTypesWithEverything_error_ + .implement(builder, echoNativeInteropAllNullableTypesWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_ + .implement(builder, echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllTypesWithEverything_error_ + .implement(builder, echoNativeInteropAllTypesWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAnotherEnumWithAnotherEnum_error_ + .implement(builder, echoNativeInteropAnotherEnumWithAnotherEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullClassListWithClassList_error_ + .implement(builder, echoNonNullClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullClassMapWithClassMap_error_ + .implement(builder, echoNonNullClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullEnumListWithEnumList_error_ + .implement(builder, echoNonNullEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNonNullEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullIntMapWithIntMap_error_ + .implement(builder, echoNonNullIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullStringMapWithStringMap_error_ + .implement(builder, echoNonNullStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableBoolWithABool_error_.implement( + builder, + echoNullableBoolWithABool_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableClassListWithClassList_error_ + .implement(builder, echoNullableClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableClassMapWithClassMap_error_ + .implement(builder, echoNullableClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableDoubleWithADouble_error_ + .implement(builder, echoNullableDoubleWithADouble_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumListWithEnumList_error_ + .implement(builder, echoNullableEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumMapWithEnumMap_error_ + .implement(builder, echoNullableEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumWithAnEnum_error_ + .implement(builder, echoNullableEnumWithAnEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableFloat64ListWithList_error_ + .implement(builder, echoNullableFloat64ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableInt32ListWithList_error_ + .implement(builder, echoNullableInt32ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableInt64ListWithList_error_ + .implement(builder, echoNullableInt64ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableIntMapWithIntMap_error_ + .implement(builder, echoNullableIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableIntWithAnInt_error_.implement( + builder, + echoNullableIntWithAnInt_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableListWithList_error_.implement( + builder, + echoNullableListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableMapWithMap_error_.implement( + builder, + echoNullableMapWithMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassListWithClassList_error_ + .implement(builder, echoNullableNonNullClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassMapWithClassMap_error_ + .implement(builder, echoNullableNonNullClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumListWithEnumList_error_ + .implement(builder, echoNullableNonNullEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNullableNonNullEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableNonNullIntMapWithIntMap_error_ + .implement(builder, echoNullableNonNullIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullStringMapWithStringMap_error_ + .implement(builder, echoNullableNonNullStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableStringMapWithStringMap_error_ + .implement(builder, echoNullableStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableStringWithAString_error_ + .implement(builder, echoNullableStringWithAString_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableUint8ListWithList_error_ + .implement(builder, echoNullableUint8ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoStringMapWithStringMap_error_ + .implement(builder, echoStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoStringWithAString_error_.implement( + builder, + echoStringWithAString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoUint8ListWithList_error_.implement( + builder, + echoUint8ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.noopAsyncWithError_completionHandler_ + .implement(builder, noopAsyncWithError_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.noopWithError_.implement( + builder, + noopWithError_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwErrorFromVoidWithError_.implement( + builder, + throwErrorFromVoidWithError_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwErrorWithError_.implement( + builder, + throwErrorWithError_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .throwFlutterErrorAsyncWithError_completionHandler_ + .implement(builder, throwFlutterErrorAsyncWithError_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwFlutterErrorWithError_.implement( + builder, + throwFlutterErrorWithError_, + ); + builder.addProtocol($protocol); + return NativeInteropFlutterIntegrationCoreApiBridge.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), + ); + } + + /// Adds the implementation of the NativeInteropFlutterIntegrationCoreApiBridge 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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoAnotherNullableEnumWithAnotherEnum_error_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumWithAnEnum_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncFloat64ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncInt32ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncMapWithMap_error_completionHandler_, + required void Function( + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt32ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableMapWithMap_error_completionHandler_, + required void Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_, + required void Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringWithAString_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableUint8ListWithList_error_completionHandler_, + required void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncStringWithAString_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncUint8ListWithList_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoEnumWithAnEnum_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoFloat64ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoInt32ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) echoListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoMapWithMap_error_, + required NativeInteropAllNullableTypesBridge? Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllNullableTypesWithEverything_error_, + required NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_, + required NativeInteropAllTypesBridge? Function( + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllTypesWithEverything_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNativeInteropAnotherEnumWithAnotherEnum_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullStringMapWithStringMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableEnumWithAnEnum_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableFloat64ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableInt32ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableMapWithMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullStringMapWithStringMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NativeInteropTestsError) + echoNullableStringWithAString_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableUint8ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NativeInteropTestsError) + echoStringWithAString_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoUint8ListWithList_error_, + required void Function(NativeInteropTestsError, objc.ObjCBlock) + noopAsyncWithError_completionHandler_, + required void Function(NativeInteropTestsError) noopWithError_, + required NativeInteropAllNullableTypesBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + required NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + required void Function(NativeInteropTestsError) throwErrorFromVoidWithError_, + required objc.NSObject? Function(NativeInteropTestsError) throwErrorWithError_, + required void Function( + NativeInteropTestsError, + objc.ObjCBlock, + ) + throwFlutterErrorAsyncWithError_completionHandler_, + required objc.NSObject? Function(NativeInteropTestsError) throwFlutterErrorWithError_, + bool $keepIsolateAlive = true, + }) { + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_ + .implement(builder, echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_ + .implement(builder, echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherNullableEnumWithAnotherEnum_error_ + .implement(builder, echoAnotherNullableEnumWithAnotherEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncBoolWithABool_error_completionHandler_ + .implement(builder, echoAsyncBoolWithABool_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassListWithClassList_error_completionHandler_ + .implement(builder, echoAsyncClassListWithClassList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassMapWithClassMap_error_completionHandler_ + .implement(builder, echoAsyncClassMapWithClassMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncDoubleWithADouble_error_completionHandler_ + .implement(builder, echoAsyncDoubleWithADouble_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumListWithEnumList_error_completionHandler_ + .implement(builder, echoAsyncEnumListWithEnumList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumMapWithEnumMap_error_completionHandler_ + .implement(builder, echoAsyncEnumMapWithEnumMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumWithAnEnum_error_completionHandler_ + .implement(builder, echoAsyncEnumWithAnEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncFloat64ListWithList_error_completionHandler_ + .implement(builder, echoAsyncFloat64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt32ListWithList_error_completionHandler_ + .implement(builder, echoAsyncInt32ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt64ListWithList_error_completionHandler_ + .implement(builder, echoAsyncInt64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntMapWithIntMap_error_completionHandler_ + .implement(builder, echoAsyncIntMapWithIntMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntWithAnInt_error_completionHandler_ + .implement(builder, echoAsyncIntWithAnInt_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncListWithList_error_completionHandler_ + .implement(builder, echoAsyncListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncMapWithMap_error_completionHandler_ + .implement(builder, echoAsyncMapWithMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_ + .implement(builder, echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullClassListWithClassList_error_completionHandler_ + .implement(builder, echoAsyncNonNullClassListWithClassList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullEnumListWithEnumList_error_completionHandler_ + .implement(builder, echoAsyncNonNullEnumListWithEnumList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableBoolWithABool_error_completionHandler_ + .implement(builder, echoAsyncNullableBoolWithABool_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassListWithClassList_error_completionHandler_ + .implement(builder, echoAsyncNullableClassListWithClassList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassMapWithClassMap_error_completionHandler_ + .implement(builder, echoAsyncNullableClassMapWithClassMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableDoubleWithADouble_error_completionHandler_ + .implement(builder, echoAsyncNullableDoubleWithADouble_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumListWithEnumList_error_completionHandler_ + .implement(builder, echoAsyncNullableEnumListWithEnumList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_ + .implement(builder, echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumWithAnEnum_error_completionHandler_ + .implement(builder, echoAsyncNullableEnumWithAnEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableFloat64ListWithList_error_completionHandler_ + .implement(builder, echoAsyncNullableFloat64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt32ListWithList_error_completionHandler_ + .implement(builder, echoAsyncNullableInt32ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt64ListWithList_error_completionHandler_ + .implement(builder, echoAsyncNullableInt64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntMapWithIntMap_error_completionHandler_ + .implement(builder, echoAsyncNullableIntMapWithIntMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntWithAnInt_error_completionHandler_ + .implement(builder, echoAsyncNullableIntWithAnInt_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableListWithList_error_completionHandler_ + .implement(builder, echoAsyncNullableListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableMapWithMap_error_completionHandler_ + .implement(builder, echoAsyncNullableMapWithMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_ + .implement( + builder, + echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ + .implement( + builder, + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_ + .implement( + builder, + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_ + .implement(builder, echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableObjectWithAnObject_error_completionHandler_ + .implement(builder, echoAsyncNullableObjectWithAnObject_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringMapWithStringMap_error_completionHandler_ + .implement(builder, echoAsyncNullableStringMapWithStringMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringWithAString_error_completionHandler_ + .implement(builder, echoAsyncNullableStringWithAString_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableUint8ListWithList_error_completionHandler_ + .implement(builder, echoAsyncNullableUint8ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncObjectWithAnObject_error_completionHandler_ + .implement(builder, echoAsyncObjectWithAnObject_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringMapWithStringMap_error_completionHandler_ + .implement(builder, echoAsyncStringMapWithStringMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringWithAString_error_completionHandler_ + .implement(builder, echoAsyncStringWithAString_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncUint8ListWithList_error_completionHandler_ + .implement(builder, echoAsyncUint8ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoBoolWithABool_error_.implement( + builder, + echoBoolWithABool_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoClassListWithClassList_error_ + .implement(builder, echoClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoClassMapWithClassMap_error_.implement( + builder, + echoClassMapWithClassMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoDoubleWithADouble_error_.implement( + builder, + echoDoubleWithADouble_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumListWithEnumList_error_.implement( + builder, + echoEnumListWithEnumList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumMapWithEnumMap_error_.implement( + builder, + echoEnumMapWithEnumMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumWithAnEnum_error_.implement( + builder, + echoEnumWithAnEnum_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoFloat64ListWithList_error_.implement( + builder, + echoFloat64ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoInt32ListWithList_error_.implement( + builder, + echoInt32ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoInt64ListWithList_error_.implement( + builder, + echoInt64ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoIntMapWithIntMap_error_.implement( + builder, + echoIntMapWithIntMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoIntWithAnInt_error_.implement( + builder, + echoIntWithAnInt_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoListWithList_error_.implement( + builder, + echoListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoMapWithMap_error_.implement( + builder, + echoMapWithMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllNullableTypesWithEverything_error_ + .implement(builder, echoNativeInteropAllNullableTypesWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_ + .implement(builder, echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllTypesWithEverything_error_ + .implement(builder, echoNativeInteropAllTypesWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAnotherEnumWithAnotherEnum_error_ + .implement(builder, echoNativeInteropAnotherEnumWithAnotherEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullClassListWithClassList_error_ + .implement(builder, echoNonNullClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullClassMapWithClassMap_error_ + .implement(builder, echoNonNullClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullEnumListWithEnumList_error_ + .implement(builder, echoNonNullEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNonNullEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullIntMapWithIntMap_error_ + .implement(builder, echoNonNullIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullStringMapWithStringMap_error_ + .implement(builder, echoNonNullStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableBoolWithABool_error_.implement( + builder, + echoNullableBoolWithABool_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableClassListWithClassList_error_ + .implement(builder, echoNullableClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableClassMapWithClassMap_error_ + .implement(builder, echoNullableClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableDoubleWithADouble_error_ + .implement(builder, echoNullableDoubleWithADouble_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumListWithEnumList_error_ + .implement(builder, echoNullableEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumMapWithEnumMap_error_ + .implement(builder, echoNullableEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumWithAnEnum_error_ + .implement(builder, echoNullableEnumWithAnEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableFloat64ListWithList_error_ + .implement(builder, echoNullableFloat64ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableInt32ListWithList_error_ + .implement(builder, echoNullableInt32ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableInt64ListWithList_error_ + .implement(builder, echoNullableInt64ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableIntMapWithIntMap_error_ + .implement(builder, echoNullableIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableIntWithAnInt_error_.implement( + builder, + echoNullableIntWithAnInt_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableListWithList_error_.implement( + builder, + echoNullableListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableMapWithMap_error_.implement( + builder, + echoNullableMapWithMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassListWithClassList_error_ + .implement(builder, echoNullableNonNullClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassMapWithClassMap_error_ + .implement(builder, echoNullableNonNullClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumListWithEnumList_error_ + .implement(builder, echoNullableNonNullEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNullableNonNullEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableNonNullIntMapWithIntMap_error_ + .implement(builder, echoNullableNonNullIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullStringMapWithStringMap_error_ + .implement(builder, echoNullableNonNullStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableStringMapWithStringMap_error_ + .implement(builder, echoNullableStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableStringWithAString_error_ + .implement(builder, echoNullableStringWithAString_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableUint8ListWithList_error_ + .implement(builder, echoNullableUint8ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoStringMapWithStringMap_error_ + .implement(builder, echoStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoStringWithAString_error_.implement( + builder, + echoStringWithAString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoUint8ListWithList_error_.implement( + builder, + echoUint8ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.noopAsyncWithError_completionHandler_ + .implement(builder, noopAsyncWithError_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.noopWithError_.implement( + builder, + noopWithError_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwErrorFromVoidWithError_.implement( + builder, + throwErrorFromVoidWithError_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwErrorWithError_.implement( + builder, + throwErrorWithError_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .throwFlutterErrorAsyncWithError_completionHandler_ + .implement(builder, throwFlutterErrorAsyncWithError_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwFlutterErrorWithError_.implement( + builder, + throwFlutterErrorWithError_, + ); + builder.addProtocol($protocol); + } + + /// Builds an object that implements the NativeInteropFlutterIntegrationCoreApiBridge 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 NativeInteropFlutterIntegrationCoreApiBridge implementAsListener({ + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoAnotherNullableEnumWithAnotherEnum_error_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumWithAnEnum_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncFloat64ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncInt32ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncMapWithMap_error_completionHandler_, + required void Function( + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt32ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableMapWithMap_error_completionHandler_, + required void Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_, + required void Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringWithAString_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableUint8ListWithList_error_completionHandler_, + required void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncStringWithAString_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncUint8ListWithList_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoEnumWithAnEnum_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoFloat64ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoInt32ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) echoListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoMapWithMap_error_, + required NativeInteropAllNullableTypesBridge? Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllNullableTypesWithEverything_error_, + required NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_, + required NativeInteropAllTypesBridge? Function( + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllTypesWithEverything_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNativeInteropAnotherEnumWithAnotherEnum_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullStringMapWithStringMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableEnumWithAnEnum_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableFloat64ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableInt32ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableMapWithMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullStringMapWithStringMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NativeInteropTestsError) + echoNullableStringWithAString_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableUint8ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NativeInteropTestsError) + echoStringWithAString_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoUint8ListWithList_error_, + required void Function(NativeInteropTestsError, objc.ObjCBlock) + noopAsyncWithError_completionHandler_, + required void Function(NativeInteropTestsError) noopWithError_, + required NativeInteropAllNullableTypesBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + required NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + required void Function(NativeInteropTestsError) throwErrorFromVoidWithError_, + required objc.NSObject? Function(NativeInteropTestsError) throwErrorWithError_, + required void Function( + NativeInteropTestsError, + objc.ObjCBlock, + ) + throwFlutterErrorAsyncWithError_completionHandler_, + required objc.NSObject? Function(NativeInteropTestsError) throwFlutterErrorWithError_, + bool $keepIsolateAlive = true, + }) { + final builder = objc.ObjCProtocolBuilder( + debugName: 'NativeInteropFlutterIntegrationCoreApiBridge', + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_ + .implementAsListener(builder, echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_ + .implementAsListener( + builder, + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherNullableEnumWithAnotherEnum_error_ + .implement(builder, echoAnotherNullableEnumWithAnotherEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncBoolWithABool_error_completionHandler_ + .implementAsListener(builder, echoAsyncBoolWithABool_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassListWithClassList_error_completionHandler_ + .implementAsListener(builder, echoAsyncClassListWithClassList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassMapWithClassMap_error_completionHandler_ + .implementAsListener(builder, echoAsyncClassMapWithClassMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncDoubleWithADouble_error_completionHandler_ + .implementAsListener(builder, echoAsyncDoubleWithADouble_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumListWithEnumList_error_completionHandler_ + .implementAsListener(builder, echoAsyncEnumListWithEnumList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumMapWithEnumMap_error_completionHandler_ + .implementAsListener(builder, echoAsyncEnumMapWithEnumMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumWithAnEnum_error_completionHandler_ + .implementAsListener(builder, echoAsyncEnumWithAnEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncFloat64ListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncFloat64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt32ListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncInt32ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt64ListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncInt64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntMapWithIntMap_error_completionHandler_ + .implementAsListener(builder, echoAsyncIntMapWithIntMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntWithAnInt_error_completionHandler_ + .implementAsListener(builder, echoAsyncIntWithAnInt_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncMapWithMap_error_completionHandler_ + .implementAsListener(builder, echoAsyncMapWithMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullClassListWithClassList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableBoolWithABool_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableBoolWithABool_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassListWithClassList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableClassListWithClassList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassMapWithClassMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableDoubleWithADouble_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableDoubleWithADouble_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumListWithEnumList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumWithAnEnum_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableEnumWithAnEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableFloat64ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt32ListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableInt32ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt64ListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableInt64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntMapWithIntMap_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableIntMapWithIntMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntWithAnInt_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableIntWithAnInt_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableMapWithMap_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableMapWithMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableObjectWithAnObject_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableObjectWithAnObject_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringMapWithStringMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringWithAString_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableStringWithAString_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableUint8ListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableUint8ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncObjectWithAnObject_error_completionHandler_ + .implementAsListener(builder, echoAsyncObjectWithAnObject_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringMapWithStringMap_error_completionHandler_ + .implementAsListener(builder, echoAsyncStringMapWithStringMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringWithAString_error_completionHandler_ + .implementAsListener(builder, echoAsyncStringWithAString_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncUint8ListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncUint8ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoBoolWithABool_error_.implement( + builder, + echoBoolWithABool_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoClassListWithClassList_error_ + .implement(builder, echoClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoClassMapWithClassMap_error_.implement( + builder, + echoClassMapWithClassMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoDoubleWithADouble_error_.implement( + builder, + echoDoubleWithADouble_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumListWithEnumList_error_.implement( + builder, + echoEnumListWithEnumList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumMapWithEnumMap_error_.implement( + builder, + echoEnumMapWithEnumMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumWithAnEnum_error_.implement( + builder, + echoEnumWithAnEnum_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoFloat64ListWithList_error_.implement( + builder, + echoFloat64ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoInt32ListWithList_error_.implement( + builder, + echoInt32ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoInt64ListWithList_error_.implement( + builder, + echoInt64ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoIntMapWithIntMap_error_.implement( + builder, + echoIntMapWithIntMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoIntWithAnInt_error_.implement( + builder, + echoIntWithAnInt_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoListWithList_error_.implement( + builder, + echoListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoMapWithMap_error_.implement( + builder, + echoMapWithMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllNullableTypesWithEverything_error_ + .implement(builder, echoNativeInteropAllNullableTypesWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_ + .implement(builder, echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllTypesWithEverything_error_ + .implement(builder, echoNativeInteropAllTypesWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAnotherEnumWithAnotherEnum_error_ + .implement(builder, echoNativeInteropAnotherEnumWithAnotherEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullClassListWithClassList_error_ + .implement(builder, echoNonNullClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullClassMapWithClassMap_error_ + .implement(builder, echoNonNullClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullEnumListWithEnumList_error_ + .implement(builder, echoNonNullEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNonNullEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullIntMapWithIntMap_error_ + .implement(builder, echoNonNullIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullStringMapWithStringMap_error_ + .implement(builder, echoNonNullStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableBoolWithABool_error_.implement( + builder, + echoNullableBoolWithABool_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableClassListWithClassList_error_ + .implement(builder, echoNullableClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableClassMapWithClassMap_error_ + .implement(builder, echoNullableClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableDoubleWithADouble_error_ + .implement(builder, echoNullableDoubleWithADouble_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumListWithEnumList_error_ + .implement(builder, echoNullableEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumMapWithEnumMap_error_ + .implement(builder, echoNullableEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumWithAnEnum_error_ + .implement(builder, echoNullableEnumWithAnEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableFloat64ListWithList_error_ + .implement(builder, echoNullableFloat64ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableInt32ListWithList_error_ + .implement(builder, echoNullableInt32ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableInt64ListWithList_error_ + .implement(builder, echoNullableInt64ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableIntMapWithIntMap_error_ + .implement(builder, echoNullableIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableIntWithAnInt_error_.implement( + builder, + echoNullableIntWithAnInt_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableListWithList_error_.implement( + builder, + echoNullableListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableMapWithMap_error_.implement( + builder, + echoNullableMapWithMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassListWithClassList_error_ + .implement(builder, echoNullableNonNullClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassMapWithClassMap_error_ + .implement(builder, echoNullableNonNullClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumListWithEnumList_error_ + .implement(builder, echoNullableNonNullEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNullableNonNullEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableNonNullIntMapWithIntMap_error_ + .implement(builder, echoNullableNonNullIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullStringMapWithStringMap_error_ + .implement(builder, echoNullableNonNullStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableStringMapWithStringMap_error_ + .implement(builder, echoNullableStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableStringWithAString_error_ + .implement(builder, echoNullableStringWithAString_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableUint8ListWithList_error_ + .implement(builder, echoNullableUint8ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoStringMapWithStringMap_error_ + .implement(builder, echoStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoStringWithAString_error_.implement( + builder, + echoStringWithAString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoUint8ListWithList_error_.implement( + builder, + echoUint8ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.noopAsyncWithError_completionHandler_ + .implementAsListener(builder, noopAsyncWithError_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.noopWithError_.implementAsListener( + builder, + noopWithError_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwErrorFromVoidWithError_ + .implementAsListener(builder, throwErrorFromVoidWithError_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwErrorWithError_.implement( + builder, + throwErrorWithError_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .throwFlutterErrorAsyncWithError_completionHandler_ + .implementAsListener(builder, throwFlutterErrorAsyncWithError_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwFlutterErrorWithError_.implement( + builder, + throwFlutterErrorWithError_, + ); + builder.addProtocol($protocol); + return NativeInteropFlutterIntegrationCoreApiBridge.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), + ); + } + + /// Adds the implementation of the NativeInteropFlutterIntegrationCoreApiBridge 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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoAnotherNullableEnumWithAnotherEnum_error_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumWithAnEnum_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncFloat64ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncInt32ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncMapWithMap_error_completionHandler_, + required void Function( + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt32ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableMapWithMap_error_completionHandler_, + required void Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_, + required void Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringWithAString_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableUint8ListWithList_error_completionHandler_, + required void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncStringWithAString_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncUint8ListWithList_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoEnumWithAnEnum_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoFloat64ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoInt32ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) echoListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoMapWithMap_error_, + required NativeInteropAllNullableTypesBridge? Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllNullableTypesWithEverything_error_, + required NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_, + required NativeInteropAllTypesBridge? Function( + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllTypesWithEverything_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNativeInteropAnotherEnumWithAnotherEnum_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullStringMapWithStringMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableEnumWithAnEnum_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableFloat64ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableInt32ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableMapWithMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullStringMapWithStringMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NativeInteropTestsError) + echoNullableStringWithAString_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableUint8ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NativeInteropTestsError) + echoStringWithAString_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoUint8ListWithList_error_, + required void Function(NativeInteropTestsError, objc.ObjCBlock) + noopAsyncWithError_completionHandler_, + required void Function(NativeInteropTestsError) noopWithError_, + required NativeInteropAllNullableTypesBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + required NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + required void Function(NativeInteropTestsError) throwErrorFromVoidWithError_, + required objc.NSObject? Function(NativeInteropTestsError) throwErrorWithError_, + required void Function( + NativeInteropTestsError, + objc.ObjCBlock, + ) + throwFlutterErrorAsyncWithError_completionHandler_, + required objc.NSObject? Function(NativeInteropTestsError) throwFlutterErrorWithError_, + bool $keepIsolateAlive = true, + }) { + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_ + .implementAsListener(builder, echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_ + .implementAsListener( + builder, + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherNullableEnumWithAnotherEnum_error_ + .implement(builder, echoAnotherNullableEnumWithAnotherEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncBoolWithABool_error_completionHandler_ + .implementAsListener(builder, echoAsyncBoolWithABool_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassListWithClassList_error_completionHandler_ + .implementAsListener(builder, echoAsyncClassListWithClassList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassMapWithClassMap_error_completionHandler_ + .implementAsListener(builder, echoAsyncClassMapWithClassMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncDoubleWithADouble_error_completionHandler_ + .implementAsListener(builder, echoAsyncDoubleWithADouble_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumListWithEnumList_error_completionHandler_ + .implementAsListener(builder, echoAsyncEnumListWithEnumList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumMapWithEnumMap_error_completionHandler_ + .implementAsListener(builder, echoAsyncEnumMapWithEnumMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumWithAnEnum_error_completionHandler_ + .implementAsListener(builder, echoAsyncEnumWithAnEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncFloat64ListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncFloat64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt32ListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncInt32ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt64ListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncInt64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntMapWithIntMap_error_completionHandler_ + .implementAsListener(builder, echoAsyncIntMapWithIntMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntWithAnInt_error_completionHandler_ + .implementAsListener(builder, echoAsyncIntWithAnInt_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncMapWithMap_error_completionHandler_ + .implementAsListener(builder, echoAsyncMapWithMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullClassListWithClassList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableBoolWithABool_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableBoolWithABool_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassListWithClassList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableClassListWithClassList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassMapWithClassMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableDoubleWithADouble_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableDoubleWithADouble_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumListWithEnumList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumWithAnEnum_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableEnumWithAnEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableFloat64ListWithList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt32ListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableInt32ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt64ListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableInt64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntMapWithIntMap_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableIntMapWithIntMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntWithAnInt_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableIntWithAnInt_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableMapWithMap_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableMapWithMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableObjectWithAnObject_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableObjectWithAnObject_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringMapWithStringMap_error_completionHandler_ + .implementAsListener( + builder, + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringWithAString_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableStringWithAString_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableUint8ListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncNullableUint8ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncObjectWithAnObject_error_completionHandler_ + .implementAsListener(builder, echoAsyncObjectWithAnObject_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringMapWithStringMap_error_completionHandler_ + .implementAsListener(builder, echoAsyncStringMapWithStringMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringWithAString_error_completionHandler_ + .implementAsListener(builder, echoAsyncStringWithAString_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncUint8ListWithList_error_completionHandler_ + .implementAsListener(builder, echoAsyncUint8ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoBoolWithABool_error_.implement( + builder, + echoBoolWithABool_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoClassListWithClassList_error_ + .implement(builder, echoClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoClassMapWithClassMap_error_.implement( + builder, + echoClassMapWithClassMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoDoubleWithADouble_error_.implement( + builder, + echoDoubleWithADouble_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumListWithEnumList_error_.implement( + builder, + echoEnumListWithEnumList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumMapWithEnumMap_error_.implement( + builder, + echoEnumMapWithEnumMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumWithAnEnum_error_.implement( + builder, + echoEnumWithAnEnum_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoFloat64ListWithList_error_.implement( + builder, + echoFloat64ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoInt32ListWithList_error_.implement( + builder, + echoInt32ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoInt64ListWithList_error_.implement( + builder, + echoInt64ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoIntMapWithIntMap_error_.implement( + builder, + echoIntMapWithIntMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoIntWithAnInt_error_.implement( + builder, + echoIntWithAnInt_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoListWithList_error_.implement( + builder, + echoListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoMapWithMap_error_.implement( + builder, + echoMapWithMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllNullableTypesWithEverything_error_ + .implement(builder, echoNativeInteropAllNullableTypesWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_ + .implement(builder, echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllTypesWithEverything_error_ + .implement(builder, echoNativeInteropAllTypesWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAnotherEnumWithAnotherEnum_error_ + .implement(builder, echoNativeInteropAnotherEnumWithAnotherEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullClassListWithClassList_error_ + .implement(builder, echoNonNullClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullClassMapWithClassMap_error_ + .implement(builder, echoNonNullClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullEnumListWithEnumList_error_ + .implement(builder, echoNonNullEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNonNullEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullIntMapWithIntMap_error_ + .implement(builder, echoNonNullIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullStringMapWithStringMap_error_ + .implement(builder, echoNonNullStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableBoolWithABool_error_.implement( + builder, + echoNullableBoolWithABool_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableClassListWithClassList_error_ + .implement(builder, echoNullableClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableClassMapWithClassMap_error_ + .implement(builder, echoNullableClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableDoubleWithADouble_error_ + .implement(builder, echoNullableDoubleWithADouble_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumListWithEnumList_error_ + .implement(builder, echoNullableEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumMapWithEnumMap_error_ + .implement(builder, echoNullableEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumWithAnEnum_error_ + .implement(builder, echoNullableEnumWithAnEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableFloat64ListWithList_error_ + .implement(builder, echoNullableFloat64ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableInt32ListWithList_error_ + .implement(builder, echoNullableInt32ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableInt64ListWithList_error_ + .implement(builder, echoNullableInt64ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableIntMapWithIntMap_error_ + .implement(builder, echoNullableIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableIntWithAnInt_error_.implement( + builder, + echoNullableIntWithAnInt_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableListWithList_error_.implement( + builder, + echoNullableListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableMapWithMap_error_.implement( + builder, + echoNullableMapWithMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassListWithClassList_error_ + .implement(builder, echoNullableNonNullClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassMapWithClassMap_error_ + .implement(builder, echoNullableNonNullClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumListWithEnumList_error_ + .implement(builder, echoNullableNonNullEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNullableNonNullEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableNonNullIntMapWithIntMap_error_ + .implement(builder, echoNullableNonNullIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullStringMapWithStringMap_error_ + .implement(builder, echoNullableNonNullStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableStringMapWithStringMap_error_ + .implement(builder, echoNullableStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableStringWithAString_error_ + .implement(builder, echoNullableStringWithAString_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableUint8ListWithList_error_ + .implement(builder, echoNullableUint8ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoStringMapWithStringMap_error_ + .implement(builder, echoStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoStringWithAString_error_.implement( + builder, + echoStringWithAString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoUint8ListWithList_error_.implement( + builder, + echoUint8ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.noopAsyncWithError_completionHandler_ + .implementAsListener(builder, noopAsyncWithError_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.noopWithError_.implementAsListener( + builder, + noopWithError_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwErrorFromVoidWithError_ + .implementAsListener(builder, throwErrorFromVoidWithError_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwErrorWithError_.implement( + builder, + throwErrorWithError_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .throwFlutterErrorAsyncWithError_completionHandler_ + .implementAsListener(builder, throwFlutterErrorAsyncWithError_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwFlutterErrorWithError_.implement( + builder, + throwFlutterErrorWithError_, + ); + builder.addProtocol($protocol); + } + + /// Builds an object that implements the NativeInteropFlutterIntegrationCoreApiBridge 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 NativeInteropFlutterIntegrationCoreApiBridge implementAsBlocking({ + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoAnotherNullableEnumWithAnotherEnum_error_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumWithAnEnum_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncFloat64ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncInt32ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncMapWithMap_error_completionHandler_, + required void Function( + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt32ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableMapWithMap_error_completionHandler_, + required void Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_, + required void Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringWithAString_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableUint8ListWithList_error_completionHandler_, + required void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncStringWithAString_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncUint8ListWithList_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoEnumWithAnEnum_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoFloat64ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoInt32ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) echoListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoMapWithMap_error_, + required NativeInteropAllNullableTypesBridge? Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllNullableTypesWithEverything_error_, + required NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_, + required NativeInteropAllTypesBridge? Function( + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllTypesWithEverything_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNativeInteropAnotherEnumWithAnotherEnum_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullStringMapWithStringMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableEnumWithAnEnum_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableFloat64ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableInt32ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableMapWithMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullStringMapWithStringMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NativeInteropTestsError) + echoNullableStringWithAString_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableUint8ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NativeInteropTestsError) + echoStringWithAString_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoUint8ListWithList_error_, + required void Function(NativeInteropTestsError, objc.ObjCBlock) + noopAsyncWithError_completionHandler_, + required void Function(NativeInteropTestsError) noopWithError_, + required NativeInteropAllNullableTypesBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + required NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + required void Function(NativeInteropTestsError) throwErrorFromVoidWithError_, + required objc.NSObject? Function(NativeInteropTestsError) throwErrorWithError_, + required void Function( + NativeInteropTestsError, + objc.ObjCBlock, + ) + throwFlutterErrorAsyncWithError_completionHandler_, + required objc.NSObject? Function(NativeInteropTestsError) throwFlutterErrorWithError_, + bool $keepIsolateAlive = true, + }) { + final builder = objc.ObjCProtocolBuilder( + debugName: 'NativeInteropFlutterIntegrationCoreApiBridge', + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_ + .implementAsBlocking(builder, echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_ + .implementAsBlocking( + builder, + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherNullableEnumWithAnotherEnum_error_ + .implement(builder, echoAnotherNullableEnumWithAnotherEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncBoolWithABool_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncBoolWithABool_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassListWithClassList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncClassListWithClassList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassMapWithClassMap_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncClassMapWithClassMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncDoubleWithADouble_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncDoubleWithADouble_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumListWithEnumList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncEnumListWithEnumList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumMapWithEnumMap_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncEnumMapWithEnumMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumWithAnEnum_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncEnumWithAnEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncFloat64ListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncFloat64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt32ListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncInt32ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt64ListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncInt64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntMapWithIntMap_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncIntMapWithIntMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntWithAnInt_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncIntWithAnInt_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncMapWithMap_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncMapWithMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullClassListWithClassList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableBoolWithABool_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableBoolWithABool_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassListWithClassList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableClassListWithClassList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassMapWithClassMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableDoubleWithADouble_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableDoubleWithADouble_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumListWithEnumList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumWithAnEnum_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableEnumWithAnEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableFloat64ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt32ListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableInt32ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt64ListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableInt64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntMapWithIntMap_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableIntMapWithIntMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntWithAnInt_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableIntWithAnInt_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableMapWithMap_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableMapWithMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableObjectWithAnObject_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableObjectWithAnObject_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringMapWithStringMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringWithAString_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableStringWithAString_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableUint8ListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableUint8ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncObjectWithAnObject_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncObjectWithAnObject_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringMapWithStringMap_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncStringMapWithStringMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringWithAString_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncStringWithAString_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncUint8ListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncUint8ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoBoolWithABool_error_.implement( + builder, + echoBoolWithABool_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoClassListWithClassList_error_ + .implement(builder, echoClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoClassMapWithClassMap_error_.implement( + builder, + echoClassMapWithClassMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoDoubleWithADouble_error_.implement( + builder, + echoDoubleWithADouble_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumListWithEnumList_error_.implement( + builder, + echoEnumListWithEnumList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumMapWithEnumMap_error_.implement( + builder, + echoEnumMapWithEnumMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumWithAnEnum_error_.implement( + builder, + echoEnumWithAnEnum_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoFloat64ListWithList_error_.implement( + builder, + echoFloat64ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoInt32ListWithList_error_.implement( + builder, + echoInt32ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoInt64ListWithList_error_.implement( + builder, + echoInt64ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoIntMapWithIntMap_error_.implement( + builder, + echoIntMapWithIntMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoIntWithAnInt_error_.implement( + builder, + echoIntWithAnInt_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoListWithList_error_.implement( + builder, + echoListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoMapWithMap_error_.implement( + builder, + echoMapWithMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllNullableTypesWithEverything_error_ + .implement(builder, echoNativeInteropAllNullableTypesWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_ + .implement(builder, echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllTypesWithEverything_error_ + .implement(builder, echoNativeInteropAllTypesWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAnotherEnumWithAnotherEnum_error_ + .implement(builder, echoNativeInteropAnotherEnumWithAnotherEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullClassListWithClassList_error_ + .implement(builder, echoNonNullClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullClassMapWithClassMap_error_ + .implement(builder, echoNonNullClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullEnumListWithEnumList_error_ + .implement(builder, echoNonNullEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNonNullEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullIntMapWithIntMap_error_ + .implement(builder, echoNonNullIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullStringMapWithStringMap_error_ + .implement(builder, echoNonNullStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableBoolWithABool_error_.implement( + builder, + echoNullableBoolWithABool_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableClassListWithClassList_error_ + .implement(builder, echoNullableClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableClassMapWithClassMap_error_ + .implement(builder, echoNullableClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableDoubleWithADouble_error_ + .implement(builder, echoNullableDoubleWithADouble_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumListWithEnumList_error_ + .implement(builder, echoNullableEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumMapWithEnumMap_error_ + .implement(builder, echoNullableEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumWithAnEnum_error_ + .implement(builder, echoNullableEnumWithAnEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableFloat64ListWithList_error_ + .implement(builder, echoNullableFloat64ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableInt32ListWithList_error_ + .implement(builder, echoNullableInt32ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableInt64ListWithList_error_ + .implement(builder, echoNullableInt64ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableIntMapWithIntMap_error_ + .implement(builder, echoNullableIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableIntWithAnInt_error_.implement( + builder, + echoNullableIntWithAnInt_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableListWithList_error_.implement( + builder, + echoNullableListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableMapWithMap_error_.implement( + builder, + echoNullableMapWithMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassListWithClassList_error_ + .implement(builder, echoNullableNonNullClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassMapWithClassMap_error_ + .implement(builder, echoNullableNonNullClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumListWithEnumList_error_ + .implement(builder, echoNullableNonNullEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNullableNonNullEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableNonNullIntMapWithIntMap_error_ + .implement(builder, echoNullableNonNullIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullStringMapWithStringMap_error_ + .implement(builder, echoNullableNonNullStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableStringMapWithStringMap_error_ + .implement(builder, echoNullableStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableStringWithAString_error_ + .implement(builder, echoNullableStringWithAString_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableUint8ListWithList_error_ + .implement(builder, echoNullableUint8ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoStringMapWithStringMap_error_ + .implement(builder, echoStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoStringWithAString_error_.implement( + builder, + echoStringWithAString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoUint8ListWithList_error_.implement( + builder, + echoUint8ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.noopAsyncWithError_completionHandler_ + .implementAsBlocking(builder, noopAsyncWithError_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.noopWithError_.implementAsBlocking( + builder, + noopWithError_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwErrorFromVoidWithError_ + .implementAsBlocking(builder, throwErrorFromVoidWithError_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwErrorWithError_.implement( + builder, + throwErrorWithError_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .throwFlutterErrorAsyncWithError_completionHandler_ + .implementAsBlocking(builder, throwFlutterErrorAsyncWithError_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwFlutterErrorWithError_.implement( + builder, + throwFlutterErrorWithError_, + ); + builder.addProtocol($protocol); + return NativeInteropFlutterIntegrationCoreApiBridge.as( + builder.build(keepIsolateAlive: $keepIsolateAlive), + ); + } + + /// Adds the implementation of the NativeInteropFlutterIntegrationCoreApiBridge 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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoAnotherNullableEnumWithAnotherEnum_error_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncEnumWithAnEnum_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncFloat64ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncInt32ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncMapWithMap_error_completionHandler_, + required void Function( + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableBoolWithABool_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableDoubleWithADouble_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt32ListWithList_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableInt64ListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + required void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableIntWithAnInt_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableListWithList_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableMapWithMap_error_completionHandler_, + required void Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_, + required void Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + required void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + required void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableStringWithAString_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncNullableUint8ListWithList_error_completionHandler_, + required void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncObjectWithAnObject_error_completionHandler_, + required void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncStringMapWithStringMap_error_completionHandler_, + required void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncStringWithAString_error_completionHandler_, + required void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + echoAsyncUint8ListWithList_error_completionHandler_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoEnumWithAnEnum_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoFloat64ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoInt32ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) echoListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoMapWithMap_error_, + required NativeInteropAllNullableTypesBridge? Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllNullableTypesWithEverything_error_, + required NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_, + required NativeInteropAllTypesBridge? Function( + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + ) + echoNativeInteropAllTypesWithEverything_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNativeInteropAnotherEnumWithAnotherEnum_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNonNullStringMapWithStringMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableBoolWithABool_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableClassMapWithClassMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableDoubleWithADouble_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableEnumMapWithEnumMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableEnumWithAnEnum_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableFloat64ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableInt32ListWithList_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableInt64ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableIntMapWithIntMap_error_, + required objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) + echoNullableIntWithAnInt_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableMapWithMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableNonNullClassListWithClassList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullClassMapWithClassMap_error_, + required objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) + echoNullableNonNullEnumListWithEnumList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullEnumMapWithEnumMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullIntMapWithIntMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableNonNullStringMapWithStringMap_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoNullableStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NativeInteropTestsError) + echoNullableStringWithAString_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoNullableUint8ListWithList_error_, + required objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + echoStringMapWithStringMap_error_, + required objc.NSString? Function(objc.NSString?, NativeInteropTestsError) + echoStringWithAString_error_, + required NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + echoUint8ListWithList_error_, + required void Function(NativeInteropTestsError, objc.ObjCBlock) + noopAsyncWithError_completionHandler_, + required void Function(NativeInteropTestsError) noopWithError_, + required NativeInteropAllNullableTypesBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + required NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + required void Function(NativeInteropTestsError) throwErrorFromVoidWithError_, + required objc.NSObject? Function(NativeInteropTestsError) throwErrorWithError_, + required void Function( + NativeInteropTestsError, + objc.ObjCBlock, + ) + throwFlutterErrorAsyncWithError_completionHandler_, + required objc.NSObject? Function(NativeInteropTestsError) throwFlutterErrorWithError_, + bool $keepIsolateAlive = true, + }) { + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_ + .implementAsBlocking(builder, echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_ + .implementAsBlocking( + builder, + echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAnotherNullableEnumWithAnotherEnum_error_ + .implement(builder, echoAnotherNullableEnumWithAnotherEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncBoolWithABool_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncBoolWithABool_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassListWithClassList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncClassListWithClassList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncClassMapWithClassMap_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncClassMapWithClassMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncDoubleWithADouble_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncDoubleWithADouble_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumListWithEnumList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncEnumListWithEnumList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumMapWithEnumMap_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncEnumMapWithEnumMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncEnumWithAnEnum_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncEnumWithAnEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncFloat64ListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncFloat64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt32ListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncInt32ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncInt64ListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncInt64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntMapWithIntMap_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncIntMapWithIntMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncIntWithAnInt_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncIntWithAnInt_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncMapWithMap_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncMapWithMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullClassListWithClassList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNonNullClassListWithClassList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableBoolWithABool_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableBoolWithABool_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassListWithClassList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableClassListWithClassList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableClassMapWithClassMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableDoubleWithADouble_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableDoubleWithADouble_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumListWithEnumList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableEnumWithAnEnum_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableEnumWithAnEnum_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableFloat64ListWithList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableFloat64ListWithList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt32ListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableInt32ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableInt64ListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableInt64ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntMapWithIntMap_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableIntMapWithIntMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableIntWithAnInt_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableIntWithAnInt_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableMapWithMap_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableMapWithMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableObjectWithAnObject_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableObjectWithAnObject_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringMapWithStringMap_error_completionHandler_ + .implementAsBlocking( + builder, + echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableStringWithAString_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableStringWithAString_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncNullableUint8ListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncNullableUint8ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncObjectWithAnObject_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncObjectWithAnObject_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringMapWithStringMap_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncStringMapWithStringMap_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncStringWithAString_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncStringWithAString_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoAsyncUint8ListWithList_error_completionHandler_ + .implementAsBlocking(builder, echoAsyncUint8ListWithList_error_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoBoolWithABool_error_.implement( + builder, + echoBoolWithABool_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoClassListWithClassList_error_ + .implement(builder, echoClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoClassMapWithClassMap_error_.implement( + builder, + echoClassMapWithClassMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoDoubleWithADouble_error_.implement( + builder, + echoDoubleWithADouble_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumListWithEnumList_error_.implement( + builder, + echoEnumListWithEnumList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumMapWithEnumMap_error_.implement( + builder, + echoEnumMapWithEnumMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoEnumWithAnEnum_error_.implement( + builder, + echoEnumWithAnEnum_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoFloat64ListWithList_error_.implement( + builder, + echoFloat64ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoInt32ListWithList_error_.implement( + builder, + echoInt32ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoInt64ListWithList_error_.implement( + builder, + echoInt64ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoIntMapWithIntMap_error_.implement( + builder, + echoIntMapWithIntMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoIntWithAnInt_error_.implement( + builder, + echoIntWithAnInt_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoListWithList_error_.implement( + builder, + echoListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoMapWithMap_error_.implement( + builder, + echoMapWithMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllNullableTypesWithEverything_error_ + .implement(builder, echoNativeInteropAllNullableTypesWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_ + .implement(builder, echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAllTypesWithEverything_error_ + .implement(builder, echoNativeInteropAllTypesWithEverything_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNativeInteropAnotherEnumWithAnotherEnum_error_ + .implement(builder, echoNativeInteropAnotherEnumWithAnotherEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullClassListWithClassList_error_ + .implement(builder, echoNonNullClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullClassMapWithClassMap_error_ + .implement(builder, echoNonNullClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullEnumListWithEnumList_error_ + .implement(builder, echoNonNullEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNonNullEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullIntMapWithIntMap_error_ + .implement(builder, echoNonNullIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNonNullStringMapWithStringMap_error_ + .implement(builder, echoNonNullStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableBoolWithABool_error_.implement( + builder, + echoNullableBoolWithABool_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableClassListWithClassList_error_ + .implement(builder, echoNullableClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableClassMapWithClassMap_error_ + .implement(builder, echoNullableClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableDoubleWithADouble_error_ + .implement(builder, echoNullableDoubleWithADouble_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumListWithEnumList_error_ + .implement(builder, echoNullableEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumMapWithEnumMap_error_ + .implement(builder, echoNullableEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableEnumWithAnEnum_error_ + .implement(builder, echoNullableEnumWithAnEnum_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableFloat64ListWithList_error_ + .implement(builder, echoNullableFloat64ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableInt32ListWithList_error_ + .implement(builder, echoNullableInt32ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableInt64ListWithList_error_ + .implement(builder, echoNullableInt64ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableIntMapWithIntMap_error_ + .implement(builder, echoNullableIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableIntWithAnInt_error_.implement( + builder, + echoNullableIntWithAnInt_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableListWithList_error_.implement( + builder, + echoNullableListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableMapWithMap_error_.implement( + builder, + echoNullableMapWithMap_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassListWithClassList_error_ + .implement(builder, echoNullableNonNullClassListWithClassList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullClassMapWithClassMap_error_ + .implement(builder, echoNullableNonNullClassMapWithClassMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumListWithEnumList_error_ + .implement(builder, echoNullableNonNullEnumListWithEnumList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullEnumMapWithEnumMap_error_ + .implement(builder, echoNullableNonNullEnumMapWithEnumMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableNonNullIntMapWithIntMap_error_ + .implement(builder, echoNullableNonNullIntMapWithIntMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .echoNullableNonNullStringMapWithStringMap_error_ + .implement(builder, echoNullableNonNullStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableStringMapWithStringMap_error_ + .implement(builder, echoNullableStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableStringWithAString_error_ + .implement(builder, echoNullableStringWithAString_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoNullableUint8ListWithList_error_ + .implement(builder, echoNullableUint8ListWithList_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoStringMapWithStringMap_error_ + .implement(builder, echoStringMapWithStringMap_error_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoStringWithAString_error_.implement( + builder, + echoStringWithAString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.echoUint8ListWithList_error_.implement( + builder, + echoUint8ListWithList_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.noopAsyncWithError_completionHandler_ + .implementAsBlocking(builder, noopAsyncWithError_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.noopWithError_.implementAsBlocking( + builder, + noopWithError_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_ + .implement( + builder, + sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwErrorFromVoidWithError_ + .implementAsBlocking(builder, throwErrorFromVoidWithError_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwErrorWithError_.implement( + builder, + throwErrorWithError_, + ); + NativeInteropFlutterIntegrationCoreApiBridge$Builder + .throwFlutterErrorAsyncWithError_completionHandler_ + .implementAsBlocking(builder, throwFlutterErrorAsyncWithError_completionHandler_); + NativeInteropFlutterIntegrationCoreApiBridge$Builder.throwFlutterErrorWithError_.implement( + builder, + throwFlutterErrorWithError_, + ); + builder.addProtocol($protocol); + } + + /// echoAnotherAsyncEnumWithAnotherEnum:error:completionHandler: + static final echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAnotherAsyncEnumWithAnotherEnum_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAnotherAsyncNullableEnumWithAnotherEnum:error:completionHandler: + static final echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAnotherAsyncNullableEnumWithAnotherEnum_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// Returns the passed enum to test serialization and deserialization. + static final echoAnotherNullableEnumWithAnotherEnum_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAnotherNullableEnumWithAnotherEnum_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAnotherNullableEnumWithAnotherEnum_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSNumber? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// echoAsyncBoolWithABool:error:completionHandler: + static final echoAsyncBoolWithABool_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncBoolWithABool_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncBoolWithABool_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncClassListWithClassList:error:completionHandler: + static final echoAsyncClassListWithClassList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncClassListWithClassList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncClassListWithClassList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncClassMapWithClassMap:error:completionHandler: + static final echoAsyncClassMapWithClassMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncClassMapWithClassMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncClassMapWithClassMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncDoubleWithADouble:error:completionHandler: + static final echoAsyncDoubleWithADouble_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncDoubleWithADouble_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncDoubleWithADouble_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncEnumListWithEnumList:error:completionHandler: + static final echoAsyncEnumListWithEnumList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncEnumListWithEnumList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncEnumListWithEnumList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncEnumMapWithEnumMap:error:completionHandler: + static final echoAsyncEnumMapWithEnumMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncEnumMapWithEnumMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncEnumMapWithEnumMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncEnumWithAnEnum:error:completionHandler: + static final echoAsyncEnumWithAnEnum_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncEnumWithAnEnum_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncEnumWithAnEnum_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncFloat64ListWithList:error:completionHandler: + static final echoAsyncFloat64ListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncFloat64ListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncFloat64ListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.listener( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.blocking( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncInt32ListWithList:error:completionHandler: + static final echoAsyncInt32ListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncInt32ListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncInt32ListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.listener( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.blocking( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncInt64ListWithList:error:completionHandler: + static final echoAsyncInt64ListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncInt64ListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncInt64ListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.listener( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.blocking( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncIntMapWithIntMap:error:completionHandler: + static final echoAsyncIntMapWithIntMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncIntMapWithIntMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncIntMapWithIntMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncIntWithAnInt:error:completionHandler: + static final echoAsyncIntWithAnInt_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncIntWithAnInt_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncIntWithAnInt_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncListWithList:error:completionHandler: + static final echoAsyncListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncMapWithMap:error:completionHandler: + static final echoAsyncMapWithMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncMapWithMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncMapWithMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNativeInteropAllTypesWithEverything:error:completionHandler: + static final echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropAllTypesBridge_NativeInteropTestsError_ffiVoidNativeInteropAllTypesBridge.fromFunction( + ( + ffi.Pointer _, + NativeInteropAllTypesBridge? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropAllTypesBridge_NativeInteropTestsError_ffiVoidNativeInteropAllTypesBridge.listener( + ( + ffi.Pointer _, + NativeInteropAllTypesBridge? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropAllTypesBridge_NativeInteropTestsError_ffiVoidNativeInteropAllTypesBridge.blocking( + ( + ffi.Pointer _, + NativeInteropAllTypesBridge? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNonNullClassListWithClassList:error:completionHandler: + static final echoAsyncNonNullClassListWithClassList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNonNullClassListWithClassList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNonNullClassListWithClassList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNonNullEnumListWithEnumList:error:completionHandler: + static final echoAsyncNonNullEnumListWithEnumList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNonNullEnumListWithEnumList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableBoolWithABool:error:completionHandler: + static final echoAsyncNullableBoolWithABool_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableBoolWithABool_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableBoolWithABool_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableClassListWithClassList:error:completionHandler: + static final echoAsyncNullableClassListWithClassList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableClassListWithClassList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableClassListWithClassList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableClassMapWithClassMap:error:completionHandler: + static final echoAsyncNullableClassMapWithClassMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableClassMapWithClassMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableDoubleWithADouble:error:completionHandler: + static final echoAsyncNullableDoubleWithADouble_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableDoubleWithADouble_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableDoubleWithADouble_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableEnumListWithEnumList:error:completionHandler: + static final echoAsyncNullableEnumListWithEnumList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableEnumListWithEnumList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableEnumMapWithEnumMap:error:completionHandler: + static final echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableEnumMapWithEnumMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableEnumWithAnEnum:error:completionHandler: + static final echoAsyncNullableEnumWithAnEnum_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableEnumWithAnEnum_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableFloat64ListWithList:error:completionHandler: + static final echoAsyncNullableFloat64ListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableFloat64ListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableFloat64ListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.listener( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.blocking( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableInt32ListWithList:error:completionHandler: + static final echoAsyncNullableInt32ListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableInt32ListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableInt32ListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.listener( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.blocking( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableInt64ListWithList:error:completionHandler: + static final echoAsyncNullableInt64ListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableInt64ListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableInt64ListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.listener( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.blocking( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableIntMapWithIntMap:error:completionHandler: + static final echoAsyncNullableIntMapWithIntMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableIntMapWithIntMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableIntWithAnInt:error:completionHandler: + static final echoAsyncNullableIntWithAnInt_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableIntWithAnInt_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableIntWithAnInt_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.listener( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber.blocking( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableListWithList:error:completionHandler: + static final echoAsyncNullableListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableMapWithMap:error:completionHandler: + static final echoAsyncNullableMapWithMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableMapWithMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableMapWithMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableNativeInteropAllNullableTypesWithEverything:error:completionHandler: + static final echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropAllNullableTypesBridge_NativeInteropTestsError_ffiVoidNativeInteropAllNullableTypesBridge.fromFunction( + ( + ffi.Pointer _, + NativeInteropAllNullableTypesBridge? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropAllNullableTypesBridge_NativeInteropTestsError_ffiVoidNativeInteropAllNullableTypesBridge.listener( + ( + ffi.Pointer _, + NativeInteropAllNullableTypesBridge? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropAllNullableTypesBridge_NativeInteropTestsError_ffiVoidNativeInteropAllNullableTypesBridge.blocking( + ( + ffi.Pointer _, + NativeInteropAllNullableTypesBridge? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything:error:completionHandler: + static final echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge_NativeInteropTestsError_ffiVoidNativeInteropAllNullableTypesWithoutRecursionBridge.fromFunction( + ( + ffi.Pointer _, + NativeInteropAllNullableTypesWithoutRecursionBridge? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock< + ffi.Void Function(NativeInteropAllNullableTypesWithoutRecursionBridge?) + > + arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge_NativeInteropTestsError_ffiVoidNativeInteropAllNullableTypesWithoutRecursionBridge.listener( + ( + ffi.Pointer _, + NativeInteropAllNullableTypesWithoutRecursionBridge? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock< + ffi.Void Function(NativeInteropAllNullableTypesWithoutRecursionBridge?) + > + arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge_NativeInteropTestsError_ffiVoidNativeInteropAllNullableTypesWithoutRecursionBridge.blocking( + ( + ffi.Pointer _, + NativeInteropAllNullableTypesWithoutRecursionBridge? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock< + ffi.Void Function(NativeInteropAllNullableTypesWithoutRecursionBridge?) + > + arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableNonNullClassListWithClassList:error:completionHandler: + static final echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableNonNullClassListWithClassList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableNonNullEnumListWithEnumList:error:completionHandler: + static final echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableNonNullEnumListWithEnumList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.fromFunction( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.listener( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray.blocking( + ( + ffi.Pointer _, + objc.NSArray? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableObjectWithAnObject:error:completionHandler: + static final echoAsyncNullableObjectWithAnObject_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableObjectWithAnObject_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableObjectWithAnObject_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSObject_NativeInteropTestsError_ffiVoiddispatchdatat.fromFunction( + ( + ffi.Pointer _, + objc.NSObject? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSObject_NativeInteropTestsError_ffiVoiddispatchdatat.listener( + ( + ffi.Pointer _, + objc.NSObject? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSObject_NativeInteropTestsError_ffiVoiddispatchdatat.blocking( + ( + ffi.Pointer _, + objc.NSObject? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableStringMapWithStringMap:error:completionHandler: + static final echoAsyncNullableStringMapWithStringMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableStringMapWithStringMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableStringWithAString:error:completionHandler: + static final echoAsyncNullableStringWithAString_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableStringWithAString_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableStringWithAString_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSString_NativeInteropTestsError_ffiVoidNSString.fromFunction( + ( + ffi.Pointer _, + objc.NSString? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSString_NativeInteropTestsError_ffiVoidNSString.listener( + ( + ffi.Pointer _, + objc.NSString? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSString_NativeInteropTestsError_ffiVoidNSString.blocking( + ( + ffi.Pointer _, + objc.NSString? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncNullableUint8ListWithList:error:completionHandler: + static final echoAsyncNullableUint8ListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableUint8ListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncNullableUint8ListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.listener( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.blocking( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncObjectWithAnObject:error:completionHandler: + static final echoAsyncObjectWithAnObject_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncObjectWithAnObject_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncObjectWithAnObject_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSObject_NativeInteropTestsError_ffiVoiddispatchdatat.fromFunction( + ( + ffi.Pointer _, + objc.NSObject? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSObject_NativeInteropTestsError_ffiVoiddispatchdatat.listener( + ( + ffi.Pointer _, + objc.NSObject? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSObject_NativeInteropTestsError_ffiVoiddispatchdatat.blocking( + ( + ffi.Pointer _, + objc.NSObject? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncStringMapWithStringMap:error:completionHandler: + static final echoAsyncStringMapWithStringMap_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncStringMapWithStringMap_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncStringMapWithStringMap_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.fromFunction( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.listener( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary.blocking( + ( + ffi.Pointer _, + objc.NSDictionary? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncStringWithAString:error:completionHandler: + static final echoAsyncStringWithAString_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncStringWithAString_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncStringWithAString_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NSString_NativeInteropTestsError_ffiVoidNSString.fromFunction( + ( + ffi.Pointer _, + objc.NSString? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSString_NativeInteropTestsError_ffiVoidNSString.listener( + ( + ffi.Pointer _, + objc.NSString? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NSString_NativeInteropTestsError_ffiVoidNSString.blocking( + ( + ffi.Pointer _, + objc.NSString? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// echoAsyncUint8ListWithList:error:completionHandler: + static final echoAsyncUint8ListWithList_error_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncUint8ListWithList_error_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_bklti2) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoAsyncUint8ListWithList_error_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.listener( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ( + void Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + func, + ) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData.blocking( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + objc.ObjCBlock arg3, + ) => func(arg1, arg2, arg3), + ), + ); + + /// Returns the passed boolean, to test serialization and deserialization. + static final echoBoolWithABool_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoBoolWithABool_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoBoolWithABool_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSNumber? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + static final echoClassListWithClassList_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoClassListWithClassList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoClassListWithClassList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSArray? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoClassMapWithClassMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoClassMapWithClassMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoClassMapWithClassMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed double, to test serialization and deserialization. + static final echoDoubleWithADouble_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoDoubleWithADouble_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoDoubleWithADouble_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSNumber? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + static final echoEnumListWithEnumList_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoEnumListWithEnumList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoEnumListWithEnumList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSArray? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoEnumMapWithEnumMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoEnumMapWithEnumMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoEnumMapWithEnumMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed enum to test serialization and deserialization. + static final echoEnumWithAnEnum_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoEnumWithAnEnum_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoEnumWithAnEnum_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSNumber? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed float64 list, to test serialization and deserialization. + static final echoFloat64ListWithList_error_ = + objc.ObjCProtocolMethod< + NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoFloat64ListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoFloat64ListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + func, + ) => + ObjCBlock_NativeInteropTestsPigeonTypedData_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed int32 list, to test serialization and deserialization. + static final echoInt32ListWithList_error_ = + objc.ObjCProtocolMethod< + NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoInt32ListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoInt32ListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + func, + ) => + ObjCBlock_NativeInteropTestsPigeonTypedData_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed int64 list, to test serialization and deserialization. + static final echoInt64ListWithList_error_ = + objc.ObjCProtocolMethod< + NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoInt64ListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoInt64ListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + func, + ) => + ObjCBlock_NativeInteropTestsPigeonTypedData_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoIntMapWithIntMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoIntMapWithIntMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoIntMapWithIntMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed int, to test serialization and deserialization. + static final echoIntWithAnInt_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoIntWithAnInt_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoIntWithAnInt_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSNumber? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + static final echoListWithList_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSArray? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoMapWithMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoMapWithMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoMapWithMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed object, to test serialization and deserialization. + static final echoNativeInteropAllNullableTypesWithEverything_error_ = + objc.ObjCProtocolMethod< + NativeInteropAllNullableTypesBridge? Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNativeInteropAllNullableTypesWithEverything_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNativeInteropAllNullableTypesWithEverything_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NativeInteropAllNullableTypesBridge? Function( + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + ) + func, + ) => + ObjCBlock_NativeInteropAllNullableTypesBridge_ffiVoid_NativeInteropAllNullableTypesBridge_NativeInteropTestsError.fromFunction( + ( + ffi.Pointer _, + NativeInteropAllNullableTypesBridge? arg1, + NativeInteropTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed object, to test serialization and deserialization. + static final echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_ = + objc.ObjCProtocolMethod< + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + ) + func, + ) => + ObjCBlock_NativeInteropAllNullableTypesWithoutRecursionBridge_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge_NativeInteropTestsError.fromFunction( + ( + ffi.Pointer _, + NativeInteropAllNullableTypesWithoutRecursionBridge? arg1, + NativeInteropTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed object, to test serialization and deserialization. + static final echoNativeInteropAllTypesWithEverything_error_ = + objc.ObjCProtocolMethod< + NativeInteropAllTypesBridge? Function(NativeInteropAllTypesBridge?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNativeInteropAllTypesWithEverything_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNativeInteropAllTypesWithEverything_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NativeInteropAllTypesBridge? Function( + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + ) + func, + ) => + ObjCBlock_NativeInteropAllTypesBridge_ffiVoid_NativeInteropAllTypesBridge_NativeInteropTestsError.fromFunction( + ( + ffi.Pointer _, + NativeInteropAllTypesBridge? arg1, + NativeInteropTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed enum to test serialization and deserialization. + static final echoNativeInteropAnotherEnumWithAnotherEnum_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNativeInteropAnotherEnumWithAnotherEnum_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNativeInteropAnotherEnumWithAnotherEnum_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSNumber? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + static final echoNonNullClassListWithClassList_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNonNullClassListWithClassList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNonNullClassListWithClassList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSArray? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoNonNullClassMapWithClassMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNonNullClassMapWithClassMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNonNullClassMapWithClassMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + static final echoNonNullEnumListWithEnumList_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNonNullEnumListWithEnumList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNonNullEnumListWithEnumList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSArray? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoNonNullEnumMapWithEnumMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNonNullEnumMapWithEnumMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNonNullEnumMapWithEnumMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoNonNullIntMapWithIntMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNonNullIntMapWithIntMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNonNullIntMapWithIntMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoNonNullStringMapWithStringMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNonNullStringMapWithStringMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNonNullStringMapWithStringMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed boolean, to test serialization and deserialization. + static final echoNullableBoolWithABool_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableBoolWithABool_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableBoolWithABool_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSNumber? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + static final echoNullableClassListWithClassList_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableClassListWithClassList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableClassListWithClassList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSArray? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoNullableClassMapWithClassMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableClassMapWithClassMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableClassMapWithClassMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed double, to test serialization and deserialization. + static final echoNullableDoubleWithADouble_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableDoubleWithADouble_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableDoubleWithADouble_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSNumber? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + static final echoNullableEnumListWithEnumList_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableEnumListWithEnumList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableEnumListWithEnumList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSArray? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoNullableEnumMapWithEnumMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableEnumMapWithEnumMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableEnumMapWithEnumMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed enum to test serialization and deserialization. + static final echoNullableEnumWithAnEnum_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableEnumWithAnEnum_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableEnumWithAnEnum_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSNumber? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed float64 list, to test serialization and deserialization. + static final echoNullableFloat64ListWithList_error_ = + objc.ObjCProtocolMethod< + NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableFloat64ListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableFloat64ListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + func, + ) => + ObjCBlock_NativeInteropTestsPigeonTypedData_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed int32 list, to test serialization and deserialization. + static final echoNullableInt32ListWithList_error_ = + objc.ObjCProtocolMethod< + NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableInt32ListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableInt32ListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + func, + ) => + ObjCBlock_NativeInteropTestsPigeonTypedData_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed int64 list, to test serialization and deserialization. + static final echoNullableInt64ListWithList_error_ = + objc.ObjCProtocolMethod< + NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableInt64ListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableInt64ListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + func, + ) => + ObjCBlock_NativeInteropTestsPigeonTypedData_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoNullableIntMapWithIntMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableIntMapWithIntMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableIntMapWithIntMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed int, to test serialization and deserialization. + static final echoNullableIntWithAnInt_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableIntWithAnInt_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableIntWithAnInt_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSNumber? Function(objc.NSNumber?, NativeInteropTestsError) func) => + ObjCBlock_NSNumber_ffiVoid_NSNumber_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSNumber? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + static final echoNullableListWithList_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSArray? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoNullableMapWithMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableMapWithMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableMapWithMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + static final echoNullableNonNullClassListWithClassList_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullClassListWithClassList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullClassListWithClassList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSArray? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoNullableNonNullClassMapWithClassMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullClassMapWithClassMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullClassMapWithClassMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed list, to test serialization and deserialization. + static final echoNullableNonNullEnumListWithEnumList_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullEnumListWithEnumList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullEnumListWithEnumList_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSArray? Function(objc.NSArray?, NativeInteropTestsError) func) => + ObjCBlock_NSArray_ffiVoid_NSArray_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSArray? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoNullableNonNullEnumMapWithEnumMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullEnumMapWithEnumMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullEnumMapWithEnumMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoNullableNonNullIntMapWithIntMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullIntMapWithIntMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullIntMapWithIntMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoNullableNonNullStringMapWithStringMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullStringMapWithStringMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableNonNullStringMapWithStringMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoNullableStringMapWithStringMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableStringMapWithStringMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableStringMapWithStringMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed string, to test serialization and deserialization. + static final echoNullableStringWithAString_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableStringWithAString_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableStringWithAString_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSString? Function(objc.NSString?, NativeInteropTestsError) func) => + ObjCBlock_NSString_ffiVoid_NSString_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSString? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed byte list, to test serialization and deserialization. + static final echoNullableUint8ListWithList_error_ = + objc.ObjCProtocolMethod< + NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableUint8ListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoNullableUint8ListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + func, + ) => + ObjCBlock_NativeInteropTestsPigeonTypedData_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns the passed map, to test serialization and deserialization. + static final echoStringMapWithStringMap_error_ = + objc.ObjCProtocolMethod< + objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoStringMapWithStringMap_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoStringMapWithStringMap_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSDictionary? Function(objc.NSDictionary?, NativeInteropTestsError) func) => + ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSDictionary? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed string, to test serialization and deserialization. + static final echoStringWithAString_error_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoStringWithAString_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoStringWithAString_error_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSString? Function(objc.NSString?, NativeInteropTestsError) func) => + ObjCBlock_NSString_ffiVoid_NSString_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, objc.NSString? arg1, NativeInteropTestsError arg2) => + func(arg1, arg2), + ), + ); + + /// Returns the passed byte list, to test serialization and deserialization. + static final echoUint8ListWithList_error_ = + objc.ObjCProtocolMethod< + NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoUint8ListWithList_error_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_zi5eed) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_echoUint8ListWithList_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NativeInteropTestsPigeonTypedData? Function( + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + func, + ) => + ObjCBlock_NativeInteropTestsPigeonTypedData_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError arg2, + ) => func(arg1, arg2), + ), + ); + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + static final noopAsyncWithError_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NativeInteropTestsError, objc.ObjCBlock) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_noopAsyncWithError_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_jk1ljc) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_noopAsyncWithError_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(NativeInteropTestsError, objc.ObjCBlock) func) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError_ffiVoid.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsError arg1, + objc.ObjCBlock arg2, + ) => func(arg1, arg2), + ), + (void Function(NativeInteropTestsError, objc.ObjCBlock) func) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError_ffiVoid.listener( + ( + ffi.Pointer _, + NativeInteropTestsError arg1, + objc.ObjCBlock arg2, + ) => func(arg1, arg2), + ), + (void Function(NativeInteropTestsError, objc.ObjCBlock) func) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError_ffiVoid.blocking( + ( + ffi.Pointer _, + NativeInteropTestsError arg1, + objc.ObjCBlock arg2, + ) => func(arg1, arg2), + ), + ); + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic calling. + static final noopWithError_ = + objc.ObjCProtocolListenableMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_noopWithError_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_18v1jvf) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_noopWithError_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(NativeInteropTestsError) func) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, NativeInteropTestsError arg1) => func(arg1), + ), + (void Function(NativeInteropTestsError) func) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError.listener( + (ffi.Pointer _, NativeInteropTestsError arg1) => func(arg1), + ), + (void Function(NativeInteropTestsError) func) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError.blocking( + (ffi.Pointer _, NativeInteropTestsError arg1) => func(arg1), + ), + ); + + /// Returns passed in arguments of multiple types. + /// Tests multiple-arity FlutterApi handling. + static final sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_ = + objc.ObjCProtocolMethod< + NativeInteropAllNullableTypesBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _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, + ) + > + >(_julz8q_protocolTrampoline_qfyidt) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_sendMultipleNullableTypesWithANullableBool_aNullableInt_aNullableString_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NativeInteropAllNullableTypesBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + func, + ) => + ObjCBlock_NativeInteropAllNullableTypesBridge_ffiVoid_NSNumber_NSNumber_NSString_NativeInteropTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + objc.NSNumber? arg2, + objc.NSString? arg3, + NativeInteropTestsError arg4, + ) => func(arg1, arg2, arg3, arg4), + ), + ); + + /// Returns passed in arguments of multiple types. + /// Tests multiple-arity FlutterApi handling. + static final sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_ = + objc.ObjCProtocolMethod< + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _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, + ) + > + >(_julz8q_protocolTrampoline_qfyidt) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_sendMultipleNullableTypesWithoutRecursionWithANullableBool_aNullableInt_aNullableString_error_, + isRequired: true, + isInstanceMethod: true, + ), + ( + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + func, + ) => + ObjCBlock_NativeInteropAllNullableTypesWithoutRecursionBridge_ffiVoid_NSNumber_NSNumber_NSString_NativeInteropTestsError.fromFunction( + ( + ffi.Pointer _, + objc.NSNumber? arg1, + objc.NSNumber? arg2, + objc.NSString? arg3, + NativeInteropTestsError arg4, + ) => func(arg1, arg2, arg3, arg4), + ), + ); + + /// Responds with an error from an async void function. + static final throwErrorFromVoidWithError_ = + objc.ObjCProtocolListenableMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_throwErrorFromVoidWithError_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_18v1jvf) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_throwErrorFromVoidWithError_, + isRequired: true, + isInstanceMethod: true, + ), + (void Function(NativeInteropTestsError) func) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, NativeInteropTestsError arg1) => func(arg1), + ), + (void Function(NativeInteropTestsError) func) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError.listener( + (ffi.Pointer _, NativeInteropTestsError arg1) => func(arg1), + ), + (void Function(NativeInteropTestsError) func) => + ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError.blocking( + (ffi.Pointer _, NativeInteropTestsError arg1) => func(arg1), + ), + ); + + /// Responds with an error from an async function returning a value. + static final throwErrorWithError_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_throwErrorWithError_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_xr62hr) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_throwErrorWithError_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSObject? Function(NativeInteropTestsError) func) => + ObjCBlock_NSObject_ffiVoid_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, NativeInteropTestsError arg1) => func(arg1), + ), + ); + + /// throwFlutterErrorAsyncWithError:completionHandler: + static final throwFlutterErrorAsyncWithError_completionHandler_ = + objc.ObjCProtocolListenableMethod< + void Function(NativeInteropTestsError, objc.ObjCBlock) + >( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_throwFlutterErrorAsyncWithError_completionHandler_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_jk1ljc) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_throwFlutterErrorAsyncWithError_completionHandler_, + isRequired: true, + isInstanceMethod: true, + ), + ( + void Function(NativeInteropTestsError, objc.ObjCBlock) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError_ffiVoiddispatchdatat.fromFunction( + ( + ffi.Pointer _, + NativeInteropTestsError arg1, + objc.ObjCBlock arg2, + ) => func(arg1, arg2), + ), + ( + void Function(NativeInteropTestsError, objc.ObjCBlock) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError_ffiVoiddispatchdatat.listener( + ( + ffi.Pointer _, + NativeInteropTestsError arg1, + objc.ObjCBlock arg2, + ) => func(arg1, arg2), + ), + ( + void Function(NativeInteropTestsError, objc.ObjCBlock) + func, + ) => ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError_ffiVoiddispatchdatat.blocking( + ( + ffi.Pointer _, + NativeInteropTestsError arg1, + objc.ObjCBlock arg2, + ) => func(arg1, arg2), + ), + ); + + /// Returns a Flutter error, to test error handling. + static final throwFlutterErrorWithError_ = + objc.ObjCProtocolMethod( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_throwFlutterErrorWithError_, + ffi.Native.addressOf< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi.Pointer, + ffi.Pointer, + ) + > + >(_julz8q_protocolTrampoline_xr62hr) + .cast(), + objc.getProtocolMethodSignature( + _protocol_NativeInteropFlutterIntegrationCoreApiBridge, + _sel_throwFlutterErrorWithError_, + isRequired: true, + isInstanceMethod: true, + ), + (objc.NSObject? Function(NativeInteropTestsError) func) => + ObjCBlock_NSObject_ffiVoid_NativeInteropTestsError.fromFunction( + (ffi.Pointer _, NativeInteropTestsError arg1) => func(arg1), + ), + ); +} + +/// NativeInteropFlutterIntegrationCoreApiRegistrar +extension type NativeInteropFlutterIntegrationCoreApiRegistrar._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NativeInteropFlutterIntegrationCoreApiRegistrar] that points to the same underlying object as [other]. + NativeInteropFlutterIntegrationCoreApiRegistrar.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NativeInteropFlutterIntegrationCoreApiRegistrar] that wraps the given raw object pointer. + NativeInteropFlutterIntegrationCoreApiRegistrar.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 [NativeInteropFlutterIntegrationCoreApiRegistrar]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NativeInteropFlutterIntegrationCoreApiRegistrar, + ); + + /// alloc + static NativeInteropFlutterIntegrationCoreApiRegistrar alloc() { + final $ret = _objc_msgSend_151sglz( + _class_NativeInteropFlutterIntegrationCoreApiRegistrar, + _sel_alloc, + ); + return NativeInteropFlutterIntegrationCoreApiRegistrar.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// allocWithZone: + static NativeInteropFlutterIntegrationCoreApiRegistrar allocWithZone( + ffi.Pointer zone, + ) { + final $ret = _objc_msgSend_1cwp428( + _class_NativeInteropFlutterIntegrationCoreApiRegistrar, + _sel_allocWithZone_, + zone, + ); + return NativeInteropFlutterIntegrationCoreApiRegistrar.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// new + static NativeInteropFlutterIntegrationCoreApiRegistrar new$() { + final $ret = _objc_msgSend_151sglz( + _class_NativeInteropFlutterIntegrationCoreApiRegistrar, + _sel_new, + ); + return NativeInteropFlutterIntegrationCoreApiRegistrar.fromPointer( + $ret, + retain: false, + release: true, + ); + } + + /// registerInstanceWithApi:name: + static void registerInstanceWithApi( + NativeInteropFlutterIntegrationCoreApiBridge? api, { + required objc.NSString name, + }) { + _objc_msgSend_pfv6jd( + _class_NativeInteropFlutterIntegrationCoreApiRegistrar, + _sel_registerInstanceWithApi_name_, + api?.ref.pointer ?? ffi.nullptr, + name.ref.pointer, + ); + } + + /// Returns a new instance of NativeInteropFlutterIntegrationCoreApiRegistrar constructed with the default `new` method. + NativeInteropFlutterIntegrationCoreApiRegistrar() : this.as(new$().object$); +} + +extension NativeInteropFlutterIntegrationCoreApiRegistrar$Methods + on NativeInteropFlutterIntegrationCoreApiRegistrar { + /// init + NativeInteropFlutterIntegrationCoreApiRegistrar init() { + objc.checkOsVersionInternal( + 'NativeInteropFlutterIntegrationCoreApiRegistrar.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.retainAndReturnPointer(), _sel_init); + return NativeInteropFlutterIntegrationCoreApiRegistrar.fromPointer( + $ret, + retain: false, + release: true, + ); + } +} + +/// Generated setup class from Pigeon to register implemented NativeInteropHostIntegrationCoreApi classes. +extension type NativeInteropHostIntegrationCoreApiSetup._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NativeInteropHostIntegrationCoreApiSetup] that points to the same underlying object as [other]. + NativeInteropHostIntegrationCoreApiSetup.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NativeInteropHostIntegrationCoreApiSetup] that wraps the given raw object pointer. + NativeInteropHostIntegrationCoreApiSetup.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 [NativeInteropHostIntegrationCoreApiSetup]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NativeInteropHostIntegrationCoreApiSetup, + ); + + /// alloc + static NativeInteropHostIntegrationCoreApiSetup alloc() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropHostIntegrationCoreApiSetup, _sel_alloc); + return NativeInteropHostIntegrationCoreApiSetup.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NativeInteropHostIntegrationCoreApiSetup allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NativeInteropHostIntegrationCoreApiSetup, + _sel_allocWithZone_, + zone, + ); + return NativeInteropHostIntegrationCoreApiSetup.fromPointer($ret, retain: false, release: true); + } + + /// getInstanceWithName: + static NativeInteropHostIntegrationCoreApiSetup? getInstanceWithName(objc.NSString name) { + final $ret = _objc_msgSend_1sotr3r( + _class_NativeInteropHostIntegrationCoreApiSetup, + _sel_getInstanceWithName_, + name.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropHostIntegrationCoreApiSetup.fromPointer($ret, retain: true, release: true); + } + + /// new + static NativeInteropHostIntegrationCoreApiSetup new$() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropHostIntegrationCoreApiSetup, _sel_new); + return NativeInteropHostIntegrationCoreApiSetup.fromPointer($ret, retain: false, release: true); + } + + /// Returns a new instance of NativeInteropHostIntegrationCoreApiSetup constructed with the default `new` method. + NativeInteropHostIntegrationCoreApiSetup() : this.as(new$().object$); +} + +extension NativeInteropHostIntegrationCoreApiSetup$Methods + on NativeInteropHostIntegrationCoreApiSetup { + /// callFlutterEchoAnotherAsyncEnumWithAnotherEnum:wrappedError:completionHandler: + void callFlutterEchoAnotherAsyncEnumWithAnotherEnum( + NativeInteropAnotherEnum anotherEnum, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_1p6535m( + object$.ref.pointer, + _sel_callFlutterEchoAnotherAsyncEnumWithAnotherEnum_wrappedError_completionHandler_, + anotherEnum.value, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAnotherAsyncNullableEnumWithAnotherEnum:wrappedError:completionHandler: + void callFlutterEchoAnotherAsyncNullableEnumWithAnotherEnum( + objc.NSNumber? anotherEnum, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAnotherAsyncNullableEnumWithAnotherEnum_wrappedError_completionHandler_, + anotherEnum?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAnotherNullableEnumWithAnotherEnum:wrappedError: + objc.NSNumber? callFlutterEchoAnotherNullableEnumWithAnotherEnum( + objc.NSNumber? anotherEnum, { + required NativeInteropTestsError wrappedError, + }) { + 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: + void callFlutterEchoAsyncBoolWithABool( + bool aBool, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_1oby3xk( + object$.ref.pointer, + _sel_callFlutterEchoAsyncBoolWithABool_wrappedError_completionHandler_, + aBool, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncClassListWithClassList:wrappedError:completionHandler: + void callFlutterEchoAsyncClassListWithClassList( + objc.NSArray classList, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncClassListWithClassList_wrappedError_completionHandler_, + classList.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncClassMapWithClassMap:wrappedError:completionHandler: + void callFlutterEchoAsyncClassMapWithClassMap( + objc.NSDictionary classMap, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncClassMapWithClassMap_wrappedError_completionHandler_, + classMap.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncDoubleWithADouble:wrappedError:completionHandler: + void callFlutterEchoAsyncDoubleWithADouble( + double aDouble, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_f15nnv( + object$.ref.pointer, + _sel_callFlutterEchoAsyncDoubleWithADouble_wrappedError_completionHandler_, + aDouble, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncEnumListWithEnumList:wrappedError:completionHandler: + void callFlutterEchoAsyncEnumListWithEnumList( + objc.NSArray enumList, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncEnumListWithEnumList_wrappedError_completionHandler_, + enumList.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncEnumMapWithEnumMap:wrappedError:completionHandler: + void callFlutterEchoAsyncEnumMapWithEnumMap( + objc.NSDictionary enumMap, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncEnumMapWithEnumMap_wrappedError_completionHandler_, + enumMap.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncEnumWithAnEnum:wrappedError:completionHandler: + void callFlutterEchoAsyncEnumWithAnEnum( + NativeInteropAnEnum anEnum, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_gthscw( + object$.ref.pointer, + _sel_callFlutterEchoAsyncEnumWithAnEnum_wrappedError_completionHandler_, + anEnum.value, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncFloat64ListWithList:wrappedError:completionHandler: + void callFlutterEchoAsyncFloat64ListWithList( + NativeInteropTestsPigeonTypedData list, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncFloat64ListWithList_wrappedError_completionHandler_, + list.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncInt32ListWithList:wrappedError:completionHandler: + void callFlutterEchoAsyncInt32ListWithList( + NativeInteropTestsPigeonTypedData list, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncInt32ListWithList_wrappedError_completionHandler_, + list.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncInt64ListWithList:wrappedError:completionHandler: + void callFlutterEchoAsyncInt64ListWithList( + NativeInteropTestsPigeonTypedData list, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncInt64ListWithList_wrappedError_completionHandler_, + list.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncIntMapWithIntMap:wrappedError:completionHandler: + void callFlutterEchoAsyncIntMapWithIntMap( + objc.NSDictionary intMap, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncIntMapWithIntMap_wrappedError_completionHandler_, + intMap.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncIntWithAnInt:wrappedError:completionHandler: + void callFlutterEchoAsyncIntWithAnInt( + int anInt, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_1bf2hie( + object$.ref.pointer, + _sel_callFlutterEchoAsyncIntWithAnInt_wrappedError_completionHandler_, + anInt, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncListWithList:wrappedError:completionHandler: + void callFlutterEchoAsyncListWithList( + objc.NSArray list, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncListWithList_wrappedError_completionHandler_, + list.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncMapWithMap:wrappedError:completionHandler: + void callFlutterEchoAsyncMapWithMap( + objc.NSDictionary map, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncMapWithMap_wrappedError_completionHandler_, + map.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNativeInteropAllTypesWithEverything:wrappedError:completionHandler: + void callFlutterEchoAsyncNativeInteropAllTypesWithEverything( + NativeInteropAllTypesBridge everything, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNativeInteropAllTypesWithEverything_wrappedError_completionHandler_, + everything.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNonNullClassListWithClassList:wrappedError:completionHandler: + void callFlutterEchoAsyncNonNullClassListWithClassList( + objc.NSArray classList, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNonNullClassListWithClassList_wrappedError_completionHandler_, + classList.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNonNullEnumListWithEnumList:wrappedError:completionHandler: + void callFlutterEchoAsyncNonNullEnumListWithEnumList( + objc.NSArray enumList, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNonNullEnumListWithEnumList_wrappedError_completionHandler_, + enumList.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableBoolWithABool:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableBoolWithABool( + objc.NSNumber? aBool, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableBoolWithABool_wrappedError_completionHandler_, + aBool?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableClassListWithClassList:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableClassListWithClassList( + objc.NSArray? classList, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableClassListWithClassList_wrappedError_completionHandler_, + classList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableClassMapWithClassMap:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableClassMapWithClassMap_wrappedError_completionHandler_, + classMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableDoubleWithADouble:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableDoubleWithADouble( + objc.NSNumber? aDouble, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableDoubleWithADouble_wrappedError_completionHandler_, + aDouble?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableEnumListWithEnumList:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableEnumListWithEnumList( + objc.NSArray? enumList, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableEnumListWithEnumList_wrappedError_completionHandler_, + enumList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableEnumMapWithEnumMap:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableEnumMapWithEnumMap_wrappedError_completionHandler_, + enumMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableEnumWithAnEnum:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableEnumWithAnEnum( + objc.NSNumber? anEnum, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableEnumWithAnEnum_wrappedError_completionHandler_, + anEnum?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableFloat64ListWithList:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableFloat64ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableFloat64ListWithList_wrappedError_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableInt32ListWithList:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableInt32ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableInt32ListWithList_wrappedError_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableInt64ListWithList:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableInt64ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableInt64ListWithList_wrappedError_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableIntMapWithIntMap:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableIntMapWithIntMap_wrappedError_completionHandler_, + intMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableIntWithAnInt:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableIntWithAnInt( + objc.NSNumber? anInt, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableIntWithAnInt_wrappedError_completionHandler_, + anInt?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableListWithList:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableListWithList( + objc.NSArray? list, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableListWithList_wrappedError_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableMapWithMap:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableMapWithMap( + objc.NSDictionary? map, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableMapWithMap_wrappedError_completionHandler_, + map?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithEverything:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithEverything( + NativeInteropAllNullableTypesBridge? everything, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithEverything_wrappedError_completionHandler_, + everything?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything( + NativeInteropAllNullableTypesWithoutRecursionBridge? everything, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_wrappedError_completionHandler_, + everything?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableNonNullClassListWithClassList:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableNonNullClassListWithClassList( + objc.NSArray? classList, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableNonNullClassListWithClassList_wrappedError_completionHandler_, + classList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableNonNullEnumListWithEnumList:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableNonNullEnumListWithEnumList( + objc.NSArray? enumList, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableNonNullEnumListWithEnumList_wrappedError_completionHandler_, + enumList?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableObjectWithAnObject:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableObjectWithAnObject( + objc.NSObject anObject, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableObjectWithAnObject_wrappedError_completionHandler_, + anObject.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableStringMapWithStringMap:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableStringMapWithStringMap_wrappedError_completionHandler_, + stringMap?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableStringWithAString:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableStringWithAString( + objc.NSString? aString, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableStringWithAString_wrappedError_completionHandler_, + aString?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncNullableUint8ListWithList:wrappedError:completionHandler: + void callFlutterEchoAsyncNullableUint8ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncNullableUint8ListWithList_wrappedError_completionHandler_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncObjectWithAnObject:wrappedError:completionHandler: + void callFlutterEchoAsyncObjectWithAnObject( + objc.NSObject anObject, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncObjectWithAnObject_wrappedError_completionHandler_, + anObject.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncStringMapWithStringMap:wrappedError:completionHandler: + void callFlutterEchoAsyncStringMapWithStringMap( + objc.NSDictionary stringMap, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncStringMapWithStringMap_wrappedError_completionHandler_, + stringMap.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncStringWithAString:wrappedError:completionHandler: + void callFlutterEchoAsyncStringWithAString( + objc.NSString aString, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncStringWithAString_wrappedError_completionHandler_, + aString.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoAsyncUint8ListWithList:wrappedError:completionHandler: + void callFlutterEchoAsyncUint8ListWithList( + NativeInteropTestsPigeonTypedData list, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_callFlutterEchoAsyncUint8ListWithList_wrappedError_completionHandler_, + list.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterEchoBoolWithABool:wrappedError: + objc.NSNumber? callFlutterEchoBoolWithABool( + bool aBool, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSArray? callFlutterEchoClassListWithClassList( + objc.NSArray classList, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSDictionary? callFlutterEchoClassMapWithClassMap( + objc.NSDictionary classMap, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSNumber? callFlutterEchoDoubleWithADouble( + double aDouble, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSArray? callFlutterEchoEnumListWithEnumList( + objc.NSArray enumList, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSDictionary? callFlutterEchoEnumMapWithEnumMap( + objc.NSDictionary enumMap, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSNumber? callFlutterEchoEnumWithAnEnum( + NativeInteropAnEnum anEnum, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_1dnmby7( + 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: + NativeInteropTestsPigeonTypedData? callFlutterEchoFloat64ListWithList( + NativeInteropTestsPigeonTypedData list, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoFloat64ListWithList_wrappedError_, + list.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoInt32ListWithList:wrappedError: + NativeInteropTestsPigeonTypedData? callFlutterEchoInt32ListWithList( + NativeInteropTestsPigeonTypedData list, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoInt32ListWithList_wrappedError_, + list.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoInt64ListWithList:wrappedError: + NativeInteropTestsPigeonTypedData? callFlutterEchoInt64ListWithList( + NativeInteropTestsPigeonTypedData list, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoInt64ListWithList_wrappedError_, + list.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoIntMapWithIntMap:wrappedError: + objc.NSDictionary? callFlutterEchoIntMapWithIntMap( + objc.NSDictionary intMap, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSNumber? callFlutterEchoIntWithAnInt( + int anInt, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSArray? callFlutterEchoListWithList( + objc.NSArray list, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSDictionary? callFlutterEchoMapWithMap( + objc.NSDictionary map, { + required NativeInteropTestsError wrappedError, + }) { + 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); + } + + /// callFlutterEchoNativeInteropAllNullableTypesWithEverything:wrappedError: + NativeInteropAllNullableTypesBridge? callFlutterEchoNativeInteropAllNullableTypesWithEverything( + NativeInteropAllNullableTypesBridge? everything, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNativeInteropAllNullableTypesWithEverything_wrappedError_, + everything?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropAllNullableTypesBridge.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNativeInteropAllNullableTypesWithoutRecursionWithEverything:wrappedError: + NativeInteropAllNullableTypesWithoutRecursionBridge? + callFlutterEchoNativeInteropAllNullableTypesWithoutRecursionWithEverything( + NativeInteropAllNullableTypesWithoutRecursionBridge? everything, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNativeInteropAllNullableTypesWithoutRecursionWithEverything_wrappedError_, + everything?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// callFlutterEchoNativeInteropAllTypesWithEverything:wrappedError: + NativeInteropAllTypesBridge? callFlutterEchoNativeInteropAllTypesWithEverything( + NativeInteropAllTypesBridge everything, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNativeInteropAllTypesWithEverything_wrappedError_, + everything.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropAllTypesBridge.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNativeInteropAnotherEnumWithAnotherEnum:wrappedError: + objc.NSNumber? callFlutterEchoNativeInteropAnotherEnumWithAnotherEnum( + NativeInteropAnotherEnum anotherEnum, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15mcegd( + object$.ref.pointer, + _sel_callFlutterEchoNativeInteropAnotherEnumWithAnotherEnum_wrappedError_, + anotherEnum.value, + wrappedError.ref.pointer, + ); + return $ret.address == 0 ? null : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNonNullClassListWithClassList:wrappedError: + objc.NSArray? callFlutterEchoNonNullClassListWithClassList( + objc.NSArray classList, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSDictionary? callFlutterEchoNonNullClassMapWithClassMap( + objc.NSDictionary classMap, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSArray? callFlutterEchoNonNullEnumListWithEnumList( + objc.NSArray enumList, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSDictionary? callFlutterEchoNonNullEnumMapWithEnumMap( + objc.NSDictionary enumMap, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSDictionary? callFlutterEchoNonNullIntMapWithIntMap( + objc.NSDictionary intMap, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSDictionary? callFlutterEchoNonNullStringMapWithStringMap( + objc.NSDictionary stringMap, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSNumber? callFlutterEchoNullableBoolWithABool( + objc.NSNumber? aBool, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSArray? callFlutterEchoNullableClassListWithClassList( + objc.NSArray? classList, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSDictionary? callFlutterEchoNullableClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSNumber? callFlutterEchoNullableDoubleWithADouble( + objc.NSNumber? aDouble, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSArray? callFlutterEchoNullableEnumListWithEnumList( + objc.NSArray? enumList, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSDictionary? callFlutterEchoNullableEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSNumber? callFlutterEchoNullableEnumWithAnEnum( + objc.NSNumber? anEnum, { + required NativeInteropTestsError wrappedError, + }) { + 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: + NativeInteropTestsPigeonTypedData? callFlutterEchoNullableFloat64ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableFloat64ListWithList_wrappedError_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableInt32ListWithList:wrappedError: + NativeInteropTestsPigeonTypedData? callFlutterEchoNullableInt32ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableInt32ListWithList_wrappedError_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableInt64ListWithList:wrappedError: + NativeInteropTestsPigeonTypedData? callFlutterEchoNullableInt64ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableInt64ListWithList_wrappedError_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoNullableIntMapWithIntMap:wrappedError: + objc.NSDictionary? callFlutterEchoNullableIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSNumber? callFlutterEchoNullableIntWithAnInt( + objc.NSNumber? anInt, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSArray? callFlutterEchoNullableListWithList( + objc.NSArray? list, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSDictionary? callFlutterEchoNullableMapWithMap( + objc.NSDictionary? map, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSArray? callFlutterEchoNullableNonNullClassListWithClassList( + objc.NSArray? classList, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSDictionary? callFlutterEchoNullableNonNullClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSArray? callFlutterEchoNullableNonNullEnumListWithEnumList( + objc.NSArray? enumList, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSDictionary? callFlutterEchoNullableNonNullEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSDictionary? callFlutterEchoNullableNonNullIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSDictionary? callFlutterEchoNullableNonNullStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSDictionary? callFlutterEchoNullableStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSString? callFlutterEchoNullableStringWithAString( + objc.NSString? aString, { + required NativeInteropTestsError wrappedError, + }) { + 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: + NativeInteropTestsPigeonTypedData? callFlutterEchoNullableUint8ListWithList( + NativeInteropTestsPigeonTypedData? list, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoNullableUint8ListWithList_wrappedError_, + list?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterEchoStringMapWithStringMap:wrappedError: + objc.NSDictionary? callFlutterEchoStringMapWithStringMap( + objc.NSDictionary stringMap, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSString? callFlutterEchoStringWithAString( + objc.NSString aString, { + required NativeInteropTestsError wrappedError, + }) { + 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: + NativeInteropTestsPigeonTypedData? callFlutterEchoUint8ListWithList( + NativeInteropTestsPigeonTypedData list, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_callFlutterEchoUint8ListWithList_wrappedError_, + list.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterNoopAsyncWithWrappedError:completionHandler: + void callFlutterNoopAsyncWithWrappedError( + NativeInteropTestsError wrappedError, { + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_o762yo( + object$.ref.pointer, + _sel_callFlutterNoopAsyncWithWrappedError_completionHandler_, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Spawns a background thread and calls noop on the [NativeInteropFlutterIntegrationCoreApi]. + /// Returns the result of whether the flutter call was successful. + void callFlutterNoopOnBackgroundThreadWithWrappedError( + NativeInteropTestsError wrappedError, { + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_o762yo( + object$.ref.pointer, + _sel_callFlutterNoopOnBackgroundThreadWithWrappedError_completionHandler_, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// callFlutterNoopWithWrappedError: + void callFlutterNoopWithWrappedError(NativeInteropTestsError wrappedError) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_callFlutterNoopWithWrappedError_, + wrappedError.ref.pointer, + ); + } + + /// callFlutterSendMultipleNullableTypesWithANullableBool:aNullableInt:aNullableString:wrappedError: + NativeInteropAllNullableTypesBridge? callFlutterSendMultipleNullableTypesWithANullableBool( + objc.NSNumber? aNullableBool, { + objc.NSNumber? aNullableInt, + objc.NSString? aNullableString, + required NativeInteropTestsError wrappedError, + }) { + 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 + : NativeInteropAllNullableTypesBridge.fromPointer($ret, retain: true, release: true); + } + + /// callFlutterSendMultipleNullableTypesWithoutRecursionWithANullableBool:aNullableInt:aNullableString:wrappedError: + NativeInteropAllNullableTypesWithoutRecursionBridge? + callFlutterSendMultipleNullableTypesWithoutRecursionWithANullableBool( + objc.NSNumber? aNullableBool, { + objc.NSNumber? aNullableInt, + objc.NSString? aNullableString, + required NativeInteropTestsError wrappedError, + }) { + 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 + : NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// callFlutterThrowErrorFromVoidWithWrappedError: + void callFlutterThrowErrorFromVoidWithWrappedError(NativeInteropTestsError wrappedError) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_callFlutterThrowErrorFromVoidWithWrappedError_, + wrappedError.ref.pointer, + ); + } + + /// callFlutterThrowErrorWithWrappedError: + objc.NSObject? callFlutterThrowErrorWithWrappedError(NativeInteropTestsError wrappedError) { + 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: + void callFlutterThrowFlutterErrorAsyncWithWrappedError( + NativeInteropTestsError wrappedError, { + required objc.ObjCBlock completionHandler, + }) { + _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. + NativeInteropAllClassesWrapperBridge? createNestedNullableStringWithNullableString( + objc.NSString? nullableString, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_createNestedNullableStringWithNullableString_wrappedError_, + nullableString?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropAllClassesWrapperBridge.fromPointer($ret, retain: true, release: true); + } + + /// Returns true if the handler is run on a main thread. + objc.NSNumber? defaultIsMainThreadWithWrappedError(NativeInteropTestsError wrappedError) { + 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. + NativeInteropAllNullableTypesBridge? echoAllNullableTypesWithEverything( + NativeInteropAllNullableTypesBridge? everything, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoAllNullableTypesWithEverything_wrappedError_, + everything?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropAllNullableTypesBridge.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed object, to test serialization and deserialization. + NativeInteropAllNullableTypesWithoutRecursionBridge? + echoAllNullableTypesWithoutRecursionWithEverything( + NativeInteropAllNullableTypesWithoutRecursionBridge? everything, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoAllNullableTypesWithoutRecursionWithEverything_wrappedError_, + everything?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// Returns the passed object, to test serialization and deserialization. + NativeInteropAllTypesBridge? echoAllTypesWithEverything( + NativeInteropAllTypesBridge everything, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoAllTypesWithEverything_wrappedError_, + everything.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropAllTypesBridge.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed enum, to test asynchronous serialization and deserialization. + void echoAnotherAsyncEnumWithAnotherEnum( + NativeInteropAnotherEnum anotherEnum, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_1p6535m( + 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. + void echoAnotherAsyncNullableEnumWithAnotherEnum( + objc.NSNumber? anotherEnum, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + objc.NSNumber? echoAnotherEnumWithAnotherEnum( + NativeInteropAnotherEnum anotherEnum, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15mcegd( + 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: + objc.NSNumber? echoAnotherNullableEnumWithAnotherEnum( + objc.NSNumber? anotherEnum, { + required NativeInteropTestsError wrappedError, + }) { + 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. + void echoAsyncBoolWithABool( + bool aBool, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncClassListWithClassList( + objc.NSArray classList, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncClassMapWithClassMap( + objc.NSDictionary classMap, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncClassMapWithClassMap_wrappedError_completionHandler_, + classMap.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns passed in double asynchronously. + void echoAsyncDoubleWithADouble( + double aDouble, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncEnumListWithEnumList( + objc.NSArray enumList, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncEnumMapWithEnumMap( + objc.NSDictionary enumMap, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncEnumWithAnEnum( + NativeInteropAnEnum anEnum, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_gthscw( + object$.ref.pointer, + _sel_echoAsyncEnumWithAnEnum_wrappedError_completionHandler_, + anEnum.value, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed in Float64List asynchronously. + void echoAsyncFloat64ListWithAFloat64List( + NativeInteropTestsPigeonTypedData aFloat64List, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _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. + void echoAsyncInt32ListWithAInt32List( + NativeInteropTestsPigeonTypedData aInt32List, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _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. + void echoAsyncInt64ListWithAInt64List( + NativeInteropTestsPigeonTypedData aInt64List, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _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. + void echoAsyncIntMapWithIntMap( + objc.NSDictionary intMap, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncIntMapWithIntMap_wrappedError_completionHandler_, + intMap.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns passed in int asynchronously. + void echoAsyncIntWithAnInt( + int anInt, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncListWithList( + objc.NSArray list, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncMapWithMap( + objc.NSDictionary map, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncNativeInteropAllTypesWithEverything( + NativeInteropAllTypesBridge everything, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNativeInteropAllTypesWithEverything_wrappedError_completionHandler_, + everything.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed in boolean asynchronously. + void echoAsyncNullableBoolWithABool( + objc.NSNumber? aBool, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncNullableClassListWithClassList( + objc.NSArray? classList, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncNullableClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncNullableDoubleWithADouble( + objc.NSNumber? aDouble, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncNullableEnumListWithEnumList( + objc.NSArray? enumList, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncNullableEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncNullableEnumWithAnEnum( + objc.NSNumber? anEnum, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncNullableFloat64ListWithAFloat64List( + NativeInteropTestsPigeonTypedData? aFloat64List, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _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. + void echoAsyncNullableInt32ListWithAInt32List( + NativeInteropTestsPigeonTypedData? aInt32List, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _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. + void echoAsyncNullableInt64ListWithAInt64List( + NativeInteropTestsPigeonTypedData? aInt64List, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _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. + void echoAsyncNullableIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncNullableIntWithAnInt( + objc.NSNumber? anInt, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncNullableListWithList( + objc.NSArray? list, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncNullableMapWithMap( + objc.NSDictionary? map, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncNullableNativeInteropAllNullableTypesWithEverything( + NativeInteropAllNullableTypesBridge? everything, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableNativeInteropAllNullableTypesWithEverything_wrappedError_completionHandler_, + everything?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed object, to test serialization and deserialization. + void echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything( + NativeInteropAllNullableTypesWithoutRecursionBridge? everything, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_wrappedError_completionHandler_, + everything?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed in generic Object asynchronously. + void echoAsyncNullableObjectWithAnObject( + objc.NSObject anObject, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncNullableStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncNullableStringWithAString( + objc.NSString? aString, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncNullableUint8ListWithAUint8List( + NativeInteropTestsPigeonTypedData? aUint8List, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _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. + void echoAsyncObjectWithAnObject( + objc.NSObject anObject, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncStringMapWithStringMap( + objc.NSDictionary stringMap, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _objc_msgSend_18qun1e( + object$.ref.pointer, + _sel_echoAsyncStringMapWithStringMap_wrappedError_completionHandler_, + stringMap.ref.pointer, + wrappedError.ref.pointer, + completionHandler.ref.pointer, + ); + } + + /// Returns the passed string asynchronously. + void echoAsyncStringWithAString( + objc.NSString aString, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock completionHandler, + }) { + _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. + void echoAsyncUint8ListWithAUint8List( + NativeInteropTestsPigeonTypedData aUint8List, { + required NativeInteropTestsError wrappedError, + required objc.ObjCBlock + completionHandler, + }) { + _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. + objc.NSArray? echoBoolListWithBoolList( + objc.NSArray boolList, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSNumber? echoBoolWithABool(bool aBool, {required NativeInteropTestsError wrappedError}) { + 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. + objc.NSArray? echoClassListWithClassList( + objc.NSArray classList, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSDictionary? echoClassMapWithClassMap( + objc.NSDictionary classMap, { + required NativeInteropTestsError wrappedError, + }) { + 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. + NativeInteropAllClassesWrapperBridge? echoClassWrapperWithWrapper( + NativeInteropAllClassesWrapperBridge wrapper, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoClassWrapperWithWrapper_wrappedError_, + wrapper.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropAllClassesWrapperBridge.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + objc.NSArray? echoDoubleListWithDoubleList( + objc.NSArray doubleList, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSNumber? echoDoubleWithADouble( + double aDouble, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSArray? echoEnumListWithEnumList( + objc.NSArray enumList, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSDictionary? echoEnumMapWithEnumMap( + objc.NSDictionary enumMap, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSNumber? echoEnumWithAnEnum( + NativeInteropAnEnum anEnum, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_1dnmby7( + 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. + NativeInteropTestsPigeonTypedData? echoFloat64ListWithAFloat64List( + NativeInteropTestsPigeonTypedData aFloat64List, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoFloat64ListWithAFloat64List_wrappedError_, + aFloat64List.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in Int32List. + NativeInteropTestsPigeonTypedData? echoInt32ListWithAInt32List( + NativeInteropTestsPigeonTypedData aInt32List, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoInt32ListWithAInt32List_wrappedError_, + aInt32List.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in Int64List. + NativeInteropTestsPigeonTypedData? echoInt64ListWithAInt64List( + NativeInteropTestsPigeonTypedData aInt64List, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoInt64ListWithAInt64List_wrappedError_, + aInt64List.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed list, to test serialization and deserialization. + objc.NSArray? echoIntListWithIntList( + objc.NSArray intList, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSDictionary? echoIntMapWithIntMap( + objc.NSDictionary intMap, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSNumber? echoIntWithAnInt(int anInt, {required NativeInteropTestsError wrappedError}) { + 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. + objc.NSArray? echoListWithList( + objc.NSArray list, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSDictionary? echoMapWithMap( + objc.NSDictionary map, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSString? echoNamedDefaultStringWithAString( + objc.NSString aString, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSString? echoNamedNullableStringWithANullableString( + objc.NSString? aNullableString, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSArray? echoNonNullClassListWithClassList( + objc.NSArray classList, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSDictionary? echoNonNullClassMapWithClassMap( + objc.NSDictionary classMap, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSArray? echoNonNullEnumListWithEnumList( + objc.NSArray enumList, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSDictionary? echoNonNullEnumMapWithEnumMap( + objc.NSDictionary enumMap, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSDictionary? echoNonNullIntMapWithIntMap( + objc.NSDictionary intMap, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSDictionary? echoNonNullStringMapWithStringMap( + objc.NSDictionary stringMap, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSNumber? echoNullableBoolWithANullableBool( + objc.NSNumber? aNullableBool, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSArray? echoNullableClassListWithClassList( + objc.NSArray? classList, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSDictionary? echoNullableClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSNumber? echoNullableDoubleWithANullableDouble( + objc.NSNumber? aNullableDouble, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSArray? echoNullableEnumListWithEnumList( + objc.NSArray? enumList, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSDictionary? echoNullableEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NativeInteropTestsError wrappedError, + }) { + 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: + objc.NSNumber? echoNullableEnumWithAnEnum( + objc.NSNumber? anEnum, { + required NativeInteropTestsError wrappedError, + }) { + 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. + NativeInteropTestsPigeonTypedData? echoNullableFloat64ListWithANullableFloat64List( + NativeInteropTestsPigeonTypedData? aNullableFloat64List, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableFloat64ListWithANullableFloat64List_wrappedError_, + aNullableFloat64List?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in Int32List. + NativeInteropTestsPigeonTypedData? echoNullableInt32ListWithANullableInt32List( + NativeInteropTestsPigeonTypedData? aNullableInt32List, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableInt32ListWithANullableInt32List_wrappedError_, + aNullableInt32List?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in Int64List. + NativeInteropTestsPigeonTypedData? echoNullableInt64ListWithANullableInt64List( + NativeInteropTestsPigeonTypedData? aNullableInt64List, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableInt64ListWithANullableInt64List_wrappedError_, + aNullableInt64List?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed map, to test serialization and deserialization. + objc.NSDictionary? echoNullableIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSNumber? echoNullableIntWithANullableInt( + objc.NSNumber? aNullableInt, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSArray? echoNullableListWithANullableList( + objc.NSArray? aNullableList, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSDictionary? echoNullableMapWithMap( + objc.NSDictionary? map, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSArray? echoNullableNonNullClassListWithClassList( + objc.NSArray? classList, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSDictionary? echoNullableNonNullClassMapWithClassMap( + objc.NSDictionary? classMap, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSArray? echoNullableNonNullEnumListWithEnumList( + objc.NSArray? enumList, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSDictionary? echoNullableNonNullEnumMapWithEnumMap( + objc.NSDictionary? enumMap, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSDictionary? echoNullableNonNullIntMapWithIntMap( + objc.NSDictionary? intMap, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSDictionary? echoNullableNonNullStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSObject? echoNullableObjectWithANullableObject( + objc.NSObject aNullableObject, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSDictionary? echoNullableStringMapWithStringMap( + objc.NSDictionary? stringMap, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSString? echoNullableStringWithANullableString( + objc.NSString? aNullableString, { + required NativeInteropTestsError wrappedError, + }) { + 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. + NativeInteropTestsPigeonTypedData? echoNullableUint8ListWithANullableUint8List( + NativeInteropTestsPigeonTypedData? aNullableUint8List, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoNullableUint8ListWithANullableUint8List_wrappedError_, + aNullableUint8List?.ref.pointer ?? ffi.nullptr, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the passed in generic Object. + objc.NSObject? echoObjectWithAnObject( + objc.NSObject anObject, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSNumber? echoOptionalDefaultDoubleWithADouble( + double aDouble, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSNumber? echoOptionalNullableIntWithANullableInt( + objc.NSNumber? aNullableInt, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSNumber? echoRequiredIntWithAnInt( + int anInt, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSArray? echoStringListWithStringList( + objc.NSArray stringList, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSDictionary? echoStringMapWithStringMap( + objc.NSDictionary stringMap, { + required NativeInteropTestsError wrappedError, + }) { + 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. + objc.NSString? echoStringWithAString( + objc.NSString aString, { + required NativeInteropTestsError wrappedError, + }) { + 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. + NativeInteropTestsPigeonTypedData? echoUint8ListWithAUint8List( + NativeInteropTestsPigeonTypedData aUint8List, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_echoUint8ListWithAUint8List_wrappedError_, + aUint8List.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: true, release: true); + } + + /// Returns the inner aString value from the wrapped object, to test + /// sending of nested objects. + objc.NSString? extractNestedNullableStringWithWrapper( + NativeInteropAllClassesWrapperBridge wrapper, { + required NativeInteropTestsError wrappedError, + }) { + 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 + NativeInteropHostIntegrationCoreApiSetup init() { + objc.checkOsVersionInternal( + 'NativeInteropHostIntegrationCoreApiSetup.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.retainAndReturnPointer(), _sel_init); + return NativeInteropHostIntegrationCoreApiSetup.fromPointer($ret, retain: false, release: true); + } + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + void noopAsyncWithWrappedError( + NativeInteropTestsError wrappedError, { + required objc.ObjCBlock completionHandler, + }) { + _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. + void noopWithWrappedError(NativeInteropTestsError wrappedError) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_noopWithWrappedError_, wrappedError.ref.pointer); + } + + /// Registers and immediately deregisters a Host API under [name]. + void registerAndImmediatelyDeregisterHostApiWithName( + objc.NSString name, { + required NativeInteropTestsError wrappedError, + }) { + _objc_msgSend_pfv6jd( + object$.ref.pointer, + _sel_registerAndImmediatelyDeregisterHostApiWithName_wrappedError_, + name.ref.pointer, + wrappedError.ref.pointer, + ); + } + + /// sendMultipleNullableTypesWithANullableBool:aNullableInt:aNullableString:wrappedError: + NativeInteropAllNullableTypesBridge? sendMultipleNullableTypesWithANullableBool( + objc.NSNumber? aNullableBool, { + objc.NSNumber? aNullableInt, + objc.NSString? aNullableString, + required NativeInteropTestsError wrappedError, + }) { + 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 + : NativeInteropAllNullableTypesBridge.fromPointer($ret, retain: true, release: true); + } + + /// Returns passed in arguments of multiple types. + NativeInteropAllNullableTypesWithoutRecursionBridge? + sendMultipleNullableTypesWithoutRecursionWithANullableBool( + objc.NSNumber? aNullableBool, { + objc.NSNumber? aNullableInt, + objc.NSString? aNullableString, + required NativeInteropTestsError wrappedError, + }) { + 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 + : NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + $ret, + retain: true, + release: true, + ); + } + + /// Tests that calling a deregistered Flutter API under [name] fails / returns null. + objc.NSNumber? testCallDeregisteredFlutterApiWithName( + objc.NSString name, { + required NativeInteropTestsError wrappedError, + }) { + final $ret = _objc_msgSend_15qeuct( + object$.ref.pointer, + _sel_testCallDeregisteredFlutterApiWithName_wrappedError_, + name.ref.pointer, + wrappedError.ref.pointer, + ); + return $ret.address == 0 ? null : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Tests deregistering a Flutter API natively. + objc.NSNumber? testDeregisterFlutterApiWithWrappedError(NativeInteropTestsError wrappedError) { + final $ret = _objc_msgSend_1sotr3r( + object$.ref.pointer, + _sel_testDeregisterFlutterApiWithWrappedError_, + wrappedError.ref.pointer, + ); + return $ret.address == 0 ? null : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Tests deregistering a Host API natively. + objc.NSNumber? testDeregisterHostApiWithWrappedError(NativeInteropTestsError wrappedError) { + final $ret = _objc_msgSend_1sotr3r( + object$.ref.pointer, + _sel_testDeregisterHostApiWithWrappedError_, + wrappedError.ref.pointer, + ); + return $ret.address == 0 ? null : objc.NSNumber.fromPointer($ret, retain: true, release: true); + } + + /// Responds with an error from an async void function. + void throwAsyncErrorFromVoidWithWrappedError( + NativeInteropTestsError wrappedError, { + required objc.ObjCBlock completionHandler, + }) { + _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. + void throwAsyncErrorWithWrappedError( + NativeInteropTestsError wrappedError, { + required objc.ObjCBlock completionHandler, + }) { + _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. + void throwAsyncFlutterErrorWithWrappedError( + NativeInteropTestsError wrappedError, { + required objc.ObjCBlock completionHandler, + }) { + _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. + void throwErrorFromVoidWithWrappedError(NativeInteropTestsError wrappedError) { + _objc_msgSend_xtuoz7( + object$.ref.pointer, + _sel_throwErrorFromVoidWithWrappedError_, + wrappedError.ref.pointer, + ); + } + + /// Returns an error, to test error handling. + objc.NSObject? throwErrorWithWrappedError(NativeInteropTestsError wrappedError) { + 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. + objc.NSObject? throwFlutterErrorWithWrappedError(NativeInteropTestsError wrappedError) { + 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); + } +} + +/// Error class for passing custom error details to Dart side. +extension type NativeInteropTestsError._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NativeInteropTestsError] that points to the same underlying object as [other]. + NativeInteropTestsError.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NativeInteropTestsError] that wraps the given raw object pointer. + NativeInteropTestsError.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 [NativeInteropTestsError]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5(obj.ref.pointer, _sel_isKindOfClass_, _class_NativeInteropTestsError); + + /// alloc + static NativeInteropTestsError alloc() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropTestsError, _sel_alloc); + return NativeInteropTestsError.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NativeInteropTestsError allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428(_class_NativeInteropTestsError, _sel_allocWithZone_, zone); + return NativeInteropTestsError.fromPointer($ret, retain: false, release: true); + } + + /// new + static NativeInteropTestsError new$() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropTestsError, _sel_new); + return NativeInteropTestsError.fromPointer($ret, retain: false, release: true); + } + + /// Returns a new instance of NativeInteropTestsError constructed with the default `new` method. + NativeInteropTestsError() : this.as(new$().object$); +} + +extension NativeInteropTestsError$Methods on NativeInteropTestsError { + /// 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 + NativeInteropTestsError init() { + objc.checkOsVersionInternal( + 'NativeInteropTestsError.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.retainAndReturnPointer(), _sel_init); + return NativeInteropTestsError.fromPointer($ret, retain: false, release: true); + } + + /// initWithCode:message:details: + NativeInteropTestsError 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 NativeInteropTestsError.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); + } +} + +/// NativeInteropTestsNumberWrapper +extension type NativeInteropTestsNumberWrapper._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject, objc.NSCopying { + /// Constructs a [NativeInteropTestsNumberWrapper] that points to the same underlying object as [other]. + NativeInteropTestsNumberWrapper.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NativeInteropTestsNumberWrapper] that wraps the given raw object pointer. + NativeInteropTestsNumberWrapper.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 [NativeInteropTestsNumberWrapper]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NativeInteropTestsNumberWrapper, + ); + + /// alloc + static NativeInteropTestsNumberWrapper alloc() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropTestsNumberWrapper, _sel_alloc); + return NativeInteropTestsNumberWrapper.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NativeInteropTestsNumberWrapper allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NativeInteropTestsNumberWrapper, + _sel_allocWithZone_, + zone, + ); + return NativeInteropTestsNumberWrapper.fromPointer($ret, retain: false, release: true); + } +} + +extension NativeInteropTestsNumberWrapper$Methods on NativeInteropTestsNumberWrapper { + /// 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); + } + + /// initWithNumber:type: + NativeInteropTestsNumberWrapper initWithNumber(objc.NSNumber number, {required int type}) { + final $ret = _objc_msgSend_9slupp( + object$.ref.retainAndReturnPointer(), + _sel_initWithNumber_type_, + number.ref.pointer, + type, + ); + return NativeInteropTestsNumberWrapper.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); + } +} + +/// NativeInteropTestsPigeonInternalNull +extension type NativeInteropTestsPigeonInternalNull._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NativeInteropTestsPigeonInternalNull] that points to the same underlying object as [other]. + NativeInteropTestsPigeonInternalNull.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NativeInteropTestsPigeonInternalNull] that wraps the given raw object pointer. + NativeInteropTestsPigeonInternalNull.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 [NativeInteropTestsPigeonInternalNull]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NativeInteropTestsPigeonInternalNull, + ); + + /// alloc + static NativeInteropTestsPigeonInternalNull alloc() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropTestsPigeonInternalNull, _sel_alloc); + return NativeInteropTestsPigeonInternalNull.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NativeInteropTestsPigeonInternalNull allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NativeInteropTestsPigeonInternalNull, + _sel_allocWithZone_, + zone, + ); + return NativeInteropTestsPigeonInternalNull.fromPointer($ret, retain: false, release: true); + } + + /// new + static NativeInteropTestsPigeonInternalNull new$() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropTestsPigeonInternalNull, _sel_new); + return NativeInteropTestsPigeonInternalNull.fromPointer($ret, retain: false, release: true); + } + + /// Returns a new instance of NativeInteropTestsPigeonInternalNull constructed with the default `new` method. + NativeInteropTestsPigeonInternalNull() : this.as(new$().object$); +} + +extension NativeInteropTestsPigeonInternalNull$Methods on NativeInteropTestsPigeonInternalNull { + /// init + NativeInteropTestsPigeonInternalNull init() { + objc.checkOsVersionInternal( + 'NativeInteropTestsPigeonInternalNull.init', + iOS: (false, (2, 0, 0)), + macOS: (false, (10, 0, 0)), + ); + final $ret = _objc_msgSend_151sglz(object$.ref.retainAndReturnPointer(), _sel_init); + return NativeInteropTestsPigeonInternalNull.fromPointer($ret, retain: false, release: true); + } +} + +/// NativeInteropTestsPigeonTypedData +extension type NativeInteropTestsPigeonTypedData._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NativeInteropTestsPigeonTypedData] that points to the same underlying object as [other]. + NativeInteropTestsPigeonTypedData.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NativeInteropTestsPigeonTypedData] that wraps the given raw object pointer. + NativeInteropTestsPigeonTypedData.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 [NativeInteropTestsPigeonTypedData]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NativeInteropTestsPigeonTypedData, + ); + + /// alloc + static NativeInteropTestsPigeonTypedData alloc() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropTestsPigeonTypedData, _sel_alloc); + return NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NativeInteropTestsPigeonTypedData allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NativeInteropTestsPigeonTypedData, + _sel_allocWithZone_, + zone, + ); + return NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: false, release: true); + } +} + +extension NativeInteropTestsPigeonTypedData$Methods on NativeInteropTestsPigeonTypedData { + /// data + objc.NSData get data { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_data); + return objc.NSData.fromPointer($ret, retain: true, release: true); + } + + /// initWithData:type: + NativeInteropTestsPigeonTypedData initWithData(objc.NSData data, {required int type}) { + final $ret = _objc_msgSend_9slupp( + object$.ref.retainAndReturnPointer(), + _sel_initWithData_type_, + data.ref.pointer, + type, + ); + return NativeInteropTestsPigeonTypedData.fromPointer($ret, retain: false, release: true); + } + + /// type + int get type { + return _objc_msgSend_1hz7y9r(object$.ref.pointer, _sel_type); + } +} + +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +extension type NativeInteropUnusedClassBridge._(objc.ObjCObject object$) + implements objc.ObjCObject, objc.NSObject { + /// Constructs a [NativeInteropUnusedClassBridge] that points to the same underlying object as [other]. + NativeInteropUnusedClassBridge.as(objc.ObjCObject other) : object$ = other { + assert(isA(object$)); + } + + /// Constructs a [NativeInteropUnusedClassBridge] that wraps the given raw object pointer. + NativeInteropUnusedClassBridge.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 [NativeInteropUnusedClassBridge]. + static bool isA(objc.ObjCObject? obj) => obj == null + ? false + : _objc_msgSend_19nvye5( + obj.ref.pointer, + _sel_isKindOfClass_, + _class_NativeInteropUnusedClassBridge, + ); + + /// alloc + static NativeInteropUnusedClassBridge alloc() { + final $ret = _objc_msgSend_151sglz(_class_NativeInteropUnusedClassBridge, _sel_alloc); + return NativeInteropUnusedClassBridge.fromPointer($ret, retain: false, release: true); + } + + /// allocWithZone: + static NativeInteropUnusedClassBridge allocWithZone(ffi.Pointer zone) { + final $ret = _objc_msgSend_1cwp428( + _class_NativeInteropUnusedClassBridge, + _sel_allocWithZone_, + zone, + ); + return NativeInteropUnusedClassBridge.fromPointer($ret, retain: false, release: true); + } +} + +extension NativeInteropUnusedClassBridge$Methods on NativeInteropUnusedClassBridge { + /// aField + objc.NSObject? get aField { + final $ret = _objc_msgSend_151sglz(object$.ref.pointer, _sel_aField); + return $ret.address == 0 ? null : objc.NSObject.fromPointer($ret, retain: true, release: true); + } + + /// initWithAField: + NativeInteropUnusedClassBridge initWithAField(objc.NSObject? aField) { + final $ret = _objc_msgSend_1sotr3r( + object$.ref.retainAndReturnPointer(), + _sel_initWithAField_, + aField?.ref.pointer ?? ffi.nullptr, + ); + return NativeInteropUnusedClassBridge.fromPointer($ret, retain: false, release: true); + } + + /// setAField: + set aField(objc.NSObject? value) { + _objc_msgSend_xtuoz7(object$.ref.pointer, _sel_setAField_, value?.ref.pointer ?? ffi.nullptr); + } +} + +/// Construction methods for `objc.ObjCBlock, objc.NSArray?, NativeInteropTestsError)>`. +abstract final class ObjCBlock_NSArray_ffiVoid_NSArray_NativeInteropTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + objc.NSArray? Function(ffi.Pointer, objc.NSArray?, NativeInteropTestsError) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + objc.NSArray? Function(ffi.Pointer, objc.NSArray?, NativeInteropTestsError) + >(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?, NativeInteropTestsError) + > + 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?, NativeInteropTestsError) + >(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?, NativeInteropTestsError) + > + fromFunction( + objc.NSArray? Function(ffi.Pointer, objc.NSArray?, NativeInteropTestsError) fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + objc.NSArray? Function(ffi.Pointer, objc.NSArray?, NativeInteropTestsError) + >( + 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), + NativeInteropTestsError.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?, NativeInteropTestsError)>`. +extension ObjCBlock_NSArray_ffiVoid_NSArray_NativeInteropTestsError$CallExtension + on + objc.ObjCBlock< + objc.NSArray? Function(ffi.Pointer, objc.NSArray?, NativeInteropTestsError) + > { + objc.NSArray? call( + ffi.Pointer arg0, + objc.NSArray? arg1, + NativeInteropTestsError 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?, NativeInteropTestsError)>`. +abstract final class ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + objc.NSDictionary? Function(ffi.Pointer, objc.NSDictionary?, NativeInteropTestsError) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + objc.NSDictionary? Function( + ffi.Pointer, + objc.NSDictionary?, + NativeInteropTestsError, + ) + >(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?, NativeInteropTestsError) + > + 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?, + NativeInteropTestsError, + ) + >(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?, NativeInteropTestsError) + > + fromFunction( + objc.NSDictionary? Function(ffi.Pointer, objc.NSDictionary?, NativeInteropTestsError) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + objc.NSDictionary? Function( + ffi.Pointer, + objc.NSDictionary?, + NativeInteropTestsError, + ) + >( + 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), + NativeInteropTestsError.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?, NativeInteropTestsError)>`. +extension ObjCBlock_NSDictionary_ffiVoid_NSDictionary_NativeInteropTestsError$CallExtension + on + objc.ObjCBlock< + objc.NSDictionary? Function( + ffi.Pointer, + objc.NSDictionary?, + NativeInteropTestsError, + ) + > { + objc.NSDictionary? call( + ffi.Pointer arg0, + objc.NSDictionary? arg1, + NativeInteropTestsError 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?, NativeInteropTestsError)>`. +abstract final class ObjCBlock_NSNumber_ffiVoid_NSNumber_NativeInteropTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + objc.NSNumber? Function(ffi.Pointer, objc.NSNumber?, NativeInteropTestsError) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + objc.NSNumber? Function(ffi.Pointer, objc.NSNumber?, NativeInteropTestsError) + >(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?, NativeInteropTestsError) + > + 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?, NativeInteropTestsError) + >(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?, NativeInteropTestsError) + > + fromFunction( + objc.NSNumber? Function(ffi.Pointer, objc.NSNumber?, NativeInteropTestsError) fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + objc.NSNumber? Function(ffi.Pointer, objc.NSNumber?, NativeInteropTestsError) + >( + 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), + NativeInteropTestsError.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?, NativeInteropTestsError)>`. +extension ObjCBlock_NSNumber_ffiVoid_NSNumber_NativeInteropTestsError$CallExtension + on + objc.ObjCBlock< + objc.NSNumber? Function(ffi.Pointer, objc.NSNumber?, NativeInteropTestsError) + > { + objc.NSNumber? call( + ffi.Pointer arg0, + objc.NSNumber? arg1, + NativeInteropTestsError 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, NativeInteropTestsError)>`. +abstract final class ObjCBlock_NSObject_ffiVoid_NativeInteropTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock, NativeInteropTestsError)> + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock, NativeInteropTestsError)>( + 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, NativeInteropTestsError)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ) + > + > + ptr, + ) => objc.ObjCBlock, NativeInteropTestsError)>( + 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, NativeInteropTestsError)> + fromFunction( + objc.NSObject? Function(ffi.Pointer, NativeInteropTestsError) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock, NativeInteropTestsError)>( + objc.newClosureBlock( + _closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn( + arg0, + NativeInteropTestsError.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, NativeInteropTestsError)>`. +extension ObjCBlock_NSObject_ffiVoid_NativeInteropTestsError$CallExtension + on objc.ObjCBlock, NativeInteropTestsError)> { + objc.NSObject? call(ffi.Pointer arg0, NativeInteropTestsError 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?, NativeInteropTestsError)>`. +abstract final class ObjCBlock_NSString_ffiVoid_NSString_NativeInteropTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + objc.NSString? Function(ffi.Pointer, objc.NSString?, NativeInteropTestsError) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + objc.NSString? Function(ffi.Pointer, objc.NSString?, NativeInteropTestsError) + >(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?, NativeInteropTestsError) + > + 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?, NativeInteropTestsError) + >(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?, NativeInteropTestsError) + > + fromFunction( + objc.NSString? Function(ffi.Pointer, objc.NSString?, NativeInteropTestsError) fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + objc.NSString? Function(ffi.Pointer, objc.NSString?, NativeInteropTestsError) + >( + 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), + NativeInteropTestsError.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?, NativeInteropTestsError)>`. +extension ObjCBlock_NSString_ffiVoid_NSString_NativeInteropTestsError$CallExtension + on + objc.ObjCBlock< + objc.NSString? Function(ffi.Pointer, objc.NSString?, NativeInteropTestsError) + > { + objc.NSString? call( + ffi.Pointer arg0, + objc.NSString? arg1, + NativeInteropTestsError 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, objc.NSNumber?, objc.NSNumber?, objc.NSString?, NativeInteropTestsError)>`. +abstract final class ObjCBlock_NativeInteropAllNullableTypesBridge_ffiVoid_NSNumber_NSNumber_NSString_NativeInteropTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NativeInteropAllNullableTypesBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + NativeInteropAllNullableTypesBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + >(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< + NativeInteropAllNullableTypesBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + > + 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< + NativeInteropAllNullableTypesBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + >(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< + NativeInteropAllNullableTypesBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + > + fromFunction( + NativeInteropAllNullableTypesBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + NativeInteropAllNullableTypesBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + >( + 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), + NativeInteropTestsError.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?, NativeInteropTestsError)>`. +extension ObjCBlock_NativeInteropAllNullableTypesBridge_ffiVoid_NSNumber_NSNumber_NSString_NativeInteropTestsError$CallExtension + on + objc.ObjCBlock< + NativeInteropAllNullableTypesBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + > { + NativeInteropAllNullableTypesBridge? call( + ffi.Pointer arg0, + objc.NSNumber? arg1, + objc.NSNumber? arg2, + objc.NSString? arg3, + NativeInteropTestsError 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 + : NativeInteropAllNullableTypesBridge.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, NativeInteropAllNullableTypesBridge?, NativeInteropTestsError)>`. +abstract final class ObjCBlock_NativeInteropAllNullableTypesBridge_ffiVoid_NativeInteropAllNullableTypesBridge_NativeInteropTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NativeInteropAllNullableTypesBridge? Function( + ffi.Pointer, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + NativeInteropAllNullableTypesBridge? Function( + ffi.Pointer, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + ) + >(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< + NativeInteropAllNullableTypesBridge? Function( + ffi.Pointer, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + NativeInteropAllNullableTypesBridge? Function( + ffi.Pointer, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + ) + >(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< + NativeInteropAllNullableTypesBridge? Function( + ffi.Pointer, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + ) + > + fromFunction( + NativeInteropAllNullableTypesBridge? Function( + ffi.Pointer, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + NativeInteropAllNullableTypesBridge? Function( + ffi.Pointer, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + fn( + arg0, + arg1.address == 0 + ? null + : NativeInteropAllNullableTypesBridge.fromPointer( + arg1, + retain: true, + release: true, + ), + NativeInteropTestsError.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, NativeInteropAllNullableTypesBridge?, NativeInteropTestsError)>`. +extension ObjCBlock_NativeInteropAllNullableTypesBridge_ffiVoid_NativeInteropAllNullableTypesBridge_NativeInteropTestsError$CallExtension + on + objc.ObjCBlock< + NativeInteropAllNullableTypesBridge? Function( + ffi.Pointer, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + ) + > { + NativeInteropAllNullableTypesBridge? call( + ffi.Pointer arg0, + NativeInteropAllNullableTypesBridge? arg1, + NativeInteropTestsError 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 + : NativeInteropAllNullableTypesBridge.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?, NativeInteropTestsError)>`. +abstract final class ObjCBlock_NativeInteropAllNullableTypesWithoutRecursionBridge_ffiVoid_NSNumber_NSNumber_NSString_NativeInteropTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + >(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< + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + > + 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< + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + >(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< + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + > + fromFunction( + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + >( + 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), + NativeInteropTestsError.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?, NativeInteropTestsError)>`. +extension ObjCBlock_NativeInteropAllNullableTypesWithoutRecursionBridge_ffiVoid_NSNumber_NSNumber_NSString_NativeInteropTestsError$CallExtension + on + objc.ObjCBlock< + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + objc.NSNumber?, + objc.NSNumber?, + objc.NSString?, + NativeInteropTestsError, + ) + > { + NativeInteropAllNullableTypesWithoutRecursionBridge? call( + ffi.Pointer arg0, + objc.NSNumber? arg1, + objc.NSNumber? arg2, + objc.NSString? arg3, + NativeInteropTestsError 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 + : NativeInteropAllNullableTypesWithoutRecursionBridge.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, NativeInteropAllNullableTypesWithoutRecursionBridge?, NativeInteropTestsError)>`. +abstract final class ObjCBlock_NativeInteropAllNullableTypesWithoutRecursionBridge_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge_NativeInteropTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + ) + >(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< + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + ) + >(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< + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + ) + > + fromFunction( + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + fn( + arg0, + arg1.address == 0 + ? null + : NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + arg1, + retain: true, + release: true, + ), + NativeInteropTestsError.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, NativeInteropAllNullableTypesWithoutRecursionBridge?, NativeInteropTestsError)>`. +extension ObjCBlock_NativeInteropAllNullableTypesWithoutRecursionBridge_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge_NativeInteropTestsError$CallExtension + on + objc.ObjCBlock< + NativeInteropAllNullableTypesWithoutRecursionBridge? Function( + ffi.Pointer, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + ) + > { + NativeInteropAllNullableTypesWithoutRecursionBridge? call( + ffi.Pointer arg0, + NativeInteropAllNullableTypesWithoutRecursionBridge? arg1, + NativeInteropTestsError 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 + : NativeInteropAllNullableTypesWithoutRecursionBridge.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, NativeInteropAllTypesBridge?, NativeInteropTestsError)>`. +abstract final class ObjCBlock_NativeInteropAllTypesBridge_ffiVoid_NativeInteropAllTypesBridge_NativeInteropTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NativeInteropAllTypesBridge? Function( + ffi.Pointer, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + NativeInteropAllTypesBridge? Function( + ffi.Pointer, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + ) + >(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< + NativeInteropAllTypesBridge? Function( + ffi.Pointer, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + NativeInteropAllTypesBridge? Function( + ffi.Pointer, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + ) + >(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< + NativeInteropAllTypesBridge? Function( + ffi.Pointer, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + ) + > + fromFunction( + NativeInteropAllTypesBridge? Function( + ffi.Pointer, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + NativeInteropAllTypesBridge? Function( + ffi.Pointer, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + fn( + arg0, + arg1.address == 0 + ? null + : NativeInteropAllTypesBridge.fromPointer(arg1, retain: true, release: true), + NativeInteropTestsError.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, NativeInteropAllTypesBridge?, NativeInteropTestsError)>`. +extension ObjCBlock_NativeInteropAllTypesBridge_ffiVoid_NativeInteropAllTypesBridge_NativeInteropTestsError$CallExtension + on + objc.ObjCBlock< + NativeInteropAllTypesBridge? Function( + ffi.Pointer, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + ) + > { + NativeInteropAllTypesBridge? call( + ffi.Pointer arg0, + NativeInteropAllTypesBridge? arg1, + NativeInteropTestsError 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 + : NativeInteropAllTypesBridge.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, NativeInteropTestsPigeonTypedData?, NativeInteropTestsError)>`. +abstract final class ObjCBlock_NativeInteropTestsPigeonTypedData_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + NativeInteropTestsPigeonTypedData? Function( + ffi.Pointer, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + NativeInteropTestsPigeonTypedData? Function( + ffi.Pointer, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + >(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< + NativeInteropTestsPigeonTypedData? Function( + ffi.Pointer, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + > + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) + > + > + ptr, + ) => + objc.ObjCBlock< + NativeInteropTestsPigeonTypedData? Function( + ffi.Pointer, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + >(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< + NativeInteropTestsPigeonTypedData? Function( + ffi.Pointer, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + > + fromFunction( + NativeInteropTestsPigeonTypedData? Function( + ffi.Pointer, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + NativeInteropTestsPigeonTypedData? Function( + ffi.Pointer, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => + fn( + arg0, + arg1.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer( + arg1, + retain: true, + release: true, + ), + NativeInteropTestsError.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, NativeInteropTestsPigeonTypedData?, NativeInteropTestsError)>`. +extension ObjCBlock_NativeInteropTestsPigeonTypedData_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError$CallExtension + on + objc.ObjCBlock< + NativeInteropTestsPigeonTypedData? Function( + ffi.Pointer, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + ) + > { + NativeInteropTestsPigeonTypedData? call( + ffi.Pointer arg0, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError 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 + : NativeInteropTestsPigeonTypedData.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 = _julz8q_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 = _julz8q_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)>.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)>( + _fnPtrTrampoline, + ).cast(); + static void _closureTrampoline(ffi.Pointer block) => + (objc.getBlockClosure(block) as void Function())(); + static ffi.Pointer _closureCallable = + ffi.Pointer.fromFunction)>( + _closureTrampoline, + ).cast(); +} + +/// Call operator for `objc.ObjCBlock`. +extension ObjCBlock_ffiVoid$CallExtension on objc.ObjCBlock { + void call() => ref.pointer.ref.invoke + .cast block)>>() + .asFunction)>()(ref.pointer); +} + +/// 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 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 = _julz8q_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 = _julz8q_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 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 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 = _julz8q_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 = _julz8q_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 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 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 = _julz8q_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 = _julz8q_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 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 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 = _julz8q_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 = _julz8q_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 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 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 = _julz8q_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 = _julz8q_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 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_NativeInteropAllNullableTypesBridge { + /// 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 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(NativeInteropAllNullableTypesBridge?) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock( + objc.newClosureBlock( + _closureCallable, + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NativeInteropAllNullableTypesBridge.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(NativeInteropAllNullableTypesBridge?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NativeInteropAllNullableTypesBridge.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_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(NativeInteropAllNullableTypesBridge?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NativeInteropAllNullableTypesBridge.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NativeInteropAllNullableTypesBridge.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_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 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_NativeInteropAllNullableTypesBridge$CallExtension + on objc.ObjCBlock { + void call(NativeInteropAllNullableTypesBridge? 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_NativeInteropAllNullableTypesWithoutRecursionBridge { + /// 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 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(NativeInteropAllNullableTypesWithoutRecursionBridge?) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock( + objc.newClosureBlock( + _closureCallable, + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NativeInteropAllNullableTypesWithoutRecursionBridge.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(NativeInteropAllNullableTypesWithoutRecursionBridge?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + arg0, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_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(NativeInteropAllNullableTypesWithoutRecursionBridge?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + arg0, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + arg0, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_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 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_NativeInteropAllNullableTypesWithoutRecursionBridge$CallExtension + on objc.ObjCBlock { + void call(NativeInteropAllNullableTypesWithoutRecursionBridge? 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_NativeInteropAllTypesBridge { + /// 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 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(NativeInteropAllTypesBridge?) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock( + objc.newClosureBlock( + _closureCallable, + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NativeInteropAllTypesBridge.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(NativeInteropAllTypesBridge?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NativeInteropAllTypesBridge.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_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(NativeInteropAllTypesBridge?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NativeInteropAllTypesBridge.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NativeInteropAllTypesBridge.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_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 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_NativeInteropAllTypesBridge$CallExtension + on objc.ObjCBlock { + void call(NativeInteropAllTypesBridge? 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_NativeInteropTestsPigeonTypedData { + /// 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 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(NativeInteropTestsPigeonTypedData?) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock( + objc.newClosureBlock( + _closureCallable, + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.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(NativeInteropTestsPigeonTypedData?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_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(NativeInteropTestsPigeonTypedData?) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0) => fn( + arg0.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer(arg0, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_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 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_NativeInteropTestsPigeonTypedData$CallExtension + on objc.ObjCBlock { + void call(NativeInteropTestsPigeonTypedData? 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, objc.NSArray?, NativeInteropTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSArray?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSArray?, + NativeInteropTestsError, + 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), + NativeInteropTestsError.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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + objc.NSArray?, + NativeInteropTestsError, + 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), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSArray.fromPointer(arg3, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSArray?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + objc.NSArray?, + NativeInteropTestsError, + 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), + NativeInteropTestsError.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), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSArray.fromPointer(arg3, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapBlockingBlock_bklti2(raw, rawListener, objc.objCContext); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSArray?, + NativeInteropTestsError, + 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?, NativeInteropTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSArray_NativeInteropTestsError_ffiVoidNSArray$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSArray?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + objc.NSArray? arg1, + NativeInteropTestsError 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?, NativeInteropTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSDictionary?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSDictionary?, + NativeInteropTestsError, + 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), + NativeInteropTestsError.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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + objc.NSDictionary?, + NativeInteropTestsError, + 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), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSDictionary.fromPointer(arg3, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSDictionary?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + objc.NSDictionary?, + NativeInteropTestsError, + 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), + NativeInteropTestsError.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), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSDictionary.fromPointer(arg3, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapBlockingBlock_bklti2(raw, rawListener, objc.objCContext); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSDictionary?, + NativeInteropTestsError, + 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?, NativeInteropTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSDictionary_NativeInteropTestsError_ffiVoidNSDictionary$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSDictionary?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + objc.NSDictionary? arg1, + NativeInteropTestsError 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?, NativeInteropTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSNumber?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSNumber?, + NativeInteropTestsError, + 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), + NativeInteropTestsError.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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + objc.NSNumber?, + NativeInteropTestsError, + 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), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSNumber.fromPointer(arg3, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSNumber?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + objc.NSNumber?, + NativeInteropTestsError, + 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), + NativeInteropTestsError.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), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSNumber.fromPointer(arg3, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapBlockingBlock_bklti2(raw, rawListener, objc.objCContext); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSNumber?, + NativeInteropTestsError, + 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?, NativeInteropTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSNumber_NativeInteropTestsError_ffiVoidNSNumber$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSNumber?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + objc.NSNumber? arg1, + NativeInteropTestsError 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?, NativeInteropTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSObject_NativeInteropTestsError_ffiVoiddispatchdatat { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSObject?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSObject?, + NativeInteropTestsError, + 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), + NativeInteropTestsError.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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + objc.NSObject?, + NativeInteropTestsError, + 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), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSObject.fromPointer(arg3, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSObject?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + objc.NSObject?, + NativeInteropTestsError, + 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), + NativeInteropTestsError.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), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSObject.fromPointer(arg3, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapBlockingBlock_bklti2(raw, rawListener, objc.objCContext); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSObject?, + NativeInteropTestsError, + 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?, NativeInteropTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSObject_NativeInteropTestsError_ffiVoiddispatchdatat$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSObject?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + objc.NSObject? arg1, + NativeInteropTestsError 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?, NativeInteropTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NSString_NativeInteropTestsError_ffiVoidNSString { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSString?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSString?, + NativeInteropTestsError, + 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), + NativeInteropTestsError.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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + objc.NSString?, + NativeInteropTestsError, + 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), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSString.fromPointer(arg3, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSString?, + NativeInteropTestsError, + 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?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + objc.NSString?, + NativeInteropTestsError, + 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), + NativeInteropTestsError.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), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NSString.fromPointer(arg3, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapBlockingBlock_bklti2(raw, rawListener, objc.objCContext); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSString?, + NativeInteropTestsError, + 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?, NativeInteropTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NSString_NativeInteropTestsError_ffiVoidNSString$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + objc.NSString?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + objc.NSString? arg1, + NativeInteropTestsError 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, NativeInteropAllNullableTypesBridge?, NativeInteropTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NativeInteropAllNullableTypesBridge_NativeInteropTestsError_ffiVoidNativeInteropAllNullableTypesBridge { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + 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, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + 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, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + 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, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NativeInteropAllNullableTypesBridge.fromPointer( + arg1, + retain: true, + release: true, + ), + NativeInteropTestsError.fromPointer(arg2, retain: true, release: true), + ObjCBlock_ffiVoid_NativeInteropAllNullableTypesBridge.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, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + 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 + : NativeInteropAllNullableTypesBridge.fromPointer(arg1, retain: false, release: true), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NativeInteropAllNullableTypesBridge.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + 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, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + 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 + : NativeInteropAllNullableTypesBridge.fromPointer(arg1, retain: false, release: true), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NativeInteropAllNullableTypesBridge.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 + : NativeInteropAllNullableTypesBridge.fromPointer(arg1, retain: false, release: true), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NativeInteropAllNullableTypesBridge.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapBlockingBlock_bklti2(raw, rawListener, objc.objCContext); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + 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, NativeInteropAllNullableTypesBridge?, NativeInteropTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NativeInteropAllNullableTypesBridge_NativeInteropTestsError_ffiVoidNativeInteropAllNullableTypesBridge$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllNullableTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + NativeInteropAllNullableTypesBridge? arg1, + NativeInteropTestsError 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, NativeInteropAllNullableTypesWithoutRecursionBridge?, NativeInteropTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge_NativeInteropTestsError_ffiVoidNativeInteropAllNullableTypesWithoutRecursionBridge { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + 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, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + 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, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + 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, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + arg1, + retain: true, + release: true, + ), + NativeInteropTestsError.fromPointer(arg2, retain: true, release: true), + ObjCBlock_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge.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, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + 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 + : NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + arg1, + retain: false, + release: true, + ), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + 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, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + 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 + : NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + arg1, + retain: false, + release: true, + ), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge.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 + : NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + arg1, + retain: false, + release: true, + ), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapBlockingBlock_bklti2(raw, rawListener, objc.objCContext); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + 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, NativeInteropAllNullableTypesWithoutRecursionBridge?, NativeInteropTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NativeInteropAllNullableTypesWithoutRecursionBridge_NativeInteropTestsError_ffiVoidNativeInteropAllNullableTypesWithoutRecursionBridge$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllNullableTypesWithoutRecursionBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + NativeInteropAllNullableTypesWithoutRecursionBridge? arg1, + NativeInteropTestsError 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, NativeInteropAllTypesBridge?, NativeInteropTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NativeInteropAllTypesBridge_NativeInteropTestsError_ffiVoidNativeInteropAllTypesBridge { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + 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, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + 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, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + 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, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NativeInteropAllTypesBridge.fromPointer(arg1, retain: true, release: true), + NativeInteropTestsError.fromPointer(arg2, retain: true, release: true), + ObjCBlock_ffiVoid_NativeInteropAllTypesBridge.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, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + 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 + : NativeInteropAllTypesBridge.fromPointer(arg1, retain: false, release: true), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NativeInteropAllTypesBridge.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + 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, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + 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 + : NativeInteropAllTypesBridge.fromPointer(arg1, retain: false, release: true), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NativeInteropAllTypesBridge.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 + : NativeInteropAllTypesBridge.fromPointer(arg1, retain: false, release: true), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NativeInteropAllTypesBridge.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapBlockingBlock_bklti2(raw, rawListener, objc.objCContext); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + 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, NativeInteropAllTypesBridge?, NativeInteropTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NativeInteropAllTypesBridge_NativeInteropTestsError_ffiVoidNativeInteropAllTypesBridge$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropAllTypesBridge?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + NativeInteropAllTypesBridge? arg1, + NativeInteropTestsError 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, NativeInteropTestsError)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock, NativeInteropTestsError)> + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => objc.ObjCBlock, NativeInteropTestsError)>( + 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, NativeInteropTestsError)> + fromFunctionPointer( + ffi.Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer arg0, ffi.Pointer arg1) + > + > + ptr, + ) => objc.ObjCBlock, NativeInteropTestsError)>( + 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, NativeInteropTestsError)> + fromFunction( + void Function(ffi.Pointer, NativeInteropTestsError) fn, { + bool keepIsolateAlive = true, + }) => objc.ObjCBlock, NativeInteropTestsError)>( + objc.newClosureBlock( + _closureCallable, + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, NativeInteropTestsError.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, NativeInteropTestsError)> listener( + void Function(ffi.Pointer, NativeInteropTestsError) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, NativeInteropTestsError.fromPointer(arg1, retain: false, release: true)), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapListenerBlock_18v1jvf(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock, NativeInteropTestsError)>( + 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, NativeInteropTestsError)> blocking( + void Function(ffi.Pointer, NativeInteropTestsError) fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, NativeInteropTestsError.fromPointer(arg1, retain: false, release: true)), + keepIsolateAlive, + ); + final rawListener = objc.newClosureBlock( + _blockingListenerCallable.nativeFunction.cast(), + (ffi.Pointer arg0, ffi.Pointer arg1) => + fn(arg0, NativeInteropTestsError.fromPointer(arg1, retain: false, release: true)), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapBlockingBlock_18v1jvf(raw, rawListener, objc.objCContext); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock, NativeInteropTestsError)>( + 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, 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, NativeInteropTestsError)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError$CallExtension + on objc.ObjCBlock, NativeInteropTestsError)> { + void call(ffi.Pointer arg0, NativeInteropTestsError 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, NativeInteropTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError_ffiVoid { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsError, + 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, + NativeInteropTestsError, + 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, + NativeInteropTestsError, + 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, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + NativeInteropTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => fn( + arg0, + NativeInteropTestsError.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, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + NativeInteropTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => fn( + arg0, + NativeInteropTestsError.fromPointer(arg1, retain: false, release: true), + ObjCBlock_ffiVoid.fromPointer(arg2, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapListenerBlock_jk1ljc(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsError, + 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, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + NativeInteropTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => fn( + arg0, + NativeInteropTestsError.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, + NativeInteropTestsError.fromPointer(arg1, retain: false, release: true), + ObjCBlock_ffiVoid.fromPointer(arg2, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapBlockingBlock_jk1ljc(raw, rawListener, objc.objCContext); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsError, + 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, NativeInteropTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError_ffiVoid$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + NativeInteropTestsError 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, NativeInteropTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError_ffiVoiddispatchdatat { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsError, + 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, + NativeInteropTestsError, + 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, + NativeInteropTestsError, + 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, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + NativeInteropTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => fn( + arg0, + NativeInteropTestsError.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, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + NativeInteropTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _listenerCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => fn( + arg0, + NativeInteropTestsError.fromPointer(arg1, retain: false, release: true), + ObjCBlock_ffiVoid_NSObject.fromPointer(arg2, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapListenerBlock_jk1ljc(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsError, + 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, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + NativeInteropTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) { + final raw = objc.newClosureBlock( + _blockingCallable.nativeFunction.cast(), + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ) => fn( + arg0, + NativeInteropTestsError.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, + NativeInteropTestsError.fromPointer(arg1, retain: false, release: true), + ObjCBlock_ffiVoid_NSObject.fromPointer(arg2, retain: false, release: true), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapBlockingBlock_jk1ljc(raw, rawListener, objc.objCContext); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsError, + 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, NativeInteropTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsError_ffiVoiddispatchdatat$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + NativeInteropTestsError 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, NativeInteropTestsPigeonTypedData?, NativeInteropTestsError, objc.ObjCBlock)>`. +abstract final class ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData { + /// Returns a block that wraps the given raw block pointer. + static objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromPointer( + ffi.Pointer pointer, { + bool retain = false, + bool release = false, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + 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, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + 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, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + 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, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + fromFunction( + void Function( + ffi.Pointer, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + fn, { + bool keepIsolateAlive = true, + }) => + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + >( + objc.newClosureBlock( + _closureCallable, + ( + ffi.Pointer arg0, + ffi.Pointer arg1, + ffi.Pointer arg2, + ffi.Pointer arg3, + ) => fn( + arg0, + arg1.address == 0 + ? null + : NativeInteropTestsPigeonTypedData.fromPointer(arg1, retain: true, release: true), + NativeInteropTestsError.fromPointer(arg2, retain: true, release: true), + ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.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, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + listener( + void Function( + ffi.Pointer, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + 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 + : NativeInteropTestsPigeonTypedData.fromPointer(arg1, retain: false, release: true), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapListenerBlock_bklti2(raw); + objc.objectRelease(raw.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + 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, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > + blocking( + void Function( + ffi.Pointer, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + 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 + : NativeInteropTestsPigeonTypedData.fromPointer(arg1, retain: false, release: true), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.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 + : NativeInteropTestsPigeonTypedData.fromPointer(arg1, retain: false, release: true), + NativeInteropTestsError.fromPointer(arg2, retain: false, release: true), + ObjCBlock_ffiVoid_NativeInteropTestsPigeonTypedData.fromPointer( + arg3, + retain: false, + release: true, + ), + ), + keepIsolateAlive, + ); + final wrapper = _julz8q_wrapBlockingBlock_bklti2(raw, rawListener, objc.objCContext); + objc.objectRelease(raw.cast()); + objc.objectRelease(rawListener.cast()); + return objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + 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, NativeInteropTestsPigeonTypedData?, NativeInteropTestsError, objc.ObjCBlock)>`. +extension ObjCBlock_ffiVoid_ffiVoid_NativeInteropTestsPigeonTypedData_NativeInteropTestsError_ffiVoidNativeInteropTestsPigeonTypedData$CallExtension + on + objc.ObjCBlock< + ffi.Void Function( + ffi.Pointer, + NativeInteropTestsPigeonTypedData?, + NativeInteropTestsError, + objc.ObjCBlock, + ) + > { + void call( + ffi.Pointer arg0, + NativeInteropTestsPigeonTypedData? arg1, + NativeInteropTestsError 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_NSURLCredential = objc.getClass("test_plugin.NSURLCredential"); +late final _class_NativeInteropAllClassesWrapperBridge = objc.getClass( + "test_plugin.NativeInteropAllClassesWrapperBridge", +); +late final _class_NativeInteropAllNullableTypesBridge = objc.getClass( + "test_plugin.NativeInteropAllNullableTypesBridge", +); +late final _class_NativeInteropAllNullableTypesWithoutRecursionBridge = objc.getClass( + "test_plugin.NativeInteropAllNullableTypesWithoutRecursionBridge", +); +late final _class_NativeInteropAllTypesBridge = objc.getClass( + "test_plugin.NativeInteropAllTypesBridge", +); +late final _class_NativeInteropFlutterIntegrationCoreApiRegistrar = objc.getClass( + "test_plugin.NativeInteropFlutterIntegrationCoreApiRegistrar", +); +late final _class_NativeInteropHostIntegrationCoreApiSetup = objc.getClass( + "test_plugin.NativeInteropHostIntegrationCoreApiSetup", +); +late final _class_NativeInteropTestsError = objc.getClass("test_plugin.NativeInteropTestsError"); +late final _class_NativeInteropTestsNumberWrapper = objc.getClass( + "test_plugin.NativeInteropTestsNumberWrapper", +); +late final _class_NativeInteropTestsPigeonInternalNull = objc.getClass( + "test_plugin.NativeInteropTestsPigeonInternalNull", +); +late final _class_NativeInteropTestsPigeonTypedData = objc.getClass( + "test_plugin.NativeInteropTestsPigeonTypedData", +); +late final _class_NativeInteropUnusedClassBridge = objc.getClass( + "test_plugin.NativeInteropUnusedClassBridge", +); +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_13e57b1 = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, ffi.Pointer) + > + >() + .asFunction, 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_15mcegd = 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_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_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_1dnmby7 = 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_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_1hz7y9r = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, ffi.Pointer) + > + >() + .asFunction, 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_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_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_1p6535m = 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_1ptq3i3 = 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_1rzlw7q = 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_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_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, 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, 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_gthscw = 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_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_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_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, 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_wqpzrx = 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_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, ffi.Pointer)>(); +final _objc_msgSend_xw7tjf = objc.msgSendPointer + .cast< + ffi.NativeFunction< + ffi.Long Function(ffi.Pointer, ffi.Pointer) + > + >() + .asFunction, ffi.Pointer)>(); +late final _protocol_NativeInteropFlutterIntegrationCoreApiBridge = objc.getProtocol( + "test_plugin.NativeInteropFlutterIntegrationCoreApiBridge", +); +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_callFlutterEchoAsyncNativeInteropAllTypesWithEverything_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNativeInteropAllTypesWithEverything: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_callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithEverything_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithEverything:wrappedError:completionHandler:", + ); +late final _sel_callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_wrappedError_completionHandler_ = + objc.registerName( + "callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything: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_callFlutterEchoNativeInteropAllNullableTypesWithEverything_wrappedError_ = objc + .registerName("callFlutterEchoNativeInteropAllNullableTypesWithEverything:wrappedError:"); +late final _sel_callFlutterEchoNativeInteropAllNullableTypesWithoutRecursionWithEverything_wrappedError_ = + objc.registerName( + "callFlutterEchoNativeInteropAllNullableTypesWithoutRecursionWithEverything:wrappedError:", + ); +late final _sel_callFlutterEchoNativeInteropAllTypesWithEverything_wrappedError_ = objc + .registerName("callFlutterEchoNativeInteropAllTypesWithEverything:wrappedError:"); +late final _sel_callFlutterEchoNativeInteropAnotherEnumWithAnotherEnum_wrappedError_ = objc + .registerName("callFlutterEchoNativeInteropAnotherEnumWithAnotherEnum: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_echoAsyncNativeInteropAllTypesWithEverything_error_completionHandler_ = objc + .registerName("echoAsyncNativeInteropAllTypesWithEverything:error:completionHandler:"); +late final _sel_echoAsyncNativeInteropAllTypesWithEverything_wrappedError_completionHandler_ = objc + .registerName("echoAsyncNativeInteropAllTypesWithEverything: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_echoAsyncNullableNativeInteropAllNullableTypesWithEverything_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableNativeInteropAllNullableTypesWithEverything:error:completionHandler:", + ); +late final _sel_echoAsyncNullableNativeInteropAllNullableTypesWithEverything_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableNativeInteropAllNullableTypesWithEverything:wrappedError:completionHandler:", + ); +late final _sel_echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_completionHandler_ = + objc.registerName( + "echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything:error:completionHandler:", + ); +late final _sel_echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything_wrappedError_completionHandler_ = + objc.registerName( + "echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything: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_echoNamedDefaultStringWithAString_wrappedError_ = objc.registerName( + "echoNamedDefaultStringWithAString:wrappedError:", +); +late final _sel_echoNamedNullableStringWithANullableString_wrappedError_ = objc.registerName( + "echoNamedNullableStringWithANullableString:wrappedError:", +); +late final _sel_echoNativeInteropAllNullableTypesWithEverything_error_ = objc.registerName( + "echoNativeInteropAllNullableTypesWithEverything:error:", +); +late final _sel_echoNativeInteropAllNullableTypesWithoutRecursionWithEverything_error_ = objc + .registerName("echoNativeInteropAllNullableTypesWithoutRecursionWithEverything:error:"); +late final _sel_echoNativeInteropAllTypesWithEverything_error_ = objc.registerName( + "echoNativeInteropAllTypesWithEverything:error:", +); +late final _sel_echoNativeInteropAnotherEnumWithAnotherEnum_error_ = objc.registerName( + "echoNativeInteropAnotherEnumWithAnotherEnum:error:", +); +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_registerAndImmediatelyDeregisterHostApiWithName_wrappedError_ = objc.registerName( + "registerAndImmediatelyDeregisterHostApiWithName:wrappedError:", +); +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_testCallDeregisteredFlutterApiWithName_wrappedError_ = objc.registerName( + "testCallDeregisteredFlutterApiWithName:wrappedError:", +); +late final _sel_testDeregisterFlutterApiWithWrappedError_ = objc.registerName( + "testDeregisterFlutterApiWithWrappedError:", +); +late final _sel_testDeregisterHostApiWithWrappedError_ = objc.registerName( + "testDeregisterHostApiWithWrappedError:", +); +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/native_interop_tests.gen.jni.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/native_interop_tests.gen.jni.dart new file mode 100644 index 000000000000..8317e60402b0 --- /dev/null +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/native_interop_tests.gen.jni.dart @@ -0,0 +1,34508 @@ +// AUTO GENERATED BY JNIGEN 0.16.1. 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$_; + +const _$jniVersionCheck = jni$_.JniVersionCheck(1, 0); + +/// from: `com.example.test_plugin.NativeInteropTestsError` +extension type NativeInteropTestsError._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'com/example/test_plugin/NativeInteropTestsError'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = $NativeInteropTestsError$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 NativeInteropTestsError( + 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 NativeInteropTestsError.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 NativeInteropTestsError$$Methods on NativeInteropTestsError { + static final _id_get$code = NativeInteropTestsError._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$_.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 = NativeInteropTestsError._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$_.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 = NativeInteropTestsError._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$_.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 $NativeInteropTestsError$Type$ extends jni$_.JType { + @jni$_.internal + const $NativeInteropTestsError$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Lcom/example/test_plugin/NativeInteropTestsError;'; +} + +/// from: `com.example.test_plugin.NativeInteropHostIntegrationCoreApi` +extension type NativeInteropHostIntegrationCoreApi._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName( + r'com/example/test_plugin/NativeInteropHostIntegrationCoreApi', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NativeInteropHostIntegrationCoreApi$Type$(); +} + +extension NativeInteropHostIntegrationCoreApi$$Methods on NativeInteropHostIntegrationCoreApi { + static final _id_noop = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._class.instanceMethodId( + r'echoAllTypes', + r'(Lcom/example/test_plugin/NativeInteropAllTypes;)Lcom/example/test_plugin/NativeInteropAllTypes;', + ); + + 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: com.example.test_plugin.NativeInteropAllTypes): com.example.test_plugin.NativeInteropAllTypes` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllTypes echoAllTypes(NativeInteropAllTypes nativeInteropAllTypes) { + final _$nativeInteropAllTypes = nativeInteropAllTypes.reference; + return _echoAllTypes( + reference.pointer, + _id_echoAllTypes.pointer, + _$nativeInteropAllTypes.pointer, + ).object(); + } + + static final _id_throwError = NativeInteropHostIntegrationCoreApi._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$_.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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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$_.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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._class.instanceMethodId( + r'echoClassWrapper', + r'(Lcom/example/test_plugin/NativeInteropAllClassesWrapper;)Lcom/example/test_plugin/NativeInteropAllClassesWrapper;', + ); + + 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: com.example.test_plugin.NativeInteropAllClassesWrapper): com.example.test_plugin.NativeInteropAllClassesWrapper` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllClassesWrapper echoClassWrapper( + NativeInteropAllClassesWrapper nativeInteropAllClassesWrapper, + ) { + final _$nativeInteropAllClassesWrapper = nativeInteropAllClassesWrapper.reference; + return _echoClassWrapper( + reference.pointer, + _id_echoClassWrapper.pointer, + _$nativeInteropAllClassesWrapper.pointer, + ).object(); + } + + static final _id_echoEnum = NativeInteropHostIntegrationCoreApi._class.instanceMethodId( + r'echoEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;)Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + 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: com.example.test_plugin.NativeInteropAnEnum): com.example.test_plugin.NativeInteropAnEnum` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnEnum echoEnum(NativeInteropAnEnum nativeInteropAnEnum) { + final _$nativeInteropAnEnum = nativeInteropAnEnum.reference; + return _echoEnum( + reference.pointer, + _id_echoEnum.pointer, + _$nativeInteropAnEnum.pointer, + ).object(); + } + + static final _id_echoAnotherEnum = NativeInteropHostIntegrationCoreApi._class.instanceMethodId( + r'echoAnotherEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;)Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + 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: com.example.test_plugin.NativeInteropAnotherEnum): com.example.test_plugin.NativeInteropAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnotherEnum echoAnotherEnum(NativeInteropAnotherEnum nativeInteropAnotherEnum) { + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum.reference; + return _echoAnotherEnum( + reference.pointer, + _id_echoAnotherEnum.pointer, + _$nativeInteropAnotherEnum.pointer, + ).object(); + } + + static final _id_echoNamedDefaultString = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._class.instanceMethodId( + r'echoAllNullableTypes', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypes;)Lcom/example/test_plugin/NativeInteropAllNullableTypes;', + ); + + 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: com.example.test_plugin.NativeInteropAllNullableTypes?): com.example.test_plugin.NativeInteropAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypes? echoAllNullableTypes( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) { + final _$nativeInteropAllNullableTypes = + nativeInteropAllNullableTypes?.reference ?? jni$_.jNullReference; + return _echoAllNullableTypes( + reference.pointer, + _id_echoAllNullableTypes.pointer, + _$nativeInteropAllNullableTypes.pointer, + ).object(); + } + + static final _id_echoAllNullableTypesWithoutRecursion = NativeInteropHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAllNullableTypesWithoutRecursion', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;)Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;', + ); + + 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: com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypesWithoutRecursion? echoAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) { + final _$nativeInteropAllNullableTypesWithoutRecursion = + nativeInteropAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + return _echoAllNullableTypesWithoutRecursion( + reference.pointer, + _id_echoAllNullableTypesWithoutRecursion.pointer, + _$nativeInteropAllNullableTypesWithoutRecursion.pointer, + ).object(); + } + + static final _id_extractNestedNullableString = NativeInteropHostIntegrationCoreApi._class + .instanceMethodId( + r'extractNestedNullableString', + r'(Lcom/example/test_plugin/NativeInteropAllClassesWrapper;)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: com.example.test_plugin.NativeInteropAllClassesWrapper): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? extractNestedNullableString( + NativeInteropAllClassesWrapper nativeInteropAllClassesWrapper, + ) { + final _$nativeInteropAllClassesWrapper = nativeInteropAllClassesWrapper.reference; + return _extractNestedNullableString( + reference.pointer, + _id_extractNestedNullableString.pointer, + _$nativeInteropAllClassesWrapper.pointer, + ).object(); + } + + static final _id_createNestedNullableString = NativeInteropHostIntegrationCoreApi._class + .instanceMethodId( + r'createNestedNullableString', + r'(Ljava/lang/String;)Lcom/example/test_plugin/NativeInteropAllClassesWrapper;', + ); + + 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?): com.example.test_plugin.NativeInteropAllClassesWrapper` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllClassesWrapper createNestedNullableString(jni$_.JString? string) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _createNestedNullableString( + reference.pointer, + _id_createNestedNullableString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_sendMultipleNullableTypes = NativeInteropHostIntegrationCoreApi._class + .instanceMethodId( + r'sendMultipleNullableTypes', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)Lcom/example/test_plugin/NativeInteropAllNullableTypes;', + ); + + 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?): com.example.test_plugin.NativeInteropAllNullableTypes` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypes 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 = NativeInteropHostIntegrationCoreApi + ._class + .instanceMethodId( + r'sendMultipleNullableTypesWithoutRecursion', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;', + ); + + 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?): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypesWithoutRecursion 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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._class.instanceMethodId( + r'echoNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;)Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + 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: com.example.test_plugin.NativeInteropAnEnum?): com.example.test_plugin.NativeInteropAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnEnum? echoNullableEnum(NativeInteropAnEnum? nativeInteropAnEnum) { + final _$nativeInteropAnEnum = nativeInteropAnEnum?.reference ?? jni$_.jNullReference; + return _echoNullableEnum( + reference.pointer, + _id_echoNullableEnum.pointer, + _$nativeInteropAnEnum.pointer, + ).object(); + } + + static final _id_echoAnotherNullableEnum = NativeInteropHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAnotherNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;)Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + 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: com.example.test_plugin.NativeInteropAnotherEnum?): com.example.test_plugin.NativeInteropAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnotherEnum? echoAnotherNullableEnum( + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + ) { + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum?.reference ?? jni$_.jNullReference; + return _echoAnotherNullableEnum( + reference.pointer, + _id_echoAnotherNullableEnum.pointer, + _$nativeInteropAnotherEnum.pointer, + ).object(); + } + + static final _id_echoOptionalNullableInt = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncDouble = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncBool = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncString = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncUint8List = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncInt32List = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncInt64List = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncFloat64List = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncObject = NativeInteropHostIntegrationCoreApi._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(const jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncList = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_echoAsyncEnumList = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_echoAsyncClassList = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_echoAsyncMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_echoAsyncStringMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_echoAsyncIntMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_echoAsyncEnumMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_echoAsyncClassMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_echoAsyncEnum = NativeInteropHostIntegrationCoreApi._class.instanceMethodId( + r'echoAsyncEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;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: com.example.test_plugin.NativeInteropAnEnum): com.example.test_plugin.NativeInteropAnEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncEnum(NativeInteropAnEnum nativeInteropAnEnum) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnEnum = nativeInteropAnEnum.reference; + final $r = _echoAsyncEnum( + reference.pointer, + _id_echoAsyncEnum.pointer, + _$nativeInteropAnEnum.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(NativeInteropAnEnum.type, releaseOriginal: true); + } + + static final _id_echoAnotherAsyncEnum = NativeInteropHostIntegrationCoreApi._class.instanceMethodId( + r'echoAnotherAsyncEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;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: com.example.test_plugin.NativeInteropAnotherEnum): com.example.test_plugin.NativeInteropAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAnotherAsyncEnum( + NativeInteropAnotherEnum nativeInteropAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum.reference; + final $r = _echoAnotherAsyncEnum( + reference.pointer, + _id_echoAnotherAsyncEnum.pointer, + _$nativeInteropAnotherEnum.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(NativeInteropAnotherEnum.type, releaseOriginal: true); + } + + static final _id_throwAsyncError = NativeInteropHostIntegrationCoreApi._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(const jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_throwAsyncErrorFromVoid = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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(const jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncNativeInteropAllTypes = NativeInteropHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNativeInteropAllTypes', + r'(Lcom/example/test_plugin/NativeInteropAllTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNativeInteropAllTypes = + 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 echoAsyncNativeInteropAllTypes(everything: com.example.test_plugin.NativeInteropAllTypes): com.example.test_plugin.NativeInteropAllTypes` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNativeInteropAllTypes( + NativeInteropAllTypes nativeInteropAllTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAllTypes = nativeInteropAllTypes.reference; + final $r = _echoAsyncNativeInteropAllTypes( + reference.pointer, + _id_echoAsyncNativeInteropAllTypes.pointer, + _$nativeInteropAllTypes.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(NativeInteropAllTypes.type, releaseOriginal: true); + } + + static final _id_echoAsyncNullableNativeInteropAllNullableTypes = + NativeInteropHostIntegrationCoreApi._class.instanceMethodId( + r'echoAsyncNullableNativeInteropAllNullableTypes', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableNativeInteropAllNullableTypes = + 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 echoAsyncNullableNativeInteropAllNullableTypes(everything: com.example.test_plugin.NativeInteropAllNullableTypes?): com.example.test_plugin.NativeInteropAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAllNullableTypes = + nativeInteropAllNullableTypes?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableNativeInteropAllNullableTypes( + reference.pointer, + _id_echoAsyncNullableNativeInteropAllNullableTypes.pointer, + _$nativeInteropAllNullableTypes.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( + NativeInteropAllNullableTypes.type, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion = + NativeInteropHostIntegrationCoreApi._class.instanceMethodId( + r'echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion = + 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 echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion(everything: com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAllNullableTypesWithoutRecursion = + nativeInteropAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + reference.pointer, + _id_echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion.pointer, + _$nativeInteropAllNullableTypesWithoutRecursion.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( + NativeInteropAllNullableTypesWithoutRecursion.type, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableInt = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableDouble = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableBool = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableString = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableUint8List = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableInt32List = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableInt64List = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableFloat64List = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableObject = NativeInteropHostIntegrationCoreApi._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(const jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncNullableList = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_echoAsyncNullableEnumList = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_echoAsyncNullableClassList = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_echoAsyncNullableMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_echoAsyncNullableStringMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_echoAsyncNullableIntMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_echoAsyncNullableEnumMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_echoAsyncNullableClassMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_echoAsyncNullableEnum = NativeInteropHostIntegrationCoreApi._class.instanceMethodId( + r'echoAsyncNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;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: com.example.test_plugin.NativeInteropAnEnum?): com.example.test_plugin.NativeInteropAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableEnum( + NativeInteropAnEnum? nativeInteropAnEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnEnum = nativeInteropAnEnum?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnum( + reference.pointer, + _id_echoAsyncNullableEnum.pointer, + _$nativeInteropAnEnum.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(NativeInteropAnEnum.type, releaseOriginal: true); + } + + static final _id_echoAnotherAsyncNullableEnum = NativeInteropHostIntegrationCoreApi._class + .instanceMethodId( + r'echoAnotherAsyncNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;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: com.example.test_plugin.NativeInteropAnotherEnum?): com.example.test_plugin.NativeInteropAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAnotherAsyncNullableEnum( + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum?.reference ?? jni$_.jNullReference; + final $r = _echoAnotherAsyncNullableEnum( + reference.pointer, + _id_echoAnotherAsyncNullableEnum.pointer, + _$nativeInteropAnotherEnum.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(NativeInteropAnotherEnum.type, releaseOriginal: true); + } + + static final _id_callFlutterNoop = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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$_.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 = NativeInteropHostIntegrationCoreApi._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_callFlutterEchoNativeInteropAllTypes = NativeInteropHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoNativeInteropAllTypes', + r'(Lcom/example/test_plugin/NativeInteropAllTypes;)Lcom/example/test_plugin/NativeInteropAllTypes;', + ); + + static final _callFlutterEchoNativeInteropAllTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNativeInteropAllTypes(everything: com.example.test_plugin.NativeInteropAllTypes): com.example.test_plugin.NativeInteropAllTypes` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllTypes callFlutterEchoNativeInteropAllTypes( + NativeInteropAllTypes nativeInteropAllTypes, + ) { + final _$nativeInteropAllTypes = nativeInteropAllTypes.reference; + return _callFlutterEchoNativeInteropAllTypes( + reference.pointer, + _id_callFlutterEchoNativeInteropAllTypes.pointer, + _$nativeInteropAllTypes.pointer, + ).object(); + } + + static final _id_callFlutterEchoNativeInteropAllNullableTypes = + NativeInteropHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoNativeInteropAllNullableTypes', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypes;)Lcom/example/test_plugin/NativeInteropAllNullableTypes;', + ); + + static final _callFlutterEchoNativeInteropAllNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNativeInteropAllNullableTypes(everything: com.example.test_plugin.NativeInteropAllNullableTypes?): com.example.test_plugin.NativeInteropAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypes? callFlutterEchoNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) { + final _$nativeInteropAllNullableTypes = + nativeInteropAllNullableTypes?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNativeInteropAllNullableTypes( + reference.pointer, + _id_callFlutterEchoNativeInteropAllNullableTypes.pointer, + _$nativeInteropAllNullableTypes.pointer, + ).object(); + } + + static final _id_callFlutterSendMultipleNullableTypes = NativeInteropHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterSendMultipleNullableTypes', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)Lcom/example/test_plugin/NativeInteropAllNullableTypes;', + ); + + 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?): com.example.test_plugin.NativeInteropAllNullableTypes` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypes 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_callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion = + NativeInteropHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;)Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;', + ); + + static final _callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion(everything: com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypesWithoutRecursion? + callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) { + final _$nativeInteropAllNullableTypesWithoutRecursion = + nativeInteropAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion( + reference.pointer, + _id_callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion.pointer, + _$nativeInteropAllNullableTypesWithoutRecursion.pointer, + ).object(); + } + + static final _id_callFlutterSendMultipleNullableTypesWithoutRecursion = + NativeInteropHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterSendMultipleNullableTypesWithoutRecursion', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;', + ); + + 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?): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypesWithoutRecursion + 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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;)Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + 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: com.example.test_plugin.NativeInteropAnEnum): com.example.test_plugin.NativeInteropAnEnum` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnEnum callFlutterEchoEnum(NativeInteropAnEnum nativeInteropAnEnum) { + final _$nativeInteropAnEnum = nativeInteropAnEnum.reference; + return _callFlutterEchoEnum( + reference.pointer, + _id_callFlutterEchoEnum.pointer, + _$nativeInteropAnEnum.pointer, + ).object(); + } + + static final _id_callFlutterEchoNativeInteropAnotherEnum = NativeInteropHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoNativeInteropAnotherEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;)Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + static final _callFlutterEchoNativeInteropAnotherEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNativeInteropAnotherEnum(anotherEnum: com.example.test_plugin.NativeInteropAnotherEnum): com.example.test_plugin.NativeInteropAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnotherEnum callFlutterEchoNativeInteropAnotherEnum( + NativeInteropAnotherEnum nativeInteropAnotherEnum, + ) { + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum.reference; + return _callFlutterEchoNativeInteropAnotherEnum( + reference.pointer, + _id_callFlutterEchoNativeInteropAnotherEnum.pointer, + _$nativeInteropAnotherEnum.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableBool = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi + ._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 = NativeInteropHostIntegrationCoreApi + ._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi + ._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 = NativeInteropHostIntegrationCoreApi._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 = NativeInteropHostIntegrationCoreApi + ._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 = NativeInteropHostIntegrationCoreApi + ._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 = NativeInteropHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;)Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + 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: com.example.test_plugin.NativeInteropAnEnum?): com.example.test_plugin.NativeInteropAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnEnum? callFlutterEchoNullableEnum(NativeInteropAnEnum? nativeInteropAnEnum) { + final _$nativeInteropAnEnum = nativeInteropAnEnum?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableEnum( + reference.pointer, + _id_callFlutterEchoNullableEnum.pointer, + _$nativeInteropAnEnum.pointer, + ).object(); + } + + static final _id_callFlutterEchoAnotherNullableEnum = NativeInteropHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoAnotherNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;)Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + 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: com.example.test_plugin.NativeInteropAnotherEnum?): com.example.test_plugin.NativeInteropAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnotherEnum? callFlutterEchoAnotherNullableEnum( + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + ) { + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum?.reference ?? jni$_.jNullReference; + return _callFlutterEchoAnotherNullableEnum( + reference.pointer, + _id_callFlutterEchoAnotherNullableEnum.pointer, + _$nativeInteropAnotherEnum.pointer, + ).object(); + } + + static final _id_callFlutterNoopAsync = NativeInteropHostIntegrationCoreApi._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_callFlutterEchoAsyncNativeInteropAllTypes = NativeInteropHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAsyncNativeInteropAllTypes', + r'(Lcom/example/test_plugin/NativeInteropAllTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNativeInteropAllTypes = + 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 callFlutterEchoAsyncNativeInteropAllTypes(everything: com.example.test_plugin.NativeInteropAllTypes): com.example.test_plugin.NativeInteropAllTypes` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNativeInteropAllTypes( + NativeInteropAllTypes nativeInteropAllTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAllTypes = nativeInteropAllTypes.reference; + final $r = _callFlutterEchoAsyncNativeInteropAllTypes( + reference.pointer, + _id_callFlutterEchoAsyncNativeInteropAllTypes.pointer, + _$nativeInteropAllTypes.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(NativeInteropAllTypes.type, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableNativeInteropAllNullableTypes = + NativeInteropHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAsyncNullableNativeInteropAllNullableTypes', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableNativeInteropAllNullableTypes = + 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 callFlutterEchoAsyncNullableNativeInteropAllNullableTypes(everything: com.example.test_plugin.NativeInteropAllNullableTypes?): com.example.test_plugin.NativeInteropAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future + callFlutterEchoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAllNullableTypes = + nativeInteropAllNullableTypes?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableNativeInteropAllNullableTypes( + reference.pointer, + _id_callFlutterEchoAsyncNullableNativeInteropAllNullableTypes.pointer, + _$nativeInteropAllNullableTypes.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( + NativeInteropAllNullableTypes.type, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion = + NativeInteropHostIntegrationCoreApi._class.instanceMethodId( + r'callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion = + 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 callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion(everything: com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future + callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAllNullableTypesWithoutRecursion = + nativeInteropAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + reference.pointer, + _id_callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion.pointer, + _$nativeInteropAllNullableTypesWithoutRecursion.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( + NativeInteropAllNullableTypesWithoutRecursion.type, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncBool = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncInt = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncDouble = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncString = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncUint8List = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncInt32List = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncInt64List = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncFloat64List = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncObject = NativeInteropHostIntegrationCoreApi._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(const jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncList = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_callFlutterEchoAsyncEnumList = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_callFlutterEchoAsyncClassList = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_callFlutterEchoAsyncNonNullEnumList = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_callFlutterEchoAsyncNonNullClassList = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_callFlutterEchoAsyncMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_callFlutterEchoAsyncStringMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_callFlutterEchoAsyncIntMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_callFlutterEchoAsyncEnumMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_callFlutterEchoAsyncClassMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_callFlutterEchoAsyncEnum = NativeInteropHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoAsyncEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;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: com.example.test_plugin.NativeInteropAnEnum): com.example.test_plugin.NativeInteropAnEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncEnum( + NativeInteropAnEnum nativeInteropAnEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnEnum = nativeInteropAnEnum.reference; + final $r = _callFlutterEchoAsyncEnum( + reference.pointer, + _id_callFlutterEchoAsyncEnum.pointer, + _$nativeInteropAnEnum.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(NativeInteropAnEnum.type, releaseOriginal: true); + } + + static final _id_callFlutterEchoAnotherAsyncEnum = NativeInteropHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoAnotherAsyncEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;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: com.example.test_plugin.NativeInteropAnotherEnum): com.example.test_plugin.NativeInteropAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAnotherAsyncEnum( + NativeInteropAnotherEnum nativeInteropAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum.reference; + final $r = _callFlutterEchoAnotherAsyncEnum( + reference.pointer, + _id_callFlutterEchoAnotherAsyncEnum.pointer, + _$nativeInteropAnotherEnum.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(NativeInteropAnotherEnum.type, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableBool = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableInt = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableDouble = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableString = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableUint8List = NativeInteropHostIntegrationCoreApi + ._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableInt32List = NativeInteropHostIntegrationCoreApi + ._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableInt64List = NativeInteropHostIntegrationCoreApi + ._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableFloat64List = NativeInteropHostIntegrationCoreApi + ._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, releaseOriginal: true); + } + + static final _id_callFlutterThrowFlutterErrorAsync = NativeInteropHostIntegrationCoreApi._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(const jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableObject = NativeInteropHostIntegrationCoreApi._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(const jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableList = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_callFlutterEchoAsyncNullableEnumList = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_callFlutterEchoAsyncNullableClassList = NativeInteropHostIntegrationCoreApi + ._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_callFlutterEchoAsyncNullableNonNullEnumList = NativeInteropHostIntegrationCoreApi + ._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_callFlutterEchoAsyncNullableNonNullClassList = + NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_callFlutterEchoAsyncNullableMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_callFlutterEchoAsyncNullableStringMap = NativeInteropHostIntegrationCoreApi + ._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_callFlutterEchoAsyncNullableIntMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_callFlutterEchoAsyncNullableEnumMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_callFlutterEchoAsyncNullableClassMap = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_callFlutterEchoAsyncNullableEnum = NativeInteropHostIntegrationCoreApi._class + .instanceMethodId( + r'callFlutterEchoAsyncNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;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: com.example.test_plugin.NativeInteropAnEnum?): com.example.test_plugin.NativeInteropAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableEnum( + NativeInteropAnEnum? nativeInteropAnEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnEnum = nativeInteropAnEnum?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableEnum( + reference.pointer, + _id_callFlutterEchoAsyncNullableEnum.pointer, + _$nativeInteropAnEnum.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(NativeInteropAnEnum.type, releaseOriginal: true); + } + + static final _id_callFlutterEchoAnotherAsyncNullableEnum = NativeInteropHostIntegrationCoreApi + ._class + .instanceMethodId( + r'callFlutterEchoAnotherAsyncNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;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: com.example.test_plugin.NativeInteropAnotherEnum?): com.example.test_plugin.NativeInteropAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAnotherAsyncNullableEnum( + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAnotherAsyncNullableEnum( + reference.pointer, + _id_callFlutterEchoAnotherAsyncNullableEnum.pointer, + _$nativeInteropAnotherEnum.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(NativeInteropAnotherEnum.type, releaseOriginal: true); + } + + static final _id_defaultIsMainThread = NativeInteropHostIntegrationCoreApi._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$_.JMethodIDPtr)>(); + + /// from: `public fun defaultIsMainThread(): kotlin.Boolean` + core$_.bool defaultIsMainThread() { + return _defaultIsMainThread(reference.pointer, _id_defaultIsMainThread.pointer).boolean; + } + + static final _id_callFlutterNoopOnBackgroundThread = NativeInteropHostIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_testDeregisterHostApi = NativeInteropHostIntegrationCoreApi._class + .instanceMethodId(r'testDeregisterHostApi', r'()Z'); + + static final _testDeregisterHostApi = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallBooleanMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public fun testDeregisterHostApi(): kotlin.Boolean` + core$_.bool testDeregisterHostApi() { + return _testDeregisterHostApi(reference.pointer, _id_testDeregisterHostApi.pointer).boolean; + } + + static final _id_testDeregisterFlutterApi = NativeInteropHostIntegrationCoreApi._class + .instanceMethodId(r'testDeregisterFlutterApi', r'()Z'); + + static final _testDeregisterFlutterApi = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallBooleanMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public fun testDeregisterFlutterApi(): kotlin.Boolean` + core$_.bool testDeregisterFlutterApi() { + return _testDeregisterFlutterApi( + reference.pointer, + _id_testDeregisterFlutterApi.pointer, + ).boolean; + } + + static final _id_registerAndImmediatelyDeregisterHostApi = NativeInteropHostIntegrationCoreApi + ._class + .instanceMethodId(r'registerAndImmediatelyDeregisterHostApi', r'(Ljava/lang/String;)V'); + + static final _registerAndImmediatelyDeregisterHostApi = + 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 fun registerAndImmediatelyDeregisterHostApi(name: kotlin.String): kotlin.Unit` + void registerAndImmediatelyDeregisterHostApi(jni$_.JString string) { + final _$string = string.reference; + _registerAndImmediatelyDeregisterHostApi( + reference.pointer, + _id_registerAndImmediatelyDeregisterHostApi.pointer, + _$string.pointer, + ).check(); + } + + static final _id_testCallDeregisteredFlutterApi = NativeInteropHostIntegrationCoreApi._class + .instanceMethodId(r'testCallDeregisteredFlutterApi', r'(Ljava/lang/String;)Z'); + + static final _testCallDeregisteredFlutterApi = + 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 fun testCallDeregisteredFlutterApi(name: kotlin.String): kotlin.Boolean` + core$_.bool testCallDeregisteredFlutterApi(jni$_.JString string) { + final _$string = string.reference; + return _testCallDeregisteredFlutterApi( + reference.pointer, + _id_testCallDeregisteredFlutterApi.pointer, + _$string.pointer, + ).boolean; + } +} + +final class $NativeInteropHostIntegrationCoreApi$Type$ + extends jni$_.JType { + @jni$_.internal + const $NativeInteropHostIntegrationCoreApi$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Lcom/example/test_plugin/NativeInteropHostIntegrationCoreApi;'; +} + +/// from: `com.example.test_plugin.NativeInteropHostIntegrationCoreApiRegistrar` +extension type NativeInteropHostIntegrationCoreApiRegistrar._(jni$_.JObject _$this) + implements NativeInteropHostIntegrationCoreApi { + static final _class = jni$_.JClass.forName( + r'com/example/test_plugin/NativeInteropHostIntegrationCoreApiRegistrar', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NativeInteropHostIntegrationCoreApiRegistrar$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$_.JMethodIDPtr)>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory NativeInteropHostIntegrationCoreApiRegistrar() { + return _new$( + _class.reference.pointer, + _id_new$.pointer, + ).object(); + } +} + +extension NativeInteropHostIntegrationCoreApiRegistrar$$Methods + on NativeInteropHostIntegrationCoreApiRegistrar { + static final _id_get$api = NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'getApi', + r'()Lcom/example/test_plugin/NativeInteropHostIntegrationCoreApi;', + ); + + static final _get$api = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public final com.example.test_plugin.NativeInteropHostIntegrationCoreApi getApi()` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropHostIntegrationCoreApi? get api { + return _get$api( + reference.pointer, + _id_get$api.pointer, + ).object(); + } + + static final _id_set$api = NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'setApi', + r'(Lcom/example/test_plugin/NativeInteropHostIntegrationCoreApi;)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(com.example.test_plugin.NativeInteropHostIntegrationCoreApi nativeInteropHostIntegrationCoreApi)` + set api(NativeInteropHostIntegrationCoreApi? nativeInteropHostIntegrationCoreApi) { + final _$nativeInteropHostIntegrationCoreApi = + nativeInteropHostIntegrationCoreApi?.reference ?? jni$_.jNullReference; + _set$api( + reference.pointer, + _id_set$api.pointer, + _$nativeInteropHostIntegrationCoreApi.pointer, + ).check(); + } + + static final _id_register = NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'register', + r'(Lcom/example/test_plugin/NativeInteropHostIntegrationCoreApi;Ljava/lang/String;)Lcom/example/test_plugin/NativeInteropHostIntegrationCoreApiRegistrar;', + ); + + 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: com.example.test_plugin.NativeInteropHostIntegrationCoreApi?, name: kotlin.String): com.example.test_plugin.NativeInteropHostIntegrationCoreApiRegistrar` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropHostIntegrationCoreApiRegistrar register( + NativeInteropHostIntegrationCoreApi? nativeInteropHostIntegrationCoreApi, + jni$_.JString string, + ) { + final _$nativeInteropHostIntegrationCoreApi = + nativeInteropHostIntegrationCoreApi?.reference ?? jni$_.jNullReference; + final _$string = string.reference; + return _register( + reference.pointer, + _id_register.pointer, + _$nativeInteropHostIntegrationCoreApi.pointer, + _$string.pointer, + ).object(); + } + + static final _id_getInstance = NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'getInstance', + r'(Ljava/lang/String;)Lcom/example/test_plugin/NativeInteropHostIntegrationCoreApiRegistrar;', + ); + + 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): com.example.test_plugin.NativeInteropHostIntegrationCoreApiRegistrar?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropHostIntegrationCoreApiRegistrar? getInstance(jni$_.JString string) { + final _$string = string.reference; + return _getInstance( + reference.pointer, + _id_getInstance.pointer, + _$string.pointer, + ).object(); + } + + static final _id_noop = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoAllTypes', + r'(Lcom/example/test_plugin/NativeInteropAllTypes;)Lcom/example/test_plugin/NativeInteropAllTypes;', + ); + + 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: com.example.test_plugin.NativeInteropAllTypes): com.example.test_plugin.NativeInteropAllTypes` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllTypes echoAllTypes(NativeInteropAllTypes nativeInteropAllTypes) { + final _$nativeInteropAllTypes = nativeInteropAllTypes.reference; + return _echoAllTypes( + reference.pointer, + _id_echoAllTypes.pointer, + _$nativeInteropAllTypes.pointer, + ).object(); + } + + static final _id_throwError = NativeInteropHostIntegrationCoreApiRegistrar._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$_.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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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$_.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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoClassWrapper', + r'(Lcom/example/test_plugin/NativeInteropAllClassesWrapper;)Lcom/example/test_plugin/NativeInteropAllClassesWrapper;', + ); + + 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: com.example.test_plugin.NativeInteropAllClassesWrapper): com.example.test_plugin.NativeInteropAllClassesWrapper` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllClassesWrapper echoClassWrapper( + NativeInteropAllClassesWrapper nativeInteropAllClassesWrapper, + ) { + final _$nativeInteropAllClassesWrapper = nativeInteropAllClassesWrapper.reference; + return _echoClassWrapper( + reference.pointer, + _id_echoClassWrapper.pointer, + _$nativeInteropAllClassesWrapper.pointer, + ).object(); + } + + static final _id_echoEnum = NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;)Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + 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: com.example.test_plugin.NativeInteropAnEnum): com.example.test_plugin.NativeInteropAnEnum` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnEnum echoEnum(NativeInteropAnEnum nativeInteropAnEnum) { + final _$nativeInteropAnEnum = nativeInteropAnEnum.reference; + return _echoEnum( + reference.pointer, + _id_echoEnum.pointer, + _$nativeInteropAnEnum.pointer, + ).object(); + } + + static final _id_echoAnotherEnum = NativeInteropHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAnotherEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;)Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + 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: com.example.test_plugin.NativeInteropAnotherEnum): com.example.test_plugin.NativeInteropAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnotherEnum echoAnotherEnum(NativeInteropAnotherEnum nativeInteropAnotherEnum) { + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum.reference; + return _echoAnotherEnum( + reference.pointer, + _id_echoAnotherEnum.pointer, + _$nativeInteropAnotherEnum.pointer, + ).object(); + } + + static final _id_echoNamedDefaultString = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAllNullableTypes', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypes;)Lcom/example/test_plugin/NativeInteropAllNullableTypes;', + ); + + 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: com.example.test_plugin.NativeInteropAllNullableTypes?): com.example.test_plugin.NativeInteropAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypes? echoAllNullableTypes( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) { + final _$nativeInteropAllNullableTypes = + nativeInteropAllNullableTypes?.reference ?? jni$_.jNullReference; + return _echoAllNullableTypes( + reference.pointer, + _id_echoAllNullableTypes.pointer, + _$nativeInteropAllNullableTypes.pointer, + ).object(); + } + + static final _id_echoAllNullableTypesWithoutRecursion = + NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoAllNullableTypesWithoutRecursion', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;)Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;', + ); + + 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: com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypesWithoutRecursion? echoAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) { + final _$nativeInteropAllNullableTypesWithoutRecursion = + nativeInteropAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + return _echoAllNullableTypesWithoutRecursion( + reference.pointer, + _id_echoAllNullableTypesWithoutRecursion.pointer, + _$nativeInteropAllNullableTypesWithoutRecursion.pointer, + ).object(); + } + + static final _id_extractNestedNullableString = NativeInteropHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'extractNestedNullableString', + r'(Lcom/example/test_plugin/NativeInteropAllClassesWrapper;)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: com.example.test_plugin.NativeInteropAllClassesWrapper): kotlin.String?` + /// The returned object must be released after use, by calling the [release] method. + jni$_.JString? extractNestedNullableString( + NativeInteropAllClassesWrapper nativeInteropAllClassesWrapper, + ) { + final _$nativeInteropAllClassesWrapper = nativeInteropAllClassesWrapper.reference; + return _extractNestedNullableString( + reference.pointer, + _id_extractNestedNullableString.pointer, + _$nativeInteropAllClassesWrapper.pointer, + ).object(); + } + + static final _id_createNestedNullableString = NativeInteropHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'createNestedNullableString', + r'(Ljava/lang/String;)Lcom/example/test_plugin/NativeInteropAllClassesWrapper;', + ); + + 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?): com.example.test_plugin.NativeInteropAllClassesWrapper` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllClassesWrapper createNestedNullableString(jni$_.JString? string) { + final _$string = string?.reference ?? jni$_.jNullReference; + return _createNestedNullableString( + reference.pointer, + _id_createNestedNullableString.pointer, + _$string.pointer, + ).object(); + } + + static final _id_sendMultipleNullableTypes = NativeInteropHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'sendMultipleNullableTypes', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)Lcom/example/test_plugin/NativeInteropAllNullableTypes;', + ); + + 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?): com.example.test_plugin.NativeInteropAllNullableTypes` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypes 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 = + NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'sendMultipleNullableTypesWithoutRecursion', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;', + ); + + 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?): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypesWithoutRecursion 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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;)Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + 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: com.example.test_plugin.NativeInteropAnEnum?): com.example.test_plugin.NativeInteropAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnEnum? echoNullableEnum(NativeInteropAnEnum? nativeInteropAnEnum) { + final _$nativeInteropAnEnum = nativeInteropAnEnum?.reference ?? jni$_.jNullReference; + return _echoNullableEnum( + reference.pointer, + _id_echoNullableEnum.pointer, + _$nativeInteropAnEnum.pointer, + ).object(); + } + + static final _id_echoAnotherNullableEnum = NativeInteropHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAnotherNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;)Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + 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: com.example.test_plugin.NativeInteropAnotherEnum?): com.example.test_plugin.NativeInteropAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnotherEnum? echoAnotherNullableEnum( + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + ) { + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum?.reference ?? jni$_.jNullReference; + return _echoAnotherNullableEnum( + reference.pointer, + _id_echoAnotherNullableEnum.pointer, + _$nativeInteropAnotherEnum.pointer, + ).object(); + } + + static final _id_echoOptionalNullableInt = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_echoAsyncDouble = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_echoAsyncBool = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_echoAsyncString = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_echoAsyncUint8List = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_echoAsyncInt32List = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_echoAsyncInt64List = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_echoAsyncFloat64List = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_echoAsyncObject = NativeInteropHostIntegrationCoreApiRegistrar._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(const jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncList = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_echoAsyncEnumList = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_echoAsyncClassList = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_echoAsyncMap = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_echoAsyncStringMap = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_echoAsyncIntMap = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_echoAsyncEnumMap = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_echoAsyncClassMap = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_echoAsyncEnum = NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoAsyncEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;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: com.example.test_plugin.NativeInteropAnEnum): com.example.test_plugin.NativeInteropAnEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncEnum(NativeInteropAnEnum nativeInteropAnEnum) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnEnum = nativeInteropAnEnum.reference; + final $r = _echoAsyncEnum( + reference.pointer, + _id_echoAsyncEnum.pointer, + _$nativeInteropAnEnum.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(NativeInteropAnEnum.type, releaseOriginal: true); + } + + static final _id_echoAnotherAsyncEnum = NativeInteropHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAnotherAsyncEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;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: com.example.test_plugin.NativeInteropAnotherEnum): com.example.test_plugin.NativeInteropAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAnotherAsyncEnum( + NativeInteropAnotherEnum nativeInteropAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum.reference; + final $r = _echoAnotherAsyncEnum( + reference.pointer, + _id_echoAnotherAsyncEnum.pointer, + _$nativeInteropAnotherEnum.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(NativeInteropAnotherEnum.type, releaseOriginal: true); + } + + static final _id_throwAsyncError = NativeInteropHostIntegrationCoreApiRegistrar._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(const jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_throwAsyncErrorFromVoid = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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(const jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncNativeInteropAllTypes = NativeInteropHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAsyncNativeInteropAllTypes', + r'(Lcom/example/test_plugin/NativeInteropAllTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNativeInteropAllTypes = + 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 echoAsyncNativeInteropAllTypes(everything: com.example.test_plugin.NativeInteropAllTypes): com.example.test_plugin.NativeInteropAllTypes` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNativeInteropAllTypes( + NativeInteropAllTypes nativeInteropAllTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAllTypes = nativeInteropAllTypes.reference; + final $r = _echoAsyncNativeInteropAllTypes( + reference.pointer, + _id_echoAsyncNativeInteropAllTypes.pointer, + _$nativeInteropAllTypes.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(NativeInteropAllTypes.type, releaseOriginal: true); + } + + static final _id_echoAsyncNullableNativeInteropAllNullableTypes = + NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoAsyncNullableNativeInteropAllNullableTypes', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableNativeInteropAllNullableTypes = + 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 echoAsyncNullableNativeInteropAllNullableTypes(everything: com.example.test_plugin.NativeInteropAllNullableTypes?): com.example.test_plugin.NativeInteropAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAllNullableTypes = + nativeInteropAllNullableTypes?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableNativeInteropAllNullableTypes( + reference.pointer, + _id_echoAsyncNullableNativeInteropAllNullableTypes.pointer, + _$nativeInteropAllNullableTypes.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( + NativeInteropAllNullableTypes.type, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion = + NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion = + 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 echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion(everything: com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAllNullableTypesWithoutRecursion = + nativeInteropAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + reference.pointer, + _id_echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion.pointer, + _$nativeInteropAllNullableTypesWithoutRecursion.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( + NativeInteropAllNullableTypesWithoutRecursion.type, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableInt = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableDouble = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableBool = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableString = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableUint8List = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableInt32List = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableInt64List = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableFloat64List = NativeInteropHostIntegrationCoreApiRegistrar + ._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableObject = NativeInteropHostIntegrationCoreApiRegistrar._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(const jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncNullableList = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_echoAsyncNullableEnumList = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_echoAsyncNullableClassList = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_echoAsyncNullableMap = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_echoAsyncNullableStringMap = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_echoAsyncNullableIntMap = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_echoAsyncNullableEnumMap = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_echoAsyncNullableClassMap = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_echoAsyncNullableEnum = NativeInteropHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'echoAsyncNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;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: com.example.test_plugin.NativeInteropAnEnum?): com.example.test_plugin.NativeInteropAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableEnum( + NativeInteropAnEnum? nativeInteropAnEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnEnum = nativeInteropAnEnum?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnum( + reference.pointer, + _id_echoAsyncNullableEnum.pointer, + _$nativeInteropAnEnum.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(NativeInteropAnEnum.type, releaseOriginal: true); + } + + static final _id_echoAnotherAsyncNullableEnum = NativeInteropHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'echoAnotherAsyncNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;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: com.example.test_plugin.NativeInteropAnotherEnum?): com.example.test_plugin.NativeInteropAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAnotherAsyncNullableEnum( + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum?.reference ?? jni$_.jNullReference; + final $r = _echoAnotherAsyncNullableEnum( + reference.pointer, + _id_echoAnotherAsyncNullableEnum.pointer, + _$nativeInteropAnotherEnum.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(NativeInteropAnotherEnum.type, releaseOriginal: true); + } + + static final _id_callFlutterNoop = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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$_.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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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_callFlutterEchoNativeInteropAllTypes = + NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNativeInteropAllTypes', + r'(Lcom/example/test_plugin/NativeInteropAllTypes;)Lcom/example/test_plugin/NativeInteropAllTypes;', + ); + + static final _callFlutterEchoNativeInteropAllTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNativeInteropAllTypes(everything: com.example.test_plugin.NativeInteropAllTypes): com.example.test_plugin.NativeInteropAllTypes` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllTypes callFlutterEchoNativeInteropAllTypes( + NativeInteropAllTypes nativeInteropAllTypes, + ) { + final _$nativeInteropAllTypes = nativeInteropAllTypes.reference; + return _callFlutterEchoNativeInteropAllTypes( + reference.pointer, + _id_callFlutterEchoNativeInteropAllTypes.pointer, + _$nativeInteropAllTypes.pointer, + ).object(); + } + + static final _id_callFlutterEchoNativeInteropAllNullableTypes = + NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNativeInteropAllNullableTypes', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypes;)Lcom/example/test_plugin/NativeInteropAllNullableTypes;', + ); + + static final _callFlutterEchoNativeInteropAllNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNativeInteropAllNullableTypes(everything: com.example.test_plugin.NativeInteropAllNullableTypes?): com.example.test_plugin.NativeInteropAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypes? callFlutterEchoNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) { + final _$nativeInteropAllNullableTypes = + nativeInteropAllNullableTypes?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNativeInteropAllNullableTypes( + reference.pointer, + _id_callFlutterEchoNativeInteropAllNullableTypes.pointer, + _$nativeInteropAllNullableTypes.pointer, + ).object(); + } + + static final _id_callFlutterSendMultipleNullableTypes = + NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterSendMultipleNullableTypes', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)Lcom/example/test_plugin/NativeInteropAllNullableTypes;', + ); + + 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?): com.example.test_plugin.NativeInteropAllNullableTypes` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypes 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_callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion = + NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;)Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;', + ); + + static final _callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion(everything: com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypesWithoutRecursion? + callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) { + final _$nativeInteropAllNullableTypesWithoutRecursion = + nativeInteropAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion( + reference.pointer, + _id_callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion.pointer, + _$nativeInteropAllNullableTypesWithoutRecursion.pointer, + ).object(); + } + + static final _id_callFlutterSendMultipleNullableTypesWithoutRecursion = + NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterSendMultipleNullableTypesWithoutRecursion', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;', + ); + + 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?): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypesWithoutRecursion + 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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'callFlutterEchoEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;)Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + 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: com.example.test_plugin.NativeInteropAnEnum): com.example.test_plugin.NativeInteropAnEnum` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnEnum callFlutterEchoEnum(NativeInteropAnEnum nativeInteropAnEnum) { + final _$nativeInteropAnEnum = nativeInteropAnEnum.reference; + return _callFlutterEchoEnum( + reference.pointer, + _id_callFlutterEchoEnum.pointer, + _$nativeInteropAnEnum.pointer, + ).object(); + } + + static final _id_callFlutterEchoNativeInteropAnotherEnum = + NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoNativeInteropAnotherEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;)Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + static final _callFlutterEchoNativeInteropAnotherEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun callFlutterEchoNativeInteropAnotherEnum(anotherEnum: com.example.test_plugin.NativeInteropAnotherEnum): com.example.test_plugin.NativeInteropAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnotherEnum callFlutterEchoNativeInteropAnotherEnum( + NativeInteropAnotherEnum nativeInteropAnotherEnum, + ) { + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum.reference; + return _callFlutterEchoNativeInteropAnotherEnum( + reference.pointer, + _id_callFlutterEchoNativeInteropAnotherEnum.pointer, + _$nativeInteropAnotherEnum.pointer, + ).object(); + } + + static final _id_callFlutterEchoNullableBool = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = + NativeInteropHostIntegrationCoreApiRegistrar._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 = + NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = NativeInteropHostIntegrationCoreApiRegistrar + ._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 = + NativeInteropHostIntegrationCoreApiRegistrar._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 = + NativeInteropHostIntegrationCoreApiRegistrar._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 = + NativeInteropHostIntegrationCoreApiRegistrar._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 = + NativeInteropHostIntegrationCoreApiRegistrar._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 = NativeInteropHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'callFlutterEchoNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;)Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + 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: com.example.test_plugin.NativeInteropAnEnum?): com.example.test_plugin.NativeInteropAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnEnum? callFlutterEchoNullableEnum(NativeInteropAnEnum? nativeInteropAnEnum) { + final _$nativeInteropAnEnum = nativeInteropAnEnum?.reference ?? jni$_.jNullReference; + return _callFlutterEchoNullableEnum( + reference.pointer, + _id_callFlutterEchoNullableEnum.pointer, + _$nativeInteropAnEnum.pointer, + ).object(); + } + + static final _id_callFlutterEchoAnotherNullableEnum = NativeInteropHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterEchoAnotherNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;)Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + 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: com.example.test_plugin.NativeInteropAnotherEnum?): com.example.test_plugin.NativeInteropAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnotherEnum? callFlutterEchoAnotherNullableEnum( + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + ) { + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum?.reference ?? jni$_.jNullReference; + return _callFlutterEchoAnotherNullableEnum( + reference.pointer, + _id_callFlutterEchoAnotherNullableEnum.pointer, + _$nativeInteropAnotherEnum.pointer, + ).object(); + } + + static final _id_callFlutterNoopAsync = NativeInteropHostIntegrationCoreApiRegistrar._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_callFlutterEchoAsyncNativeInteropAllTypes = + NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNativeInteropAllTypes', + r'(Lcom/example/test_plugin/NativeInteropAllTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNativeInteropAllTypes = + 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 callFlutterEchoAsyncNativeInteropAllTypes(everything: com.example.test_plugin.NativeInteropAllTypes): com.example.test_plugin.NativeInteropAllTypes` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNativeInteropAllTypes( + NativeInteropAllTypes nativeInteropAllTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAllTypes = nativeInteropAllTypes.reference; + final $r = _callFlutterEchoAsyncNativeInteropAllTypes( + reference.pointer, + _id_callFlutterEchoAsyncNativeInteropAllTypes.pointer, + _$nativeInteropAllTypes.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(NativeInteropAllTypes.type, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableNativeInteropAllNullableTypes = + NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableNativeInteropAllNullableTypes', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableNativeInteropAllNullableTypes = + 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 callFlutterEchoAsyncNullableNativeInteropAllNullableTypes(everything: com.example.test_plugin.NativeInteropAllNullableTypes?): com.example.test_plugin.NativeInteropAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future + callFlutterEchoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAllNullableTypes = + nativeInteropAllNullableTypes?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableNativeInteropAllNullableTypes( + reference.pointer, + _id_callFlutterEchoAsyncNullableNativeInteropAllNullableTypes.pointer, + _$nativeInteropAllNullableTypes.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( + NativeInteropAllNullableTypes.type, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion = + NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion = + 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 callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion(everything: com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future + callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAllNullableTypesWithoutRecursion = + nativeInteropAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + reference.pointer, + _id_callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion.pointer, + _$nativeInteropAllNullableTypesWithoutRecursion.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( + NativeInteropAllNullableTypesWithoutRecursion.type, + releaseOriginal: true, + ); + } + + static final _id_callFlutterEchoAsyncBool = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncInt = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncDouble = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncString = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncUint8List = NativeInteropHostIntegrationCoreApiRegistrar + ._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncInt32List = NativeInteropHostIntegrationCoreApiRegistrar + ._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncInt64List = NativeInteropHostIntegrationCoreApiRegistrar + ._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncFloat64List = NativeInteropHostIntegrationCoreApiRegistrar + ._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncObject = NativeInteropHostIntegrationCoreApiRegistrar._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(const jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncList = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_callFlutterEchoAsyncEnumList = NativeInteropHostIntegrationCoreApiRegistrar + ._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_callFlutterEchoAsyncClassList = NativeInteropHostIntegrationCoreApiRegistrar + ._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_callFlutterEchoAsyncNonNullEnumList = + NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_callFlutterEchoAsyncNonNullClassList = + NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_callFlutterEchoAsyncMap = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_callFlutterEchoAsyncStringMap = NativeInteropHostIntegrationCoreApiRegistrar + ._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_callFlutterEchoAsyncIntMap = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_callFlutterEchoAsyncEnumMap = NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_callFlutterEchoAsyncClassMap = NativeInteropHostIntegrationCoreApiRegistrar + ._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_callFlutterEchoAsyncEnum = NativeInteropHostIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'callFlutterEchoAsyncEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;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: com.example.test_plugin.NativeInteropAnEnum): com.example.test_plugin.NativeInteropAnEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncEnum( + NativeInteropAnEnum nativeInteropAnEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnEnum = nativeInteropAnEnum.reference; + final $r = _callFlutterEchoAsyncEnum( + reference.pointer, + _id_callFlutterEchoAsyncEnum.pointer, + _$nativeInteropAnEnum.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(NativeInteropAnEnum.type, releaseOriginal: true); + } + + static final _id_callFlutterEchoAnotherAsyncEnum = NativeInteropHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterEchoAnotherAsyncEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;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: com.example.test_plugin.NativeInteropAnotherEnum): com.example.test_plugin.NativeInteropAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAnotherAsyncEnum( + NativeInteropAnotherEnum nativeInteropAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum.reference; + final $r = _callFlutterEchoAnotherAsyncEnum( + reference.pointer, + _id_callFlutterEchoAnotherAsyncEnum.pointer, + _$nativeInteropAnotherEnum.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(NativeInteropAnotherEnum.type, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableBool = NativeInteropHostIntegrationCoreApiRegistrar + ._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableInt = NativeInteropHostIntegrationCoreApiRegistrar + ._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableDouble = NativeInteropHostIntegrationCoreApiRegistrar + ._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableString = NativeInteropHostIntegrationCoreApiRegistrar + ._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableUint8List = + NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableInt32List = + NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableInt64List = + NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableFloat64List = + NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true); + } + + static final _id_callFlutterThrowFlutterErrorAsync = NativeInteropHostIntegrationCoreApiRegistrar + ._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(const jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableObject = NativeInteropHostIntegrationCoreApiRegistrar + ._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(const jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_callFlutterEchoAsyncNullableList = NativeInteropHostIntegrationCoreApiRegistrar + ._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_callFlutterEchoAsyncNullableEnumList = + NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_callFlutterEchoAsyncNullableClassList = + NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_callFlutterEchoAsyncNullableNonNullEnumList = + NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_callFlutterEchoAsyncNullableNonNullClassList = + NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_callFlutterEchoAsyncNullableMap = NativeInteropHostIntegrationCoreApiRegistrar + ._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_callFlutterEchoAsyncNullableStringMap = + NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_callFlutterEchoAsyncNullableIntMap = NativeInteropHostIntegrationCoreApiRegistrar + ._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_callFlutterEchoAsyncNullableEnumMap = + NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_callFlutterEchoAsyncNullableClassMap = + NativeInteropHostIntegrationCoreApiRegistrar._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_callFlutterEchoAsyncNullableEnum = NativeInteropHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId( + r'callFlutterEchoAsyncNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;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: com.example.test_plugin.NativeInteropAnEnum?): com.example.test_plugin.NativeInteropAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAsyncNullableEnum( + NativeInteropAnEnum? nativeInteropAnEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnEnum = nativeInteropAnEnum?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAsyncNullableEnum( + reference.pointer, + _id_callFlutterEchoAsyncNullableEnum.pointer, + _$nativeInteropAnEnum.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(NativeInteropAnEnum.type, releaseOriginal: true); + } + + static final _id_callFlutterEchoAnotherAsyncNullableEnum = + NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'callFlutterEchoAnotherAsyncNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;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: com.example.test_plugin.NativeInteropAnotherEnum?): com.example.test_plugin.NativeInteropAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future callFlutterEchoAnotherAsyncNullableEnum( + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum?.reference ?? jni$_.jNullReference; + final $r = _callFlutterEchoAnotherAsyncNullableEnum( + reference.pointer, + _id_callFlutterEchoAnotherAsyncNullableEnum.pointer, + _$nativeInteropAnotherEnum.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(NativeInteropAnotherEnum.type, releaseOriginal: true); + } + + static final _id_defaultIsMainThread = NativeInteropHostIntegrationCoreApiRegistrar._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$_.JMethodIDPtr)>(); + + /// from: `public fun defaultIsMainThread(): kotlin.Boolean` + core$_.bool defaultIsMainThread() { + return _defaultIsMainThread(reference.pointer, _id_defaultIsMainThread.pointer).boolean; + } + + static final _id_callFlutterNoopOnBackgroundThread = NativeInteropHostIntegrationCoreApiRegistrar + ._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, releaseOriginal: true); + } + + static final _id_testDeregisterHostApi = NativeInteropHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'testDeregisterHostApi', r'()Z'); + + static final _testDeregisterHostApi = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallBooleanMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public fun testDeregisterHostApi(): kotlin.Boolean` + core$_.bool testDeregisterHostApi() { + return _testDeregisterHostApi(reference.pointer, _id_testDeregisterHostApi.pointer).boolean; + } + + static final _id_testDeregisterFlutterApi = NativeInteropHostIntegrationCoreApiRegistrar._class + .instanceMethodId(r'testDeregisterFlutterApi', r'()Z'); + + static final _testDeregisterFlutterApi = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallBooleanMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public fun testDeregisterFlutterApi(): kotlin.Boolean` + core$_.bool testDeregisterFlutterApi() { + return _testDeregisterFlutterApi( + reference.pointer, + _id_testDeregisterFlutterApi.pointer, + ).boolean; + } + + static final _id_registerAndImmediatelyDeregisterHostApi = + NativeInteropHostIntegrationCoreApiRegistrar._class.instanceMethodId( + r'registerAndImmediatelyDeregisterHostApi', + r'(Ljava/lang/String;)V', + ); + + static final _registerAndImmediatelyDeregisterHostApi = + 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 fun registerAndImmediatelyDeregisterHostApi(name: kotlin.String): kotlin.Unit` + void registerAndImmediatelyDeregisterHostApi(jni$_.JString string) { + final _$string = string.reference; + _registerAndImmediatelyDeregisterHostApi( + reference.pointer, + _id_registerAndImmediatelyDeregisterHostApi.pointer, + _$string.pointer, + ).check(); + } + + static final _id_testCallDeregisteredFlutterApi = NativeInteropHostIntegrationCoreApiRegistrar + ._class + .instanceMethodId(r'testCallDeregisteredFlutterApi', r'(Ljava/lang/String;)Z'); + + static final _testCallDeregisteredFlutterApi = + 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 fun testCallDeregisteredFlutterApi(name: kotlin.String): kotlin.Boolean` + core$_.bool testCallDeregisteredFlutterApi(jni$_.JString string) { + final _$string = string.reference; + return _testCallDeregisteredFlutterApi( + reference.pointer, + _id_testCallDeregisteredFlutterApi.pointer, + _$string.pointer, + ).boolean; + } +} + +final class $NativeInteropHostIntegrationCoreApiRegistrar$Type$ + extends jni$_.JType { + @jni$_.internal + const $NativeInteropHostIntegrationCoreApiRegistrar$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Lcom/example/test_plugin/NativeInteropHostIntegrationCoreApiRegistrar;'; +} + +/// from: `com.example.test_plugin.NativeInteropFlutterIntegrationCoreApi` +extension type NativeInteropFlutterIntegrationCoreApi._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName( + r'com/example/test_plugin/NativeInteropFlutterIntegrationCoreApi', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NativeInteropFlutterIntegrationCoreApi$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 + > + _$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'echoNativeInteropAllTypes(Lcom/example/test_plugin/NativeInteropAllTypes;)Lcom/example/test_plugin/NativeInteropAllTypes;') { + final $r = _$impls[$p]!.echoNativeInteropAllTypes(($a![0] as NativeInteropAllTypes)); + return ($r as jni$_.JObject?)?.as(const jni$_.$JObject$Type$()).reference.toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoNativeInteropAllNullableTypes(Lcom/example/test_plugin/NativeInteropAllNullableTypes;)Lcom/example/test_plugin/NativeInteropAllNullableTypes;') { + final $r = _$impls[$p]!.echoNativeInteropAllNullableTypes( + ($a![0] as NativeInteropAllNullableTypes?), + ); + 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;)Lcom/example/test_plugin/NativeInteropAllNullableTypes;') { + 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'echoNativeInteropAllNullableTypesWithoutRecursion(Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;)Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;') { + final $r = _$impls[$p]!.echoNativeInteropAllNullableTypesWithoutRecursion( + ($a![0] as NativeInteropAllNullableTypesWithoutRecursion?), + ); + 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;)Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;') { + 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(Lcom/example/test_plugin/NativeInteropAnEnum;)Lcom/example/test_plugin/NativeInteropAnEnum;') { + final $r = _$impls[$p]!.echoEnum(($a![0] as NativeInteropAnEnum)); + return ($r as jni$_.JObject?)?.as(const jni$_.$JObject$Type$()).reference.toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoNativeInteropAnotherEnum(Lcom/example/test_plugin/NativeInteropAnotherEnum;)Lcom/example/test_plugin/NativeInteropAnotherEnum;') { + final $r = _$impls[$p]!.echoNativeInteropAnotherEnum(($a![0] as NativeInteropAnotherEnum)); + 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(Lcom/example/test_plugin/NativeInteropAnEnum;)Lcom/example/test_plugin/NativeInteropAnEnum;') { + final $r = _$impls[$p]!.echoNullableEnum(($a![0] as NativeInteropAnEnum?)); + return ($r as jni$_.JObject?)?.as(const jni$_.$JObject$Type$()).reference.toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAnotherNullableEnum(Lcom/example/test_plugin/NativeInteropAnotherEnum;)Lcom/example/test_plugin/NativeInteropAnotherEnum;') { + final $r = _$impls[$p]!.echoAnotherNullableEnum(($a![0] as NativeInteropAnotherEnum?)); + 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'echoAsyncNativeInteropAllTypes(Lcom/example/test_plugin/NativeInteropAllTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = jni$_.KotlinContinuation.fromReference(($a![1] as jni$_.JObject).reference) + .resumeWithFuture( + _$impls[$p]!.echoAsyncNativeInteropAllTypes(($a![0] as NativeInteropAllTypes)), + ); + return ($r as jni$_.JObject?)?.as(const jni$_.$JObject$Type$()).reference.toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableNativeInteropAllNullableTypes(Lcom/example/test_plugin/NativeInteropAllNullableTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = jni$_.KotlinContinuation.fromReference(($a![1] as jni$_.JObject).reference) + .resumeWithFuture( + _$impls[$p]!.echoAsyncNullableNativeInteropAllNullableTypes( + ($a![0] as NativeInteropAllNullableTypes?), + ), + ); + return ($r as jni$_.JObject?)?.as(const jni$_.$JObject$Type$()).reference.toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion(Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = jni$_.KotlinContinuation.fromReference(($a![1] as jni$_.JObject).reference) + .resumeWithFuture( + _$impls[$p]!.echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + ($a![0] as NativeInteropAllNullableTypesWithoutRecursion?), + ), + ); + 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(Lcom/example/test_plugin/NativeInteropAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture(_$impls[$p]!.echoAsyncEnum(($a![0] as NativeInteropAnEnum))); + return ($r as jni$_.JObject?)?.as(const jni$_.$JObject$Type$()).reference.toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAnotherAsyncEnum(Lcom/example/test_plugin/NativeInteropAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture(_$impls[$p]!.echoAnotherAsyncEnum(($a![0] as NativeInteropAnotherEnum))); + 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(Lcom/example/test_plugin/NativeInteropAnEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = jni$_.KotlinContinuation.fromReference( + ($a![1] as jni$_.JObject).reference, + ).resumeWithFuture(_$impls[$p]!.echoAsyncNullableEnum(($a![0] as NativeInteropAnEnum?))); + return ($r as jni$_.JObject?)?.as(const jni$_.$JObject$Type$()).reference.toPointer() ?? + jni$_.nullptr; + } + if ($d == + r'echoAnotherAsyncNullableEnum(Lcom/example/test_plugin/NativeInteropAnotherEnum;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;') { + final $r = jni$_.KotlinContinuation.fromReference(($a![1] as jni$_.JObject).reference) + .resumeWithFuture( + _$impls[$p]!.echoAnotherAsyncNullableEnum(($a![0] as NativeInteropAnotherEnum?)), + ); + 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, + $NativeInteropFlutterIntegrationCoreApi $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'com.example.test_plugin.NativeInteropFlutterIntegrationCoreApi', + $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 NativeInteropFlutterIntegrationCoreApi.implement( + $NativeInteropFlutterIntegrationCoreApi $impl, + ) { + final $i = jni$_.JImplementer(); + implementIn($i, $impl); + return $i.implement(); + } +} + +extension NativeInteropFlutterIntegrationCoreApi$$Methods + on NativeInteropFlutterIntegrationCoreApi { + static final _id_noop = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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$_.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 = NativeInteropFlutterIntegrationCoreApi._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$_.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 = NativeInteropFlutterIntegrationCoreApi._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_echoNativeInteropAllTypes = NativeInteropFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNativeInteropAllTypes', + r'(Lcom/example/test_plugin/NativeInteropAllTypes;)Lcom/example/test_plugin/NativeInteropAllTypes;', + ); + + static final _echoNativeInteropAllTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNativeInteropAllTypes(everything: com.example.test_plugin.NativeInteropAllTypes): com.example.test_plugin.NativeInteropAllTypes` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllTypes echoNativeInteropAllTypes(NativeInteropAllTypes nativeInteropAllTypes) { + final _$nativeInteropAllTypes = nativeInteropAllTypes.reference; + return _echoNativeInteropAllTypes( + reference.pointer, + _id_echoNativeInteropAllTypes.pointer, + _$nativeInteropAllTypes.pointer, + ).object(); + } + + static final _id_echoNativeInteropAllNullableTypes = NativeInteropFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNativeInteropAllNullableTypes', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypes;)Lcom/example/test_plugin/NativeInteropAllNullableTypes;', + ); + + static final _echoNativeInteropAllNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNativeInteropAllNullableTypes(everything: com.example.test_plugin.NativeInteropAllNullableTypes?): com.example.test_plugin.NativeInteropAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypes? echoNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) { + final _$nativeInteropAllNullableTypes = + nativeInteropAllNullableTypes?.reference ?? jni$_.jNullReference; + return _echoNativeInteropAllNullableTypes( + reference.pointer, + _id_echoNativeInteropAllNullableTypes.pointer, + _$nativeInteropAllNullableTypes.pointer, + ).object(); + } + + static final _id_sendMultipleNullableTypes = NativeInteropFlutterIntegrationCoreApi._class + .instanceMethodId( + r'sendMultipleNullableTypes', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)Lcom/example/test_plugin/NativeInteropAllNullableTypes;', + ); + + 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?): com.example.test_plugin.NativeInteropAllNullableTypes` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypes 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_echoNativeInteropAllNullableTypesWithoutRecursion = + NativeInteropFlutterIntegrationCoreApi._class.instanceMethodId( + r'echoNativeInteropAllNullableTypesWithoutRecursion', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;)Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;', + ); + + static final _echoNativeInteropAllNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNativeInteropAllNullableTypesWithoutRecursion(everything: com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypesWithoutRecursion? echoNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) { + final _$nativeInteropAllNullableTypesWithoutRecursion = + nativeInteropAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + return _echoNativeInteropAllNullableTypesWithoutRecursion( + reference.pointer, + _id_echoNativeInteropAllNullableTypesWithoutRecursion.pointer, + _$nativeInteropAllNullableTypesWithoutRecursion.pointer, + ).object(); + } + + static final _id_sendMultipleNullableTypesWithoutRecursion = + NativeInteropFlutterIntegrationCoreApi._class.instanceMethodId( + r'sendMultipleNullableTypesWithoutRecursion', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/String;)Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;', + ); + + 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?): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypesWithoutRecursion 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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._class.instanceMethodId( + r'echoEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;)Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + 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: com.example.test_plugin.NativeInteropAnEnum): com.example.test_plugin.NativeInteropAnEnum` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnEnum echoEnum(NativeInteropAnEnum nativeInteropAnEnum) { + final _$nativeInteropAnEnum = nativeInteropAnEnum.reference; + return _echoEnum( + reference.pointer, + _id_echoEnum.pointer, + _$nativeInteropAnEnum.pointer, + ).object(); + } + + static final _id_echoNativeInteropAnotherEnum = NativeInteropFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoNativeInteropAnotherEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;)Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + static final _echoNativeInteropAnotherEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.VarArgs<(jni$_.Pointer,)>, + ) + > + >('globalEnv_CallObjectMethod') + .asFunction< + jni$_.JniResult Function( + jni$_.Pointer, + jni$_.JMethodIDPtr, + jni$_.Pointer, + ) + >(); + + /// from: `public fun echoNativeInteropAnotherEnum(anotherEnum: com.example.test_plugin.NativeInteropAnotherEnum): com.example.test_plugin.NativeInteropAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnotherEnum echoNativeInteropAnotherEnum( + NativeInteropAnotherEnum nativeInteropAnotherEnum, + ) { + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum.reference; + return _echoNativeInteropAnotherEnum( + reference.pointer, + _id_echoNativeInteropAnotherEnum.pointer, + _$nativeInteropAnotherEnum.pointer, + ).object(); + } + + static final _id_echoNullableBool = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._class.instanceMethodId( + r'echoNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;)Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + 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: com.example.test_plugin.NativeInteropAnEnum?): com.example.test_plugin.NativeInteropAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnEnum? echoNullableEnum(NativeInteropAnEnum? nativeInteropAnEnum) { + final _$nativeInteropAnEnum = nativeInteropAnEnum?.reference ?? jni$_.jNullReference; + return _echoNullableEnum( + reference.pointer, + _id_echoNullableEnum.pointer, + _$nativeInteropAnEnum.pointer, + ).object(); + } + + static final _id_echoAnotherNullableEnum = NativeInteropFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAnotherNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;)Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + 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: com.example.test_plugin.NativeInteropAnotherEnum?): com.example.test_plugin.NativeInteropAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnotherEnum? echoAnotherNullableEnum( + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + ) { + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum?.reference ?? jni$_.jNullReference; + return _echoAnotherNullableEnum( + reference.pointer, + _id_echoAnotherNullableEnum.pointer, + _$nativeInteropAnotherEnum.pointer, + ).object(); + } + + static final _id_noopAsync = NativeInteropFlutterIntegrationCoreApi._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 = NativeInteropFlutterIntegrationCoreApi._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(const jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncNativeInteropAllTypes = NativeInteropFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNativeInteropAllTypes', + r'(Lcom/example/test_plugin/NativeInteropAllTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNativeInteropAllTypes = + 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 echoAsyncNativeInteropAllTypes(everything: com.example.test_plugin.NativeInteropAllTypes): com.example.test_plugin.NativeInteropAllTypes` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNativeInteropAllTypes( + NativeInteropAllTypes nativeInteropAllTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAllTypes = nativeInteropAllTypes.reference; + final $r = _echoAsyncNativeInteropAllTypes( + reference.pointer, + _id_echoAsyncNativeInteropAllTypes.pointer, + _$nativeInteropAllTypes.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(NativeInteropAllTypes.type, releaseOriginal: true); + } + + static final _id_echoAsyncNullableNativeInteropAllNullableTypes = + NativeInteropFlutterIntegrationCoreApi._class.instanceMethodId( + r'echoAsyncNullableNativeInteropAllNullableTypes', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypes;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableNativeInteropAllNullableTypes = + 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 echoAsyncNullableNativeInteropAllNullableTypes(everything: com.example.test_plugin.NativeInteropAllNullableTypes?): com.example.test_plugin.NativeInteropAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAllNullableTypes = + nativeInteropAllNullableTypes?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableNativeInteropAllNullableTypes( + reference.pointer, + _id_echoAsyncNullableNativeInteropAllNullableTypes.pointer, + _$nativeInteropAllNullableTypes.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( + NativeInteropAllNullableTypes.type, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion = + NativeInteropFlutterIntegrationCoreApi._class.instanceMethodId( + r'echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;', + ); + + static final _echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion = + 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 echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion(everything: com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAllNullableTypesWithoutRecursion = + nativeInteropAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + reference.pointer, + _id_echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion.pointer, + _$nativeInteropAllNullableTypesWithoutRecursion.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( + NativeInteropAllNullableTypesWithoutRecursion.type, + releaseOriginal: true, + ); + } + + static final _id_echoAsyncBool = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncInt = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncDouble = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncString = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncUint8List = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncInt32List = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncInt64List = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncFloat64List = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncObject = NativeInteropFlutterIntegrationCoreApi._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(const jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncList = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_echoAsyncEnumList = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_echoAsyncClassList = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_echoAsyncNonNullEnumList = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_echoAsyncNonNullClassList = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList; + } + + static final _id_echoAsyncMap = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_echoAsyncStringMap = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_echoAsyncIntMap = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_echoAsyncEnumMap = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_echoAsyncClassMap = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap; + } + + static final _id_echoAsyncEnum = NativeInteropFlutterIntegrationCoreApi._class.instanceMethodId( + r'echoAsyncEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;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: com.example.test_plugin.NativeInteropAnEnum): com.example.test_plugin.NativeInteropAnEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncEnum(NativeInteropAnEnum nativeInteropAnEnum) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnEnum = nativeInteropAnEnum.reference; + final $r = _echoAsyncEnum( + reference.pointer, + _id_echoAsyncEnum.pointer, + _$nativeInteropAnEnum.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(NativeInteropAnEnum.type, releaseOriginal: true); + } + + static final _id_echoAnotherAsyncEnum = NativeInteropFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAnotherAsyncEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;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: com.example.test_plugin.NativeInteropAnotherEnum): com.example.test_plugin.NativeInteropAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAnotherAsyncEnum( + NativeInteropAnotherEnum nativeInteropAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum.reference; + final $r = _echoAnotherAsyncEnum( + reference.pointer, + _id_echoAnotherAsyncEnum.pointer, + _$nativeInteropAnotherEnum.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(NativeInteropAnotherEnum.type, releaseOriginal: true); + } + + static final _id_echoAsyncNullableBool = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableInt = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableDouble = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableString = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableUint8List = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableInt32List = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableInt64List = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableFloat64List = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true); + } + + static final _id_echoAsyncNullableObject = NativeInteropFlutterIntegrationCoreApi._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(const jni$_.$JObject$Type$(), releaseOriginal: true); + } + + static final _id_echoAsyncNullableList = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_echoAsyncNullableEnumList = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_echoAsyncNullableClassList = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_echoAsyncNullableNonNullEnumList = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_echoAsyncNullableNonNullClassList = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JList?; + } + + static final _id_echoAsyncNullableMap = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_echoAsyncNullableStringMap = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_echoAsyncNullableIntMap = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_echoAsyncNullableEnumMap = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_echoAsyncNullableClassMap = NativeInteropFlutterIntegrationCoreApi._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, releaseOriginal: true) + as jni$_.JMap?; + } + + static final _id_echoAsyncNullableEnum = NativeInteropFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAsyncNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnEnum;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: com.example.test_plugin.NativeInteropAnEnum?): com.example.test_plugin.NativeInteropAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAsyncNullableEnum( + NativeInteropAnEnum? nativeInteropAnEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnEnum = nativeInteropAnEnum?.reference ?? jni$_.jNullReference; + final $r = _echoAsyncNullableEnum( + reference.pointer, + _id_echoAsyncNullableEnum.pointer, + _$nativeInteropAnEnum.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(NativeInteropAnEnum.type, releaseOriginal: true); + } + + static final _id_echoAnotherAsyncNullableEnum = NativeInteropFlutterIntegrationCoreApi._class + .instanceMethodId( + r'echoAnotherAsyncNullableEnum', + r'(Lcom/example/test_plugin/NativeInteropAnotherEnum;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: com.example.test_plugin.NativeInteropAnotherEnum?): com.example.test_plugin.NativeInteropAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + core$_.Future echoAnotherAsyncNullableEnum( + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + ) async { + final $p = jni$_.ReceivePort(); + final _$continuation = jni$_.ProtectedJniExtensions.newPortContinuation($p); + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum?.reference ?? jni$_.jNullReference; + final $r = _echoAnotherAsyncNullableEnum( + reference.pointer, + _id_echoAnotherAsyncNullableEnum.pointer, + _$nativeInteropAnotherEnum.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(NativeInteropAnotherEnum.type, releaseOriginal: true); + } +} + +abstract base mixin class $NativeInteropFlutterIntegrationCoreApi { + factory $NativeInteropFlutterIntegrationCoreApi({ + 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 NativeInteropAllTypes Function(NativeInteropAllTypes nativeInteropAllTypes) + echoNativeInteropAllTypes, + required NativeInteropAllNullableTypes? Function( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) + echoNativeInteropAllNullableTypes, + required NativeInteropAllNullableTypes Function( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) + sendMultipleNullableTypes, + required NativeInteropAllNullableTypesWithoutRecursion? Function( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) + echoNativeInteropAllNullableTypesWithoutRecursion, + required NativeInteropAllNullableTypesWithoutRecursion 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 NativeInteropAnEnum Function(NativeInteropAnEnum nativeInteropAnEnum) echoEnum, + required NativeInteropAnotherEnum Function(NativeInteropAnotherEnum nativeInteropAnotherEnum) + echoNativeInteropAnotherEnum, + 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 NativeInteropAnEnum? Function(NativeInteropAnEnum? nativeInteropAnEnum) + echoNullableEnum, + required NativeInteropAnotherEnum? Function(NativeInteropAnotherEnum? nativeInteropAnotherEnum) + echoAnotherNullableEnum, + required core$_.Future Function() noopAsync, + required core$_.Future Function() throwFlutterErrorAsync, + required core$_.Future Function( + NativeInteropAllTypes nativeInteropAllTypes, + ) + echoAsyncNativeInteropAllTypes, + required core$_.Future Function( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) + echoAsyncNullableNativeInteropAllNullableTypes, + required core$_.Future Function( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion, + 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(NativeInteropAnEnum nativeInteropAnEnum) + echoAsyncEnum, + required core$_.Future Function( + NativeInteropAnotherEnum nativeInteropAnotherEnum, + ) + 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(NativeInteropAnEnum? nativeInteropAnEnum) + echoAsyncNullableEnum, + required core$_.Future Function( + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + ) + echoAnotherAsyncNullableEnum, + }) = _$NativeInteropFlutterIntegrationCoreApi; + + void noop(); + core$_.bool get noop$async => false; + jni$_.JObject? throwFlutterError(); + jni$_.JObject? throwError(); + void throwErrorFromVoid(); + core$_.bool get throwErrorFromVoid$async => false; + NativeInteropAllTypes echoNativeInteropAllTypes(NativeInteropAllTypes nativeInteropAllTypes); + NativeInteropAllNullableTypes? echoNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ); + NativeInteropAllNullableTypes sendMultipleNullableTypes( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ); + NativeInteropAllNullableTypesWithoutRecursion? echoNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ); + NativeInteropAllNullableTypesWithoutRecursion 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, + ); + NativeInteropAnEnum echoEnum(NativeInteropAnEnum nativeInteropAnEnum); + NativeInteropAnotherEnum echoNativeInteropAnotherEnum( + NativeInteropAnotherEnum nativeInteropAnotherEnum, + ); + 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, + ); + NativeInteropAnEnum? echoNullableEnum(NativeInteropAnEnum? nativeInteropAnEnum); + NativeInteropAnotherEnum? echoAnotherNullableEnum( + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + ); + core$_.Future noopAsync(); + core$_.Future throwFlutterErrorAsync(); + core$_.Future echoAsyncNativeInteropAllTypes( + NativeInteropAllTypes nativeInteropAllTypes, + ); + core$_.Future echoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ); + core$_.Future + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ); + 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(NativeInteropAnEnum nativeInteropAnEnum); + core$_.Future echoAnotherAsyncEnum( + NativeInteropAnotherEnum nativeInteropAnotherEnum, + ); + 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( + NativeInteropAnEnum? nativeInteropAnEnum, + ); + core$_.Future echoAnotherAsyncNullableEnum( + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + ); +} + +final class _$NativeInteropFlutterIntegrationCoreApi with $NativeInteropFlutterIntegrationCoreApi { + _$NativeInteropFlutterIntegrationCoreApi({ + 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 NativeInteropAllTypes Function(NativeInteropAllTypes nativeInteropAllTypes) + echoNativeInteropAllTypes, + required NativeInteropAllNullableTypes? Function( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) + echoNativeInteropAllNullableTypes, + required NativeInteropAllNullableTypes Function( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) + sendMultipleNullableTypes, + required NativeInteropAllNullableTypesWithoutRecursion? Function( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) + echoNativeInteropAllNullableTypesWithoutRecursion, + required NativeInteropAllNullableTypesWithoutRecursion 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 NativeInteropAnEnum Function(NativeInteropAnEnum nativeInteropAnEnum) echoEnum, + required NativeInteropAnotherEnum Function(NativeInteropAnotherEnum nativeInteropAnotherEnum) + echoNativeInteropAnotherEnum, + 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 NativeInteropAnEnum? Function(NativeInteropAnEnum? nativeInteropAnEnum) + echoNullableEnum, + required NativeInteropAnotherEnum? Function(NativeInteropAnotherEnum? nativeInteropAnotherEnum) + echoAnotherNullableEnum, + required core$_.Future Function() noopAsync, + required core$_.Future Function() throwFlutterErrorAsync, + required core$_.Future Function( + NativeInteropAllTypes nativeInteropAllTypes, + ) + echoAsyncNativeInteropAllTypes, + required core$_.Future Function( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) + echoAsyncNullableNativeInteropAllNullableTypes, + required core$_.Future Function( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion, + 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(NativeInteropAnEnum nativeInteropAnEnum) + echoAsyncEnum, + required core$_.Future Function( + NativeInteropAnotherEnum nativeInteropAnotherEnum, + ) + 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(NativeInteropAnEnum? nativeInteropAnEnum) + echoAsyncNullableEnum, + required core$_.Future Function( + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + ) + echoAnotherAsyncNullableEnum, + }) : _noop = noop, + _throwFlutterError = throwFlutterError, + _throwError = throwError, + _throwErrorFromVoid = throwErrorFromVoid, + _echoNativeInteropAllTypes = echoNativeInteropAllTypes, + _echoNativeInteropAllNullableTypes = echoNativeInteropAllNullableTypes, + _sendMultipleNullableTypes = sendMultipleNullableTypes, + _echoNativeInteropAllNullableTypesWithoutRecursion = + echoNativeInteropAllNullableTypesWithoutRecursion, + _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, + _echoNativeInteropAnotherEnum = echoNativeInteropAnotherEnum, + _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, + _echoAsyncNativeInteropAllTypes = echoAsyncNativeInteropAllTypes, + _echoAsyncNullableNativeInteropAllNullableTypes = + echoAsyncNullableNativeInteropAllNullableTypes, + _echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion = + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion, + _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 NativeInteropAllTypes Function(NativeInteropAllTypes nativeInteropAllTypes) + _echoNativeInteropAllTypes; + final NativeInteropAllNullableTypes? Function( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) + _echoNativeInteropAllNullableTypes; + final NativeInteropAllNullableTypes Function( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) + _sendMultipleNullableTypes; + final NativeInteropAllNullableTypesWithoutRecursion? Function( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) + _echoNativeInteropAllNullableTypesWithoutRecursion; + final NativeInteropAllNullableTypesWithoutRecursion 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 NativeInteropAnEnum Function(NativeInteropAnEnum nativeInteropAnEnum) _echoEnum; + final NativeInteropAnotherEnum Function(NativeInteropAnotherEnum nativeInteropAnotherEnum) + _echoNativeInteropAnotherEnum; + 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 NativeInteropAnEnum? Function(NativeInteropAnEnum? nativeInteropAnEnum) _echoNullableEnum; + final NativeInteropAnotherEnum? Function(NativeInteropAnotherEnum? nativeInteropAnotherEnum) + _echoAnotherNullableEnum; + final core$_.Future Function() _noopAsync; + final core$_.Future Function() _throwFlutterErrorAsync; + final core$_.Future Function(NativeInteropAllTypes nativeInteropAllTypes) + _echoAsyncNativeInteropAllTypes; + final core$_.Future Function( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) + _echoAsyncNullableNativeInteropAllNullableTypes; + final core$_.Future Function( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) + _echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion; + 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(NativeInteropAnEnum nativeInteropAnEnum) + _echoAsyncEnum; + final core$_.Future Function( + NativeInteropAnotherEnum nativeInteropAnotherEnum, + ) + _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(NativeInteropAnEnum? nativeInteropAnEnum) + _echoAsyncNullableEnum; + final core$_.Future Function( + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + ) + _echoAnotherAsyncNullableEnum; + + void noop() { + return _noop(); + } + + jni$_.JObject? throwFlutterError() { + return _throwFlutterError(); + } + + jni$_.JObject? throwError() { + return _throwError(); + } + + void throwErrorFromVoid() { + return _throwErrorFromVoid(); + } + + NativeInteropAllTypes echoNativeInteropAllTypes(NativeInteropAllTypes nativeInteropAllTypes) { + return _echoNativeInteropAllTypes(nativeInteropAllTypes); + } + + NativeInteropAllNullableTypes? echoNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) { + return _echoNativeInteropAllNullableTypes(nativeInteropAllNullableTypes); + } + + NativeInteropAllNullableTypes sendMultipleNullableTypes( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JString? string, + ) { + return _sendMultipleNullableTypes(boolean, long, string); + } + + NativeInteropAllNullableTypesWithoutRecursion? echoNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) { + return _echoNativeInteropAllNullableTypesWithoutRecursion( + nativeInteropAllNullableTypesWithoutRecursion, + ); + } + + NativeInteropAllNullableTypesWithoutRecursion 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); + } + + NativeInteropAnEnum echoEnum(NativeInteropAnEnum nativeInteropAnEnum) { + return _echoEnum(nativeInteropAnEnum); + } + + NativeInteropAnotherEnum echoNativeInteropAnotherEnum( + NativeInteropAnotherEnum nativeInteropAnotherEnum, + ) { + return _echoNativeInteropAnotherEnum(nativeInteropAnotherEnum); + } + + 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); + } + + NativeInteropAnEnum? echoNullableEnum(NativeInteropAnEnum? nativeInteropAnEnum) { + return _echoNullableEnum(nativeInteropAnEnum); + } + + NativeInteropAnotherEnum? echoAnotherNullableEnum( + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + ) { + return _echoAnotherNullableEnum(nativeInteropAnotherEnum); + } + + core$_.Future noopAsync() { + return _noopAsync(); + } + + core$_.Future throwFlutterErrorAsync() { + return _throwFlutterErrorAsync(); + } + + core$_.Future echoAsyncNativeInteropAllTypes( + NativeInteropAllTypes nativeInteropAllTypes, + ) { + return _echoAsyncNativeInteropAllTypes(nativeInteropAllTypes); + } + + core$_.Future echoAsyncNullableNativeInteropAllNullableTypes( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + ) { + return _echoAsyncNullableNativeInteropAllNullableTypes(nativeInteropAllNullableTypes); + } + + core$_.Future + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + ) { + return _echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + nativeInteropAllNullableTypesWithoutRecursion, + ); + } + + 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(NativeInteropAnEnum nativeInteropAnEnum) { + return _echoAsyncEnum(nativeInteropAnEnum); + } + + core$_.Future echoAnotherAsyncEnum( + NativeInteropAnotherEnum nativeInteropAnotherEnum, + ) { + return _echoAnotherAsyncEnum(nativeInteropAnotherEnum); + } + + 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( + NativeInteropAnEnum? nativeInteropAnEnum, + ) { + return _echoAsyncNullableEnum(nativeInteropAnEnum); + } + + core$_.Future echoAnotherAsyncNullableEnum( + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + ) { + return _echoAnotherAsyncNullableEnum(nativeInteropAnotherEnum); + } +} + +final class $NativeInteropFlutterIntegrationCoreApi$Type$ + extends jni$_.JType { + @jni$_.internal + const $NativeInteropFlutterIntegrationCoreApi$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Lcom/example/test_plugin/NativeInteropFlutterIntegrationCoreApi;'; +} + +/// from: `com.example.test_plugin.NativeInteropFlutterIntegrationCoreApiRegistrar` +extension type NativeInteropFlutterIntegrationCoreApiRegistrar._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName( + r'com/example/test_plugin/NativeInteropFlutterIntegrationCoreApiRegistrar', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NativeInteropFlutterIntegrationCoreApiRegistrar$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$_.JMethodIDPtr)>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory NativeInteropFlutterIntegrationCoreApiRegistrar() { + return _new$( + _class.reference.pointer, + _id_new$.pointer, + ).object(); + } +} + +extension NativeInteropFlutterIntegrationCoreApiRegistrar$$Methods + on NativeInteropFlutterIntegrationCoreApiRegistrar { + static final _id_registerInstance = NativeInteropFlutterIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'registerInstance', + r'(Lcom/example/test_plugin/NativeInteropFlutterIntegrationCoreApi;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: com.example.test_plugin.NativeInteropFlutterIntegrationCoreApi?, name: kotlin.String): kotlin.Unit` + void registerInstance( + NativeInteropFlutterIntegrationCoreApi? nativeInteropFlutterIntegrationCoreApi, + jni$_.JString string, + ) { + final _$nativeInteropFlutterIntegrationCoreApi = + nativeInteropFlutterIntegrationCoreApi?.reference ?? jni$_.jNullReference; + final _$string = string.reference; + _registerInstance( + reference.pointer, + _id_registerInstance.pointer, + _$nativeInteropFlutterIntegrationCoreApi.pointer, + _$string.pointer, + ).check(); + } + + static final _id_getInstance = NativeInteropFlutterIntegrationCoreApiRegistrar._class + .instanceMethodId( + r'getInstance', + r'(Ljava/lang/String;)Lcom/example/test_plugin/NativeInteropFlutterIntegrationCoreApi;', + ); + + 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): com.example.test_plugin.NativeInteropFlutterIntegrationCoreApi?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropFlutterIntegrationCoreApi? getInstance(jni$_.JString string) { + final _$string = string.reference; + return _getInstance( + reference.pointer, + _id_getInstance.pointer, + _$string.pointer, + ).object(); + } +} + +final class $NativeInteropFlutterIntegrationCoreApiRegistrar$Type$ + extends jni$_.JType { + @jni$_.internal + const $NativeInteropFlutterIntegrationCoreApiRegistrar$Type$(); + + @jni$_.internal + @core$_.override + String get signature => + r'Lcom/example/test_plugin/NativeInteropFlutterIntegrationCoreApiRegistrar;'; +} + +/// from: `com.example.test_plugin.NativeInteropUnusedClass$Companion` +extension type NativeInteropUnusedClass$Companion._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName( + r'com/example/test_plugin/NativeInteropUnusedClass$Companion', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NativeInteropUnusedClass$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 NativeInteropUnusedClass$Companion(jni$_.JObject? defaultConstructorMarker) { + final _$defaultConstructorMarker = defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$defaultConstructorMarker.pointer, + ).object(); + } +} + +extension NativeInteropUnusedClass$Companion$$Methods on NativeInteropUnusedClass$Companion { + static final _id_fromList = NativeInteropUnusedClass$Companion._class.instanceMethodId( + r'fromList', + r'(Ljava/util/List;)Lcom/example/test_plugin/NativeInteropUnusedClass;', + ); + + 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): com.example.test_plugin.NativeInteropUnusedClass` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropUnusedClass fromList(jni$_.JList list) { + final _$list = list.reference; + return _fromList( + reference.pointer, + _id_fromList.pointer, + _$list.pointer, + ).object(); + } +} + +final class $NativeInteropUnusedClass$Companion$Type$ + extends jni$_.JType { + @jni$_.internal + const $NativeInteropUnusedClass$Companion$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Lcom/example/test_plugin/NativeInteropUnusedClass$Companion;'; +} + +/// from: `com.example.test_plugin.NativeInteropUnusedClass` +extension type NativeInteropUnusedClass._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'com/example/test_plugin/NativeInteropUnusedClass'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = $NativeInteropUnusedClass$Type$(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'Lcom/example/test_plugin/NativeInteropUnusedClass$Companion;', + ); + + /// from: `static public final com.example.test_plugin.NativeInteropUnusedClass$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static NativeInteropUnusedClass$Companion get Companion => + _id_Companion.get(_class, NativeInteropUnusedClass$Companion.type) + as NativeInteropUnusedClass$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 NativeInteropUnusedClass(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 NativeInteropUnusedClass.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$_.JMethodIDPtr)>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory NativeInteropUnusedClass.new$2() { + return _new$2(_class.reference.pointer, _id_new$2.pointer).object(); + } +} + +extension NativeInteropUnusedClass$$Methods on NativeInteropUnusedClass { + static final _id_get$aField = NativeInteropUnusedClass._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$_.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 = NativeInteropUnusedClass._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$_.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 = NativeInteropUnusedClass._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 = NativeInteropUnusedClass._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$_.JMethodIDPtr)>(); + + /// from: `public fun hashCode(): kotlin.Int` + core$_.int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1.pointer).integer; + } + + static final _id_toString$1 = NativeInteropUnusedClass._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$_.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(); + } + + static final _id_component1 = NativeInteropUnusedClass._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$_.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 = NativeInteropUnusedClass._class.instanceMethodId( + r'copy', + r'(Ljava/lang/Object;)Lcom/example/test_plugin/NativeInteropUnusedClass;', + ); + + 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?): com.example.test_plugin.NativeInteropUnusedClass` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropUnusedClass copy(jni$_.JObject? object) { + final _$object = object?.reference ?? jni$_.jNullReference; + return _copy( + reference.pointer, + _id_copy.pointer, + _$object.pointer, + ).object(); + } +} + +final class $NativeInteropUnusedClass$Type$ extends jni$_.JType { + @jni$_.internal + const $NativeInteropUnusedClass$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Lcom/example/test_plugin/NativeInteropUnusedClass;'; +} + +/// from: `com.example.test_plugin.NativeInteropAllTypes$Companion` +extension type NativeInteropAllTypes$Companion._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName( + r'com/example/test_plugin/NativeInteropAllTypes$Companion', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NativeInteropAllTypes$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 NativeInteropAllTypes$Companion(jni$_.JObject? defaultConstructorMarker) { + final _$defaultConstructorMarker = defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$defaultConstructorMarker.pointer, + ).object(); + } +} + +extension NativeInteropAllTypes$Companion$$Methods on NativeInteropAllTypes$Companion { + static final _id_fromList = NativeInteropAllTypes$Companion._class.instanceMethodId( + r'fromList', + r'(Ljava/util/List;)Lcom/example/test_plugin/NativeInteropAllTypes;', + ); + + 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): com.example.test_plugin.NativeInteropAllTypes` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllTypes fromList(jni$_.JList list) { + final _$list = list.reference; + return _fromList( + reference.pointer, + _id_fromList.pointer, + _$list.pointer, + ).object(); + } +} + +final class $NativeInteropAllTypes$Companion$Type$ + extends jni$_.JType { + @jni$_.internal + const $NativeInteropAllTypes$Companion$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Lcom/example/test_plugin/NativeInteropAllTypes$Companion;'; +} + +/// from: `com.example.test_plugin.NativeInteropAllTypes` +extension type NativeInteropAllTypes._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'com/example/test_plugin/NativeInteropAllTypes'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = $NativeInteropAllTypes$Type$(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'Lcom/example/test_plugin/NativeInteropAllTypes$Companion;', + ); + + /// from: `static public final com.example.test_plugin.NativeInteropAllTypes$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static NativeInteropAllTypes$Companion get Companion => + _id_Companion.get(_class, NativeInteropAllTypes$Companion.type) + as NativeInteropAllTypes$Companion; + + static final _id_new$ = _class.constructorId( + r'(ZJJD[B[I[J[DLcom/example/test_plugin/NativeInteropAnEnum;Lcom/example/test_plugin/NativeInteropAnotherEnum;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, com.example.test_plugin.NativeInteropAnEnum nativeInteropAnEnum, com.example.test_plugin.NativeInteropAnotherEnum nativeInteropAnotherEnum, 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 NativeInteropAllTypes( + core$_.bool z, + core$_.int j, + core$_.int j1, + core$_.double d, + jni$_.JByteArray bs, + jni$_.JIntArray is$, + jni$_.JLongArray js, + jni$_.JDoubleArray ds, + NativeInteropAnEnum nativeInteropAnEnum, + NativeInteropAnotherEnum nativeInteropAnotherEnum, + 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 _$nativeInteropAnEnum = nativeInteropAnEnum.reference; + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum.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, + _$nativeInteropAnEnum.pointer, + _$nativeInteropAnotherEnum.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 NativeInteropAllTypes$$Methods on NativeInteropAllTypes { + static final _id_get$aBool = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._class.instanceMethodId( + r'getAnEnum', + r'()Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + static final _get$anEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public final com.example.test_plugin.NativeInteropAnEnum getAnEnum()` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnEnum get anEnum { + return _get$anEnum(reference.pointer, _id_get$anEnum.pointer).object(); + } + + static final _id_get$anotherEnum = NativeInteropAllTypes._class.instanceMethodId( + r'getAnotherEnum', + r'()Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + static final _get$anotherEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public final com.example.test_plugin.NativeInteropAnotherEnum getAnotherEnum()` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnotherEnum get anotherEnum { + return _get$anotherEnum( + reference.pointer, + _id_get$anotherEnum.pointer, + ).object(); + } + + static final _id_get$aString = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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>>(); + } + + static final _id_toList = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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 = NativeInteropAllTypes._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$_.JMethodIDPtr)>(); + + /// from: `public fun hashCode(): kotlin.Int` + core$_.int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1.pointer).integer; + } + + static final _id_toString$1 = NativeInteropAllTypes._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$_.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(); + } + + static final _id_component1 = NativeInteropAllTypes._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$_.JMethodIDPtr)>(); + + /// from: `public operator fun component1(): kotlin.Boolean` + core$_.bool component1() { + return _component1(reference.pointer, _id_component1.pointer).boolean; + } + + static final _id_component2 = NativeInteropAllTypes._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$_.JMethodIDPtr)>(); + + /// from: `public operator fun component2(): kotlin.Long` + core$_.int component2() { + return _component2(reference.pointer, _id_component2.pointer).long; + } + + static final _id_component3 = NativeInteropAllTypes._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$_.JMethodIDPtr)>(); + + /// from: `public operator fun component3(): kotlin.Long` + core$_.int component3() { + return _component3(reference.pointer, _id_component3.pointer).long; + } + + static final _id_component4 = NativeInteropAllTypes._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$_.JMethodIDPtr)>(); + + /// from: `public operator fun component4(): kotlin.Double` + core$_.double component4() { + return _component4(reference.pointer, _id_component4.pointer).doubleFloat; + } + + static final _id_component5 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._class.instanceMethodId( + r'component9', + r'()Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + static final _component9 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public operator fun component9(): com.example.test_plugin.NativeInteropAnEnum` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnEnum component9() { + return _component9(reference.pointer, _id_component9.pointer).object(); + } + + static final _id_component10 = NativeInteropAllTypes._class.instanceMethodId( + r'component10', + r'()Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + static final _component10 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public operator fun component10(): com.example.test_plugin.NativeInteropAnotherEnum` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnotherEnum component10() { + return _component10( + reference.pointer, + _id_component10.pointer, + ).object(); + } + + static final _id_component11 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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 = NativeInteropAllTypes._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$_.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_copy = NativeInteropAllTypes._class.instanceMethodId( + r'copy', + r'(ZJJD[B[I[J[DLcom/example/test_plugin/NativeInteropAnEnum;Lcom/example/test_plugin/NativeInteropAnotherEnum;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;)Lcom/example/test_plugin/NativeInteropAllTypes;', + ); + + 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: com.example.test_plugin.NativeInteropAnEnum, anotherEnum: com.example.test_plugin.NativeInteropAnotherEnum, 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>): com.example.test_plugin.NativeInteropAllTypes` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllTypes 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, + NativeInteropAnEnum nativeInteropAnEnum, + NativeInteropAnotherEnum nativeInteropAnotherEnum, + 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 _$nativeInteropAnEnum = nativeInteropAnEnum.reference; + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum.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, + _$nativeInteropAnEnum.pointer, + _$nativeInteropAnotherEnum.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(); + } +} + +final class $NativeInteropAllTypes$Type$ extends jni$_.JType { + @jni$_.internal + const $NativeInteropAllTypes$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Lcom/example/test_plugin/NativeInteropAllTypes;'; +} + +/// from: `com.example.test_plugin.NativeInteropAllNullableTypes$Companion` +extension type NativeInteropAllNullableTypes$Companion._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName( + r'com/example/test_plugin/NativeInteropAllNullableTypes$Companion', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NativeInteropAllNullableTypes$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 NativeInteropAllNullableTypes$Companion(jni$_.JObject? defaultConstructorMarker) { + final _$defaultConstructorMarker = defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$defaultConstructorMarker.pointer, + ).object(); + } +} + +extension NativeInteropAllNullableTypes$Companion$$Methods + on NativeInteropAllNullableTypes$Companion { + static final _id_fromList = NativeInteropAllNullableTypes$Companion._class.instanceMethodId( + r'fromList', + r'(Ljava/util/List;)Lcom/example/test_plugin/NativeInteropAllNullableTypes;', + ); + + 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): com.example.test_plugin.NativeInteropAllNullableTypes` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypes fromList(jni$_.JList list) { + final _$list = list.reference; + return _fromList( + reference.pointer, + _id_fromList.pointer, + _$list.pointer, + ).object(); + } +} + +final class $NativeInteropAllNullableTypes$Companion$Type$ + extends jni$_.JType { + @jni$_.internal + const $NativeInteropAllNullableTypes$Companion$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Lcom/example/test_plugin/NativeInteropAllNullableTypes$Companion;'; +} + +/// from: `com.example.test_plugin.NativeInteropAllNullableTypes` +extension type NativeInteropAllNullableTypes._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName( + r'com/example/test_plugin/NativeInteropAllNullableTypes', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NativeInteropAllNullableTypes$Type$(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'Lcom/example/test_plugin/NativeInteropAllNullableTypes$Companion;', + ); + + /// from: `static public final com.example.test_plugin.NativeInteropAllNullableTypes$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static NativeInteropAllNullableTypes$Companion get Companion => + _id_Companion.get(_class, NativeInteropAllNullableTypes$Companion.type) + as NativeInteropAllNullableTypes$Companion; + + static final _id_new$ = _class.constructorId( + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Double;[B[I[J[DLcom/example/test_plugin/NativeInteropAnEnum;Lcom/example/test_plugin/NativeInteropAnotherEnum;Ljava/lang/String;Ljava/lang/Object;Lcom/example/test_plugin/NativeInteropAllNullableTypes;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, com.example.test_plugin.NativeInteropAnEnum nativeInteropAnEnum, com.example.test_plugin.NativeInteropAnotherEnum nativeInteropAnotherEnum, java.lang.String string, java.lang.Object object, com.example.test_plugin.NativeInteropAllNullableTypes nativeInteropAllNullableTypes, 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 NativeInteropAllNullableTypes( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JLong? long1, + jni$_.JDouble? double, + jni$_.JByteArray? bs, + jni$_.JIntArray? is$, + jni$_.JLongArray? js, + jni$_.JDoubleArray? ds, + NativeInteropAnEnum? nativeInteropAnEnum, + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + jni$_.JString? string, + jni$_.JObject? object, + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + 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 _$nativeInteropAnEnum = nativeInteropAnEnum?.reference ?? jni$_.jNullReference; + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + final _$nativeInteropAllNullableTypes = + nativeInteropAllNullableTypes?.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, + _$nativeInteropAnEnum.pointer, + _$nativeInteropAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$nativeInteropAllNullableTypes.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[DLcom/example/test_plugin/NativeInteropAnEnum;Lcom/example/test_plugin/NativeInteropAnotherEnum;Ljava/lang/String;Ljava/lang/Object;Lcom/example/test_plugin/NativeInteropAllNullableTypes;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, com.example.test_plugin.NativeInteropAnEnum nativeInteropAnEnum, com.example.test_plugin.NativeInteropAnotherEnum nativeInteropAnotherEnum, java.lang.String string, java.lang.Object object, com.example.test_plugin.NativeInteropAllNullableTypes nativeInteropAllNullableTypes, 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 NativeInteropAllNullableTypes.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, + NativeInteropAnEnum? nativeInteropAnEnum, + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + jni$_.JString? string, + jni$_.JObject? object, + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + 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 _$nativeInteropAnEnum = nativeInteropAnEnum?.reference ?? jni$_.jNullReference; + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + final _$nativeInteropAllNullableTypes = + nativeInteropAllNullableTypes?.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, + _$nativeInteropAnEnum.pointer, + _$nativeInteropAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$nativeInteropAllNullableTypes.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$_.JMethodIDPtr)>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory NativeInteropAllNullableTypes.new$2() { + return _new$2( + _class.reference.pointer, + _id_new$2.pointer, + ).object(); + } +} + +extension NativeInteropAllNullableTypes$$Methods on NativeInteropAllNullableTypes { + static final _id_get$aNullableBool = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._class.instanceMethodId( + r'getANullableEnum', + r'()Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + static final _get$aNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public final com.example.test_plugin.NativeInteropAnEnum getANullableEnum()` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnEnum? get aNullableEnum { + return _get$aNullableEnum( + reference.pointer, + _id_get$aNullableEnum.pointer, + ).object(); + } + + static final _id_get$anotherNullableEnum = NativeInteropAllNullableTypes._class.instanceMethodId( + r'getAnotherNullableEnum', + r'()Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + static final _get$anotherNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public final com.example.test_plugin.NativeInteropAnotherEnum getAnotherNullableEnum()` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnotherEnum? get anotherNullableEnum { + return _get$anotherNullableEnum( + reference.pointer, + _id_get$anotherNullableEnum.pointer, + ).object(); + } + + static final _id_get$aNullableString = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._class.instanceMethodId( + r'getAllNullableTypes', + r'()Lcom/example/test_plugin/NativeInteropAllNullableTypes;', + ); + + static final _get$allNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public final com.example.test_plugin.NativeInteropAllNullableTypes getAllNullableTypes()` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypes? get allNullableTypes { + return _get$allNullableTypes( + reference.pointer, + _id_get$allNullableTypes.pointer, + ).object(); + } + + static final _id_get$list = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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?>?>(); + } + + static final _id_get$recursiveClassMap = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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 = NativeInteropAllNullableTypes._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$_.JMethodIDPtr)>(); + + /// from: `public fun hashCode(): kotlin.Int` + core$_.int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1.pointer).integer; + } + + static final _id_toString$1 = NativeInteropAllNullableTypes._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$_.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(); + } + + static final _id_component1 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._class.instanceMethodId( + r'component9', + r'()Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + static final _component9 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public operator fun component9(): com.example.test_plugin.NativeInteropAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnEnum? component9() { + return _component9(reference.pointer, _id_component9.pointer).object(); + } + + static final _id_component10 = NativeInteropAllNullableTypes._class.instanceMethodId( + r'component10', + r'()Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + static final _component10 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public operator fun component10(): com.example.test_plugin.NativeInteropAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnotherEnum? component10() { + return _component10( + reference.pointer, + _id_component10.pointer, + ).object(); + } + + static final _id_component11 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._class.instanceMethodId( + r'component13', + r'()Lcom/example/test_plugin/NativeInteropAllNullableTypes;', + ); + + static final _component13 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public operator fun component13(): com.example.test_plugin.NativeInteropAllNullableTypes?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypes? component13() { + return _component13( + reference.pointer, + _id_component13.pointer, + ).object(); + } + + static final _id_component14 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._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$_.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?>?>(); + } + + static final _id_component31 = NativeInteropAllNullableTypes._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$_.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 = NativeInteropAllNullableTypes._class.instanceMethodId( + r'copy', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Double;[B[I[J[DLcom/example/test_plugin/NativeInteropAnEnum;Lcom/example/test_plugin/NativeInteropAnotherEnum;Ljava/lang/String;Ljava/lang/Object;Lcom/example/test_plugin/NativeInteropAllNullableTypes;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;)Lcom/example/test_plugin/NativeInteropAllNullableTypes;', + ); + + 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: com.example.test_plugin.NativeInteropAnEnum?, anotherNullableEnum: com.example.test_plugin.NativeInteropAnotherEnum?, aNullableString: kotlin.String?, aNullableObject: kotlin.Any?, allNullableTypes: com.example.test_plugin.NativeInteropAllNullableTypes?, 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?): com.example.test_plugin.NativeInteropAllNullableTypes` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypes 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, + NativeInteropAnEnum? nativeInteropAnEnum, + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + jni$_.JString? string, + jni$_.JObject? object, + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + 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 _$nativeInteropAnEnum = nativeInteropAnEnum?.reference ?? jni$_.jNullReference; + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum?.reference ?? jni$_.jNullReference; + final _$string = string?.reference ?? jni$_.jNullReference; + final _$object = object?.reference ?? jni$_.jNullReference; + final _$nativeInteropAllNullableTypes = + nativeInteropAllNullableTypes?.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, + _$nativeInteropAnEnum.pointer, + _$nativeInteropAnotherEnum.pointer, + _$string.pointer, + _$object.pointer, + _$nativeInteropAllNullableTypes.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(); + } +} + +final class $NativeInteropAllNullableTypes$Type$ + extends jni$_.JType { + @jni$_.internal + const $NativeInteropAllNullableTypes$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Lcom/example/test_plugin/NativeInteropAllNullableTypes;'; +} + +/// from: `com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion$Companion` +extension type NativeInteropAllNullableTypesWithoutRecursion$Companion._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName( + r'com/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion$Companion', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NativeInteropAllNullableTypesWithoutRecursion$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 NativeInteropAllNullableTypesWithoutRecursion$Companion( + jni$_.JObject? defaultConstructorMarker, + ) { + final _$defaultConstructorMarker = defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$defaultConstructorMarker.pointer, + ).object(); + } +} + +extension NativeInteropAllNullableTypesWithoutRecursion$Companion$$Methods + on NativeInteropAllNullableTypesWithoutRecursion$Companion { + static final _id_fromList = NativeInteropAllNullableTypesWithoutRecursion$Companion._class + .instanceMethodId( + r'fromList', + r'(Ljava/util/List;)Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;', + ); + + 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): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypesWithoutRecursion fromList(jni$_.JList list) { + final _$list = list.reference; + return _fromList( + reference.pointer, + _id_fromList.pointer, + _$list.pointer, + ).object(); + } +} + +final class $NativeInteropAllNullableTypesWithoutRecursion$Companion$Type$ + extends jni$_.JType { + @jni$_.internal + const $NativeInteropAllNullableTypesWithoutRecursion$Companion$Type$(); + + @jni$_.internal + @core$_.override + String get signature => + r'Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion$Companion;'; +} + +/// from: `com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion` +extension type NativeInteropAllNullableTypesWithoutRecursion._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName( + r'com/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NativeInteropAllNullableTypesWithoutRecursion$Type$(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion$Companion;', + ); + + /// from: `static public final com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static NativeInteropAllNullableTypesWithoutRecursion$Companion get Companion => + _id_Companion.get(_class, NativeInteropAllNullableTypesWithoutRecursion$Companion.type) + as NativeInteropAllNullableTypesWithoutRecursion$Companion; + + static final _id_new$ = _class.constructorId( + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Double;[B[I[J[DLcom/example/test_plugin/NativeInteropAnEnum;Lcom/example/test_plugin/NativeInteropAnotherEnum;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, com.example.test_plugin.NativeInteropAnEnum nativeInteropAnEnum, com.example.test_plugin.NativeInteropAnotherEnum nativeInteropAnotherEnum, 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 NativeInteropAllNullableTypesWithoutRecursion( + jni$_.JBoolean? boolean, + jni$_.JLong? long, + jni$_.JLong? long1, + jni$_.JDouble? double, + jni$_.JByteArray? bs, + jni$_.JIntArray? is$, + jni$_.JLongArray? js, + jni$_.JDoubleArray? ds, + NativeInteropAnEnum? nativeInteropAnEnum, + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + 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 _$nativeInteropAnEnum = nativeInteropAnEnum?.reference ?? jni$_.jNullReference; + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum?.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, + _$nativeInteropAnEnum.pointer, + _$nativeInteropAnotherEnum.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[DLcom/example/test_plugin/NativeInteropAnEnum;Lcom/example/test_plugin/NativeInteropAnotherEnum;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, com.example.test_plugin.NativeInteropAnEnum nativeInteropAnEnum, com.example.test_plugin.NativeInteropAnotherEnum nativeInteropAnotherEnum, 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 NativeInteropAllNullableTypesWithoutRecursion.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, + NativeInteropAnEnum? nativeInteropAnEnum, + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + 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 _$nativeInteropAnEnum = nativeInteropAnEnum?.reference ?? jni$_.jNullReference; + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum?.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, + _$nativeInteropAnEnum.pointer, + _$nativeInteropAnotherEnum.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$_.JMethodIDPtr)>(); + + /// from: `public void ()` + /// The returned object must be released after use, by calling the [release] method. + factory NativeInteropAllNullableTypesWithoutRecursion.new$2() { + return _new$2( + _class.reference.pointer, + _id_new$2.pointer, + ).object(); + } +} + +extension NativeInteropAllNullableTypesWithoutRecursion$$Methods + on NativeInteropAllNullableTypesWithoutRecursion { + static final _id_get$aNullableBool = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'getANullableEnum', r'()Lcom/example/test_plugin/NativeInteropAnEnum;'); + + static final _get$aNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public final com.example.test_plugin.NativeInteropAnEnum getANullableEnum()` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnEnum? get aNullableEnum { + return _get$aNullableEnum( + reference.pointer, + _id_get$aNullableEnum.pointer, + ).object(); + } + + static final _id_get$anotherNullableEnum = NativeInteropAllNullableTypesWithoutRecursion._class + .instanceMethodId( + r'getAnotherNullableEnum', + r'()Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + static final _get$anotherNullableEnum = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public final com.example.test_plugin.NativeInteropAnotherEnum getAnotherNullableEnum()` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnotherEnum? get anotherNullableEnum { + return _get$anotherNullableEnum( + reference.pointer, + _id_get$anotherNullableEnum.pointer, + ).object(); + } + + static final _id_get$aNullableString = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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?>?>(); + } + + static final _id_toList = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.JMethodIDPtr)>(); + + /// from: `public fun hashCode(): kotlin.Int` + core$_.int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1.pointer).integer; + } + + static final _id_toString$1 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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(); + } + + static final _id_component1 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component9', r'()Lcom/example/test_plugin/NativeInteropAnEnum;'); + + static final _component9 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public operator fun component9(): com.example.test_plugin.NativeInteropAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnEnum? component9() { + return _component9(reference.pointer, _id_component9.pointer).object(); + } + + static final _id_component10 = NativeInteropAllNullableTypesWithoutRecursion._class + .instanceMethodId(r'component10', r'()Lcom/example/test_plugin/NativeInteropAnotherEnum;'); + + static final _component10 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public operator fun component10(): com.example.test_plugin.NativeInteropAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnotherEnum? component10() { + return _component10( + reference.pointer, + _id_component10.pointer, + ).object(); + } + + static final _id_component11 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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 = NativeInteropAllNullableTypesWithoutRecursion._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$_.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_copy = NativeInteropAllNullableTypesWithoutRecursion._class.instanceMethodId( + r'copy', + r'(Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/lang/Double;[B[I[J[DLcom/example/test_plugin/NativeInteropAnEnum;Lcom/example/test_plugin/NativeInteropAnotherEnum;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;)Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;', + ); + + 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: com.example.test_plugin.NativeInteropAnEnum?, anotherNullableEnum: com.example.test_plugin.NativeInteropAnotherEnum?, 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?>?): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypesWithoutRecursion 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, + NativeInteropAnEnum? nativeInteropAnEnum, + NativeInteropAnotherEnum? nativeInteropAnotherEnum, + 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 _$nativeInteropAnEnum = nativeInteropAnEnum?.reference ?? jni$_.jNullReference; + final _$nativeInteropAnotherEnum = nativeInteropAnotherEnum?.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, + _$nativeInteropAnEnum.pointer, + _$nativeInteropAnotherEnum.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(); + } +} + +final class $NativeInteropAllNullableTypesWithoutRecursion$Type$ + extends jni$_.JType { + @jni$_.internal + const $NativeInteropAllNullableTypesWithoutRecursion$Type$(); + + @jni$_.internal + @core$_.override + String get signature => + r'Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;'; +} + +/// from: `com.example.test_plugin.NativeInteropAllClassesWrapper$Companion` +extension type NativeInteropAllClassesWrapper$Companion._(jni$_.JObject _$this) + implements jni$_.JObject { + static final _class = jni$_.JClass.forName( + r'com/example/test_plugin/NativeInteropAllClassesWrapper$Companion', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NativeInteropAllClassesWrapper$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 NativeInteropAllClassesWrapper$Companion(jni$_.JObject? defaultConstructorMarker) { + final _$defaultConstructorMarker = defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$defaultConstructorMarker.pointer, + ).object(); + } +} + +extension NativeInteropAllClassesWrapper$Companion$$Methods + on NativeInteropAllClassesWrapper$Companion { + static final _id_fromList = NativeInteropAllClassesWrapper$Companion._class.instanceMethodId( + r'fromList', + r'(Ljava/util/List;)Lcom/example/test_plugin/NativeInteropAllClassesWrapper;', + ); + + 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): com.example.test_plugin.NativeInteropAllClassesWrapper` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllClassesWrapper fromList(jni$_.JList list) { + final _$list = list.reference; + return _fromList( + reference.pointer, + _id_fromList.pointer, + _$list.pointer, + ).object(); + } +} + +final class $NativeInteropAllClassesWrapper$Companion$Type$ + extends jni$_.JType { + @jni$_.internal + const $NativeInteropAllClassesWrapper$Companion$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Lcom/example/test_plugin/NativeInteropAllClassesWrapper$Companion;'; +} + +/// from: `com.example.test_plugin.NativeInteropAllClassesWrapper` +extension type NativeInteropAllClassesWrapper._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName( + r'com/example/test_plugin/NativeInteropAllClassesWrapper', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NativeInteropAllClassesWrapper$Type$(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'Lcom/example/test_plugin/NativeInteropAllClassesWrapper$Companion;', + ); + + /// from: `static public final com.example.test_plugin.NativeInteropAllClassesWrapper$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static NativeInteropAllClassesWrapper$Companion get Companion => + _id_Companion.get(_class, NativeInteropAllClassesWrapper$Companion.type) + as NativeInteropAllClassesWrapper$Companion; + + static final _id_new$ = _class.constructorId( + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypes;Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;Lcom/example/test_plugin/NativeInteropAllTypes;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 (com.example.test_plugin.NativeInteropAllNullableTypes nativeInteropAllNullableTypes, com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion nativeInteropAllNullableTypesWithoutRecursion, com.example.test_plugin.NativeInteropAllTypes nativeInteropAllTypes, 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 NativeInteropAllClassesWrapper( + NativeInteropAllNullableTypes nativeInteropAllNullableTypes, + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + NativeInteropAllTypes? nativeInteropAllTypes, + jni$_.JList list, + jni$_.JList? list1, + jni$_.JMap map, + jni$_.JMap? map1, + ) { + final _$nativeInteropAllNullableTypes = nativeInteropAllNullableTypes.reference; + final _$nativeInteropAllNullableTypesWithoutRecursion = + nativeInteropAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final _$nativeInteropAllTypes = nativeInteropAllTypes?.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, + _$nativeInteropAllNullableTypes.pointer, + _$nativeInteropAllNullableTypesWithoutRecursion.pointer, + _$nativeInteropAllTypes.pointer, + _$list.pointer, + _$list1.pointer, + _$map.pointer, + _$map1.pointer, + ).object(); + } + + static final _id_new$1 = _class.constructorId( + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypes;Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;Lcom/example/test_plugin/NativeInteropAllTypes;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 (com.example.test_plugin.NativeInteropAllNullableTypes nativeInteropAllNullableTypes, com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion nativeInteropAllNullableTypesWithoutRecursion, com.example.test_plugin.NativeInteropAllTypes nativeInteropAllTypes, 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 NativeInteropAllClassesWrapper.new$1( + NativeInteropAllNullableTypes? nativeInteropAllNullableTypes, + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + NativeInteropAllTypes? nativeInteropAllTypes, + jni$_.JList? list, + jni$_.JList? list1, + jni$_.JMap? map, + jni$_.JMap? map1, + core$_.int i, + jni$_.JObject? defaultConstructorMarker, + ) { + final _$nativeInteropAllNullableTypes = + nativeInteropAllNullableTypes?.reference ?? jni$_.jNullReference; + final _$nativeInteropAllNullableTypesWithoutRecursion = + nativeInteropAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final _$nativeInteropAllTypes = nativeInteropAllTypes?.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, + _$nativeInteropAllNullableTypes.pointer, + _$nativeInteropAllNullableTypesWithoutRecursion.pointer, + _$nativeInteropAllTypes.pointer, + _$list.pointer, + _$list1.pointer, + _$map.pointer, + _$map1.pointer, + i, + _$defaultConstructorMarker.pointer, + ).object(); + } +} + +extension NativeInteropAllClassesWrapper$$Methods on NativeInteropAllClassesWrapper { + static final _id_get$allNullableTypes = NativeInteropAllClassesWrapper._class.instanceMethodId( + r'getAllNullableTypes', + r'()Lcom/example/test_plugin/NativeInteropAllNullableTypes;', + ); + + static final _get$allNullableTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public final com.example.test_plugin.NativeInteropAllNullableTypes getAllNullableTypes()` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypes get allNullableTypes { + return _get$allNullableTypes( + reference.pointer, + _id_get$allNullableTypes.pointer, + ).object(); + } + + static final _id_get$allNullableTypesWithoutRecursion = NativeInteropAllClassesWrapper._class + .instanceMethodId( + r'getAllNullableTypesWithoutRecursion', + r'()Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;', + ); + + static final _get$allNullableTypesWithoutRecursion = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public final com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion getAllNullableTypesWithoutRecursion()` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypesWithoutRecursion? get allNullableTypesWithoutRecursion { + return _get$allNullableTypesWithoutRecursion( + reference.pointer, + _id_get$allNullableTypesWithoutRecursion.pointer, + ).object(); + } + + static final _id_get$allTypes = NativeInteropAllClassesWrapper._class.instanceMethodId( + r'getAllTypes', + r'()Lcom/example/test_plugin/NativeInteropAllTypes;', + ); + + static final _get$allTypes = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public final com.example.test_plugin.NativeInteropAllTypes getAllTypes()` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllTypes? get allTypes { + return _get$allTypes( + reference.pointer, + _id_get$allTypes.pointer, + ).object(); + } + + static final _id_get$classList = NativeInteropAllClassesWrapper._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$_.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 = NativeInteropAllClassesWrapper._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$_.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 = NativeInteropAllClassesWrapper._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$_.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 = NativeInteropAllClassesWrapper._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$_.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 = NativeInteropAllClassesWrapper._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$_.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 = NativeInteropAllClassesWrapper._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 = NativeInteropAllClassesWrapper._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$_.JMethodIDPtr)>(); + + /// from: `public fun hashCode(): kotlin.Int` + core$_.int hashCode$1() { + return _hashCode$1(reference.pointer, _id_hashCode$1.pointer).integer; + } + + static final _id_toString$1 = NativeInteropAllClassesWrapper._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$_.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(); + } + + static final _id_component1 = NativeInteropAllClassesWrapper._class.instanceMethodId( + r'component1', + r'()Lcom/example/test_plugin/NativeInteropAllNullableTypes;', + ); + + static final _component1 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public operator fun component1(): com.example.test_plugin.NativeInteropAllNullableTypes` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypes component1() { + return _component1( + reference.pointer, + _id_component1.pointer, + ).object(); + } + + static final _id_component2 = NativeInteropAllClassesWrapper._class.instanceMethodId( + r'component2', + r'()Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;', + ); + + static final _component2 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public operator fun component2(): com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllNullableTypesWithoutRecursion? component2() { + return _component2( + reference.pointer, + _id_component2.pointer, + ).object(); + } + + static final _id_component3 = NativeInteropAllClassesWrapper._class.instanceMethodId( + r'component3', + r'()Lcom/example/test_plugin/NativeInteropAllTypes;', + ); + + static final _component3 = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `public operator fun component3(): com.example.test_plugin.NativeInteropAllTypes?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllTypes? component3() { + return _component3(reference.pointer, _id_component3.pointer).object(); + } + + static final _id_component4 = NativeInteropAllClassesWrapper._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$_.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 = NativeInteropAllClassesWrapper._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$_.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 = NativeInteropAllClassesWrapper._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$_.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 = NativeInteropAllClassesWrapper._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$_.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 = NativeInteropAllClassesWrapper._class.instanceMethodId( + r'copy', + r'(Lcom/example/test_plugin/NativeInteropAllNullableTypes;Lcom/example/test_plugin/NativeInteropAllNullableTypesWithoutRecursion;Lcom/example/test_plugin/NativeInteropAllTypes;Ljava/util/List;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;)Lcom/example/test_plugin/NativeInteropAllClassesWrapper;', + ); + + 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: com.example.test_plugin.NativeInteropAllNullableTypes, allNullableTypesWithoutRecursion: com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion?, allTypes: com.example.test_plugin.NativeInteropAllTypes?, classList: kotlin.collections.List, nullableClassList: kotlin.collections.List?, classMap: kotlin.collections.Map, nullableClassMap: kotlin.collections.Map?): com.example.test_plugin.NativeInteropAllClassesWrapper` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAllClassesWrapper copy( + NativeInteropAllNullableTypes nativeInteropAllNullableTypes, + NativeInteropAllNullableTypesWithoutRecursion? nativeInteropAllNullableTypesWithoutRecursion, + NativeInteropAllTypes? nativeInteropAllTypes, + jni$_.JList list, + jni$_.JList? list1, + jni$_.JMap map, + jni$_.JMap? map1, + ) { + final _$nativeInteropAllNullableTypes = nativeInteropAllNullableTypes.reference; + final _$nativeInteropAllNullableTypesWithoutRecursion = + nativeInteropAllNullableTypesWithoutRecursion?.reference ?? jni$_.jNullReference; + final _$nativeInteropAllTypes = nativeInteropAllTypes?.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, + _$nativeInteropAllNullableTypes.pointer, + _$nativeInteropAllNullableTypesWithoutRecursion.pointer, + _$nativeInteropAllTypes.pointer, + _$list.pointer, + _$list1.pointer, + _$map.pointer, + _$map1.pointer, + ).object(); + } +} + +final class $NativeInteropAllClassesWrapper$Type$ + extends jni$_.JType { + @jni$_.internal + const $NativeInteropAllClassesWrapper$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Lcom/example/test_plugin/NativeInteropAllClassesWrapper;'; +} + +/// from: `com.example.test_plugin.NativeInteropAnEnum$Companion` +extension type NativeInteropAnEnum$Companion._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName( + r'com/example/test_plugin/NativeInteropAnEnum$Companion', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NativeInteropAnEnum$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 NativeInteropAnEnum$Companion(jni$_.JObject? defaultConstructorMarker) { + final _$defaultConstructorMarker = defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$defaultConstructorMarker.pointer, + ).object(); + } +} + +extension NativeInteropAnEnum$Companion$$Methods on NativeInteropAnEnum$Companion { + static final _id_ofRaw = NativeInteropAnEnum$Companion._class.instanceMethodId( + r'ofRaw', + r'(I)Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + 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): com.example.test_plugin.NativeInteropAnEnum?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnEnum? ofRaw(core$_.int i) { + return _ofRaw(reference.pointer, _id_ofRaw.pointer, i).object(); + } +} + +final class $NativeInteropAnEnum$Companion$Type$ + extends jni$_.JType { + @jni$_.internal + const $NativeInteropAnEnum$Companion$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Lcom/example/test_plugin/NativeInteropAnEnum$Companion;'; +} + +/// from: `com.example.test_plugin.NativeInteropAnEnum` +extension type NativeInteropAnEnum._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'com/example/test_plugin/NativeInteropAnEnum'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = $NativeInteropAnEnum$Type$(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'Lcom/example/test_plugin/NativeInteropAnEnum$Companion;', + ); + + /// from: `static public final com.example.test_plugin.NativeInteropAnEnum$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static NativeInteropAnEnum$Companion get Companion => + _id_Companion.get(_class, NativeInteropAnEnum$Companion.type) + as NativeInteropAnEnum$Companion; + + static final _id_ONE = _class.staticFieldId( + r'ONE', + r'Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + /// from: `static public final com.example.test_plugin.NativeInteropAnEnum ONE` + /// The returned object must be released after use, by calling the [release] method. + static NativeInteropAnEnum get ONE => + _id_ONE.get(_class, NativeInteropAnEnum.type) as NativeInteropAnEnum; + + static final _id_TWO = _class.staticFieldId( + r'TWO', + r'Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + /// from: `static public final com.example.test_plugin.NativeInteropAnEnum TWO` + /// The returned object must be released after use, by calling the [release] method. + static NativeInteropAnEnum get TWO => + _id_TWO.get(_class, NativeInteropAnEnum.type) as NativeInteropAnEnum; + + static final _id_THREE = _class.staticFieldId( + r'THREE', + r'Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + /// from: `static public final com.example.test_plugin.NativeInteropAnEnum THREE` + /// The returned object must be released after use, by calling the [release] method. + static NativeInteropAnEnum get THREE => + _id_THREE.get(_class, NativeInteropAnEnum.type) as NativeInteropAnEnum; + + static final _id_FORTY_TWO = _class.staticFieldId( + r'FORTY_TWO', + r'Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + /// from: `static public final com.example.test_plugin.NativeInteropAnEnum FORTY_TWO` + /// The returned object must be released after use, by calling the [release] method. + static NativeInteropAnEnum get FORTY_TWO => + _id_FORTY_TWO.get(_class, NativeInteropAnEnum.type) as NativeInteropAnEnum; + + static final _id_FOUR_HUNDRED_TWENTY_TWO = _class.staticFieldId( + r'FOUR_HUNDRED_TWENTY_TWO', + r'Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + /// from: `static public final com.example.test_plugin.NativeInteropAnEnum FOUR_HUNDRED_TWENTY_TWO` + /// The returned object must be released after use, by calling the [release] method. + static NativeInteropAnEnum get FOUR_HUNDRED_TWENTY_TWO => + _id_FOUR_HUNDRED_TWENTY_TWO.get(_class, NativeInteropAnEnum.type) as NativeInteropAnEnum; + + static final _id_values = _class.staticMethodId( + r'values', + r'()[Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + static final _values = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallStaticObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `static public com.example.test_plugin.NativeInteropAnEnum[] 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;)Lcom/example/test_plugin/NativeInteropAnEnum;', + ); + + 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 com.example.test_plugin.NativeInteropAnEnum valueOf(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static NativeInteropAnEnum? 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$_.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 NativeInteropAnEnum$$Methods on NativeInteropAnEnum { + static final _id_get$raw = NativeInteropAnEnum._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$_.JMethodIDPtr)>(); + + /// from: `public final int getRaw()` + core$_.int get raw { + return _get$raw(reference.pointer, _id_get$raw.pointer).integer; + } +} + +final class $NativeInteropAnEnum$Type$ extends jni$_.JType { + @jni$_.internal + const $NativeInteropAnEnum$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Lcom/example/test_plugin/NativeInteropAnEnum;'; +} + +/// from: `com.example.test_plugin.NativeInteropAnotherEnum$Companion` +extension type NativeInteropAnotherEnum$Companion._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName( + r'com/example/test_plugin/NativeInteropAnotherEnum$Companion', + ); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = + $NativeInteropAnotherEnum$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 NativeInteropAnotherEnum$Companion(jni$_.JObject? defaultConstructorMarker) { + final _$defaultConstructorMarker = defaultConstructorMarker?.reference ?? jni$_.jNullReference; + return _new$( + _class.reference.pointer, + _id_new$.pointer, + _$defaultConstructorMarker.pointer, + ).object(); + } +} + +extension NativeInteropAnotherEnum$Companion$$Methods on NativeInteropAnotherEnum$Companion { + static final _id_ofRaw = NativeInteropAnotherEnum$Companion._class.instanceMethodId( + r'ofRaw', + r'(I)Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + 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): com.example.test_plugin.NativeInteropAnotherEnum?` + /// The returned object must be released after use, by calling the [release] method. + NativeInteropAnotherEnum? ofRaw(core$_.int i) { + return _ofRaw(reference.pointer, _id_ofRaw.pointer, i).object(); + } +} + +final class $NativeInteropAnotherEnum$Companion$Type$ + extends jni$_.JType { + @jni$_.internal + const $NativeInteropAnotherEnum$Companion$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Lcom/example/test_plugin/NativeInteropAnotherEnum$Companion;'; +} + +/// from: `com.example.test_plugin.NativeInteropAnotherEnum` +extension type NativeInteropAnotherEnum._(jni$_.JObject _$this) implements jni$_.JObject { + static final _class = jni$_.JClass.forName(r'com/example/test_plugin/NativeInteropAnotherEnum'); + + /// The type which includes information such as the signature of this class. + static const jni$_.JType type = $NativeInteropAnotherEnum$Type$(); + static final _id_Companion = _class.staticFieldId( + r'Companion', + r'Lcom/example/test_plugin/NativeInteropAnotherEnum$Companion;', + ); + + /// from: `static public final com.example.test_plugin.NativeInteropAnotherEnum$Companion Companion` + /// The returned object must be released after use, by calling the [release] method. + static NativeInteropAnotherEnum$Companion get Companion => + _id_Companion.get(_class, NativeInteropAnotherEnum$Companion.type) + as NativeInteropAnotherEnum$Companion; + + static final _id_JUST_IN_CASE = _class.staticFieldId( + r'JUST_IN_CASE', + r'Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + /// from: `static public final com.example.test_plugin.NativeInteropAnotherEnum JUST_IN_CASE` + /// The returned object must be released after use, by calling the [release] method. + static NativeInteropAnotherEnum get JUST_IN_CASE => + _id_JUST_IN_CASE.get(_class, NativeInteropAnotherEnum.type) as NativeInteropAnotherEnum; + + static final _id_values = _class.staticMethodId( + r'values', + r'()[Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + static final _values = + jni$_.ProtectedJniExtensions.lookup< + jni$_.NativeFunction< + jni$_.JniResult Function(jni$_.Pointer, jni$_.JMethodIDPtr) + > + >('globalEnv_CallStaticObjectMethod') + .asFunction, jni$_.JMethodIDPtr)>(); + + /// from: `static public com.example.test_plugin.NativeInteropAnotherEnum[] 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;)Lcom/example/test_plugin/NativeInteropAnotherEnum;', + ); + + 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 com.example.test_plugin.NativeInteropAnotherEnum valueOf(java.lang.String string)` + /// The returned object must be released after use, by calling the [release] method. + static NativeInteropAnotherEnum? 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$_.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 NativeInteropAnotherEnum$$Methods on NativeInteropAnotherEnum { + static final _id_get$raw = NativeInteropAnotherEnum._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$_.JMethodIDPtr)>(); + + /// from: `public final int getRaw()` + core$_.int get raw { + return _get$raw(reference.pointer, _id_get$raw.pointer).integer; + } +} + +final class $NativeInteropAnotherEnum$Type$ extends jni$_.JType { + @jni$_.internal + const $NativeInteropAnotherEnum$Type$(); + + @jni$_.internal + @core$_.override + String get signature => r'Lcom/example/test_plugin/NativeInteropAnotherEnum;'; +} 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 19a7ab097536..1433a791104a 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 @@ -308,8 +308,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 e41b166e6e51..1638b7335608 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 @@ -257,8 +257,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 32116f40bd58..67fbec689289 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 @@ -78,8 +78,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 +150,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; @@ -226,8 +226,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; @@ -298,8 +298,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 41a1000e91e2..8c847bce547c 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 @@ -78,8 +78,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/pubspec.yaml b/packages/pigeon/platform_tests/shared_test_plugin_code/pubspec.yaml index c0f77d29e856..4517f1f6b21b 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: 27890daeab690209603a979c7fbb54b22a3c878f 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: 27890daeab690209603a979c7fbb54b22a3c878f meta: ^1.17.0 mockito: ^5.4.4 + objective_c: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/objective_c + ref: 27890daeab690209603a979c7fbb54b22a3c878f dev_dependencies: leak_tracker: any + +dependency_overrides: + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: 27890daeab690209603a979c7fbb54b22a3c878f + ffigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffigen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + objective_c: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/objective_c + ref: 27890daeab690209603a979c7fbb54b22a3c878f + swift2objc: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swift2objc + ref: 27890daeab690209603a979c7fbb54b22a3c878f \ 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 5c31c61ab44a..659fa8f4feb2 100644 --- a/packages/pigeon/platform_tests/test_plugin/android/build.gradle.kts +++ b/packages/pigeon/platform_tests/test_plugin/android/build.gradle.kts @@ -2,7 +2,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() @@ -10,7 +10,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") } } @@ -72,6 +72,6 @@ android { testImplementation("io.mockk:mockk:1.14.11") // 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..58d28efba92f 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 +!NativeInteropTests.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/NativeInteropTests.gen.kt b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/NativeInteropTests.gen.kt new file mode 100644 index 000000000000..b5f50dd40de6 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/NativeInteropTests.gen.kt @@ -0,0 +1,4631 @@ +// 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") + +package com.example.test_plugin + +import android.util.Log +import androidx.annotation.Keep + +private object NativeInteropTestsPigeonUtils { + + fun createConnectionError(channelName: String): NativeInteropTestsError { + return NativeInteropTestsError( + "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 NativeInteropTestsError) { + 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 NativeInteropTestsError( + val code: String, + override val message: String? = null, + val details: Any? = null +) : RuntimeException() + +private const val defaultInstanceName = "PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u" + +enum class NativeInteropAnEnum(val raw: Int) { + ONE(0), + TWO(1), + THREE(2), + FORTY_TWO(3), + FOUR_HUNDRED_TWENTY_TWO(4); + + companion object { + fun ofRaw(raw: Int): NativeInteropAnEnum? { + return values().firstOrNull { it.raw == raw } + } + } +} + +enum class NativeInteropAnotherEnum(val raw: Int) { + JUST_IN_CASE(0); + + companion object { + fun ofRaw(raw: Int): NativeInteropAnotherEnum? { + return values().firstOrNull { it.raw == raw } + } + } +} + +/** Generated class from Pigeon that represents data sent in messages. */ +data class NativeInteropUnusedClass(val aField: Any? = null) { + companion object { + fun fromList(pigeonVar_list: List): NativeInteropUnusedClass { + val aField = pigeonVar_list[0] + return NativeInteropUnusedClass(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 NativeInteropUnusedClass + return NativeInteropTestsPigeonUtils.deepEquals(this.aField, other.aField) + } + + override fun hashCode(): Int { + var result = javaClass.hashCode() + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aField) + return result + } + + override fun toString(): String { + return "NativeInteropUnusedClass(aField=$aField)" + } +} + +/** + * A class containing all supported types. + * + * Generated class from Pigeon that represents data sent in messages. + */ +data class NativeInteropAllTypes( + 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: NativeInteropAnEnum, + val anotherEnum: NativeInteropAnotherEnum, + 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): NativeInteropAllTypes { + 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 NativeInteropAnEnum + val anotherEnum = pigeonVar_list[9] as NativeInteropAnotherEnum + 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 NativeInteropAllTypes( + 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 NativeInteropAllTypes + return NativeInteropTestsPigeonUtils.deepEquals(this.aBool, other.aBool) && + NativeInteropTestsPigeonUtils.deepEquals(this.anInt, other.anInt) && + NativeInteropTestsPigeonUtils.deepEquals(this.anInt64, other.anInt64) && + NativeInteropTestsPigeonUtils.deepEquals(this.aDouble, other.aDouble) && + NativeInteropTestsPigeonUtils.deepEquals(this.aByteArray, other.aByteArray) && + NativeInteropTestsPigeonUtils.deepEquals(this.a4ByteArray, other.a4ByteArray) && + NativeInteropTestsPigeonUtils.deepEquals(this.a8ByteArray, other.a8ByteArray) && + NativeInteropTestsPigeonUtils.deepEquals(this.aFloatArray, other.aFloatArray) && + NativeInteropTestsPigeonUtils.deepEquals(this.anEnum, other.anEnum) && + NativeInteropTestsPigeonUtils.deepEquals(this.anotherEnum, other.anotherEnum) && + NativeInteropTestsPigeonUtils.deepEquals(this.aString, other.aString) && + NativeInteropTestsPigeonUtils.deepEquals(this.anObject, other.anObject) && + NativeInteropTestsPigeonUtils.deepEquals(this.list, other.list) && + NativeInteropTestsPigeonUtils.deepEquals(this.stringList, other.stringList) && + NativeInteropTestsPigeonUtils.deepEquals(this.intList, other.intList) && + NativeInteropTestsPigeonUtils.deepEquals(this.doubleList, other.doubleList) && + NativeInteropTestsPigeonUtils.deepEquals(this.boolList, other.boolList) && + NativeInteropTestsPigeonUtils.deepEquals(this.enumList, other.enumList) && + NativeInteropTestsPigeonUtils.deepEquals(this.objectList, other.objectList) && + NativeInteropTestsPigeonUtils.deepEquals(this.listList, other.listList) && + NativeInteropTestsPigeonUtils.deepEquals(this.mapList, other.mapList) && + NativeInteropTestsPigeonUtils.deepEquals(this.map, other.map) && + NativeInteropTestsPigeonUtils.deepEquals(this.stringMap, other.stringMap) && + NativeInteropTestsPigeonUtils.deepEquals(this.intMap, other.intMap) && + NativeInteropTestsPigeonUtils.deepEquals(this.enumMap, other.enumMap) && + NativeInteropTestsPigeonUtils.deepEquals(this.objectMap, other.objectMap) && + NativeInteropTestsPigeonUtils.deepEquals(this.listMap, other.listMap) && + NativeInteropTestsPigeonUtils.deepEquals(this.mapMap, other.mapMap) + } + + override fun hashCode(): Int { + var result = javaClass.hashCode() + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aBool) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.anInt) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.anInt64) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aDouble) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aByteArray) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.a4ByteArray) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.a8ByteArray) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aFloatArray) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.anEnum) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.anotherEnum) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aString) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.anObject) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.list) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.stringList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.intList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.doubleList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.boolList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.enumList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.objectList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.listList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.mapList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.map) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.stringMap) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.intMap) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.enumMap) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.objectMap) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.listMap) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.mapMap) + return result + } + + override fun toString(): String { + return "NativeInteropAllTypes(aBool=$aBool, anInt=$anInt, anInt64=$anInt64, aDouble=$aDouble, aByteArray=${aByteArray.contentToString()}, a4ByteArray=${a4ByteArray.contentToString()}, a8ByteArray=${a8ByteArray.contentToString()}, aFloatArray=${aFloatArray.contentToString()}, 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)" + } +} + +/** + * A class containing all supported nullable types. + * + * Generated class from Pigeon that represents data sent in messages. + */ +data class NativeInteropAllNullableTypes( + 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: NativeInteropAnEnum? = null, + val anotherNullableEnum: NativeInteropAnotherEnum? = null, + val aNullableString: String? = null, + val aNullableObject: Any? = null, + val allNullableTypes: NativeInteropAllNullableTypes? = 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): NativeInteropAllNullableTypes { + 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 NativeInteropAnEnum? + val anotherNullableEnum = pigeonVar_list[9] as NativeInteropAnotherEnum? + val aNullableString = pigeonVar_list[10] as String? + val aNullableObject = pigeonVar_list[11] + val allNullableTypes = pigeonVar_list[12] as NativeInteropAllNullableTypes? + 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 NativeInteropAllNullableTypes( + 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 NativeInteropAllNullableTypes + return NativeInteropTestsPigeonUtils.deepEquals(this.aNullableBool, other.aNullableBool) && + NativeInteropTestsPigeonUtils.deepEquals(this.aNullableInt, other.aNullableInt) && + NativeInteropTestsPigeonUtils.deepEquals(this.aNullableInt64, other.aNullableInt64) && + NativeInteropTestsPigeonUtils.deepEquals(this.aNullableDouble, other.aNullableDouble) && + NativeInteropTestsPigeonUtils.deepEquals( + this.aNullableByteArray, other.aNullableByteArray) && + NativeInteropTestsPigeonUtils.deepEquals( + this.aNullable4ByteArray, other.aNullable4ByteArray) && + NativeInteropTestsPigeonUtils.deepEquals( + this.aNullable8ByteArray, other.aNullable8ByteArray) && + NativeInteropTestsPigeonUtils.deepEquals( + this.aNullableFloatArray, other.aNullableFloatArray) && + NativeInteropTestsPigeonUtils.deepEquals(this.aNullableEnum, other.aNullableEnum) && + NativeInteropTestsPigeonUtils.deepEquals( + this.anotherNullableEnum, other.anotherNullableEnum) && + NativeInteropTestsPigeonUtils.deepEquals(this.aNullableString, other.aNullableString) && + NativeInteropTestsPigeonUtils.deepEquals(this.aNullableObject, other.aNullableObject) && + NativeInteropTestsPigeonUtils.deepEquals(this.allNullableTypes, other.allNullableTypes) && + NativeInteropTestsPigeonUtils.deepEquals(this.list, other.list) && + NativeInteropTestsPigeonUtils.deepEquals(this.stringList, other.stringList) && + NativeInteropTestsPigeonUtils.deepEquals(this.intList, other.intList) && + NativeInteropTestsPigeonUtils.deepEquals(this.doubleList, other.doubleList) && + NativeInteropTestsPigeonUtils.deepEquals(this.boolList, other.boolList) && + NativeInteropTestsPigeonUtils.deepEquals(this.enumList, other.enumList) && + NativeInteropTestsPigeonUtils.deepEquals(this.objectList, other.objectList) && + NativeInteropTestsPigeonUtils.deepEquals(this.listList, other.listList) && + NativeInteropTestsPigeonUtils.deepEquals(this.mapList, other.mapList) && + NativeInteropTestsPigeonUtils.deepEquals( + this.recursiveClassList, other.recursiveClassList) && + NativeInteropTestsPigeonUtils.deepEquals(this.map, other.map) && + NativeInteropTestsPigeonUtils.deepEquals(this.stringMap, other.stringMap) && + NativeInteropTestsPigeonUtils.deepEquals(this.intMap, other.intMap) && + NativeInteropTestsPigeonUtils.deepEquals(this.enumMap, other.enumMap) && + NativeInteropTestsPigeonUtils.deepEquals(this.objectMap, other.objectMap) && + NativeInteropTestsPigeonUtils.deepEquals(this.listMap, other.listMap) && + NativeInteropTestsPigeonUtils.deepEquals(this.mapMap, other.mapMap) && + NativeInteropTestsPigeonUtils.deepEquals(this.recursiveClassMap, other.recursiveClassMap) + } + + override fun hashCode(): Int { + var result = javaClass.hashCode() + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableBool) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableInt) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableInt64) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableDouble) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableByteArray) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullable4ByteArray) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullable8ByteArray) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableFloatArray) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableEnum) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.anotherNullableEnum) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableString) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableObject) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.allNullableTypes) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.list) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.stringList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.intList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.doubleList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.boolList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.enumList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.objectList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.listList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.mapList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.recursiveClassList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.map) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.stringMap) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.intMap) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.enumMap) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.objectMap) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.listMap) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.mapMap) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.recursiveClassMap) + return result + } + + override fun toString(): String { + return "NativeInteropAllNullableTypes(aNullableBool=$aNullableBool, aNullableInt=$aNullableInt, aNullableInt64=$aNullableInt64, aNullableDouble=$aNullableDouble, aNullableByteArray=${aNullableByteArray?.contentToString()}, aNullable4ByteArray=${aNullable4ByteArray?.contentToString()}, aNullable8ByteArray=${aNullable8ByteArray?.contentToString()}, aNullableFloatArray=${aNullableFloatArray?.contentToString()}, 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)" + } +} + +/** + * The primary purpose for this class is to ensure coverage of Swift structs with nullable items, as + * the primary [NativeInteropAllNullableTypes] class is being used to test Swift classes. + * + * Generated class from Pigeon that represents data sent in messages. + */ +data class NativeInteropAllNullableTypesWithoutRecursion( + 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: NativeInteropAnEnum? = null, + val anotherNullableEnum: NativeInteropAnotherEnum? = 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): NativeInteropAllNullableTypesWithoutRecursion { + 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 NativeInteropAnEnum? + val anotherNullableEnum = pigeonVar_list[9] as NativeInteropAnotherEnum? + 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 NativeInteropAllNullableTypesWithoutRecursion( + 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 NativeInteropAllNullableTypesWithoutRecursion + return NativeInteropTestsPigeonUtils.deepEquals(this.aNullableBool, other.aNullableBool) && + NativeInteropTestsPigeonUtils.deepEquals(this.aNullableInt, other.aNullableInt) && + NativeInteropTestsPigeonUtils.deepEquals(this.aNullableInt64, other.aNullableInt64) && + NativeInteropTestsPigeonUtils.deepEquals(this.aNullableDouble, other.aNullableDouble) && + NativeInteropTestsPigeonUtils.deepEquals( + this.aNullableByteArray, other.aNullableByteArray) && + NativeInteropTestsPigeonUtils.deepEquals( + this.aNullable4ByteArray, other.aNullable4ByteArray) && + NativeInteropTestsPigeonUtils.deepEquals( + this.aNullable8ByteArray, other.aNullable8ByteArray) && + NativeInteropTestsPigeonUtils.deepEquals( + this.aNullableFloatArray, other.aNullableFloatArray) && + NativeInteropTestsPigeonUtils.deepEquals(this.aNullableEnum, other.aNullableEnum) && + NativeInteropTestsPigeonUtils.deepEquals( + this.anotherNullableEnum, other.anotherNullableEnum) && + NativeInteropTestsPigeonUtils.deepEquals(this.aNullableString, other.aNullableString) && + NativeInteropTestsPigeonUtils.deepEquals(this.aNullableObject, other.aNullableObject) && + NativeInteropTestsPigeonUtils.deepEquals(this.list, other.list) && + NativeInteropTestsPigeonUtils.deepEquals(this.stringList, other.stringList) && + NativeInteropTestsPigeonUtils.deepEquals(this.intList, other.intList) && + NativeInteropTestsPigeonUtils.deepEquals(this.doubleList, other.doubleList) && + NativeInteropTestsPigeonUtils.deepEquals(this.boolList, other.boolList) && + NativeInteropTestsPigeonUtils.deepEquals(this.enumList, other.enumList) && + NativeInteropTestsPigeonUtils.deepEquals(this.objectList, other.objectList) && + NativeInteropTestsPigeonUtils.deepEquals(this.listList, other.listList) && + NativeInteropTestsPigeonUtils.deepEquals(this.mapList, other.mapList) && + NativeInteropTestsPigeonUtils.deepEquals(this.map, other.map) && + NativeInteropTestsPigeonUtils.deepEquals(this.stringMap, other.stringMap) && + NativeInteropTestsPigeonUtils.deepEquals(this.intMap, other.intMap) && + NativeInteropTestsPigeonUtils.deepEquals(this.enumMap, other.enumMap) && + NativeInteropTestsPigeonUtils.deepEquals(this.objectMap, other.objectMap) && + NativeInteropTestsPigeonUtils.deepEquals(this.listMap, other.listMap) && + NativeInteropTestsPigeonUtils.deepEquals(this.mapMap, other.mapMap) + } + + override fun hashCode(): Int { + var result = javaClass.hashCode() + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableBool) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableInt) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableInt64) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableDouble) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableByteArray) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullable4ByteArray) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullable8ByteArray) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableFloatArray) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableEnum) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.anotherNullableEnum) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableString) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.aNullableObject) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.list) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.stringList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.intList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.doubleList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.boolList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.enumList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.objectList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.listList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.mapList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.map) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.stringMap) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.intMap) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.enumMap) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.objectMap) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.listMap) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.mapMap) + return result + } + + override fun toString(): String { + return "NativeInteropAllNullableTypesWithoutRecursion(aNullableBool=$aNullableBool, aNullableInt=$aNullableInt, aNullableInt64=$aNullableInt64, aNullableDouble=$aNullableDouble, aNullableByteArray=${aNullableByteArray?.contentToString()}, aNullable4ByteArray=${aNullable4ByteArray?.contentToString()}, aNullable8ByteArray=${aNullable8ByteArray?.contentToString()}, aNullableFloatArray=${aNullableFloatArray?.contentToString()}, 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)" + } +} + +/** + * A class for testing nested class handling. + * + * This is needed to test nested nullable and non-nullable classes, `NativeInteropAllNullableTypes` + * is non-nullable here as it is easier to instantiate than `NativeInteropAllTypes` when testing + * doesn't require both (ie. testing null classes). + * + * Generated class from Pigeon that represents data sent in messages. + */ +data class NativeInteropAllClassesWrapper( + val allNullableTypes: NativeInteropAllNullableTypes, + val allNullableTypesWithoutRecursion: NativeInteropAllNullableTypesWithoutRecursion? = null, + val allTypes: NativeInteropAllTypes? = null, + val classList: List, + val nullableClassList: List? = null, + val classMap: Map, + val nullableClassMap: Map? = null +) { + companion object { + fun fromList(pigeonVar_list: List): NativeInteropAllClassesWrapper { + val allNullableTypes = pigeonVar_list[0] as NativeInteropAllNullableTypes + val allNullableTypesWithoutRecursion = + pigeonVar_list[1] as NativeInteropAllNullableTypesWithoutRecursion? + val allTypes = pigeonVar_list[2] as NativeInteropAllTypes? + 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 NativeInteropAllClassesWrapper( + 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 NativeInteropAllClassesWrapper + return NativeInteropTestsPigeonUtils.deepEquals( + this.allNullableTypes, other.allNullableTypes) && + NativeInteropTestsPigeonUtils.deepEquals( + this.allNullableTypesWithoutRecursion, other.allNullableTypesWithoutRecursion) && + NativeInteropTestsPigeonUtils.deepEquals(this.allTypes, other.allTypes) && + NativeInteropTestsPigeonUtils.deepEquals(this.classList, other.classList) && + NativeInteropTestsPigeonUtils.deepEquals(this.nullableClassList, other.nullableClassList) && + NativeInteropTestsPigeonUtils.deepEquals(this.classMap, other.classMap) && + NativeInteropTestsPigeonUtils.deepEquals(this.nullableClassMap, other.nullableClassMap) + } + + override fun hashCode(): Int { + var result = javaClass.hashCode() + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.allNullableTypes) + result = + 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.allNullableTypesWithoutRecursion) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.allTypes) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.classList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.nullableClassList) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.classMap) + result = 31 * result + NativeInteropTestsPigeonUtils.deepHash(this.nullableClassMap) + return result + } + + override fun toString(): String { + return "NativeInteropAllClassesWrapper(allNullableTypes=$allNullableTypes, allNullableTypesWithoutRecursion=$allNullableTypesWithoutRecursion, allTypes=$allTypes, classList=$classList, nullableClassList=$nullableClassList, classMap=$classMap, nullableClassMap=$nullableClassMap)" + } +} + +val NativeInteropHostIntegrationCoreApiInstances: + MutableMap = + mutableMapOf() + +@Keep +abstract class NativeInteropHostIntegrationCoreApi { + /** 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: NativeInteropAllTypes): NativeInteropAllTypes + /** 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: NativeInteropAllClassesWrapper + ): NativeInteropAllClassesWrapper + /** Returns the passed enum to test serialization and deserialization. */ + abstract fun echoEnum(anEnum: NativeInteropAnEnum): NativeInteropAnEnum + /** Returns the passed enum to test serialization and deserialization. */ + abstract fun echoAnotherEnum(anotherEnum: NativeInteropAnotherEnum): NativeInteropAnotherEnum + /** 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: NativeInteropAllNullableTypes? + ): NativeInteropAllNullableTypes? + /** Returns the passed object, to test serialization and deserialization. */ + abstract fun echoAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ): NativeInteropAllNullableTypesWithoutRecursion? + /** + * Returns the inner `aString` value from the wrapped object, to test sending of nested objects. + */ + abstract fun extractNestedNullableString(wrapper: NativeInteropAllClassesWrapper): String? + /** + * Returns the inner `aString` value from the wrapped object, to test sending of nested objects. + */ + abstract fun createNestedNullableString(nullableString: String?): NativeInteropAllClassesWrapper + + abstract fun sendMultipleNullableTypes( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NativeInteropAllNullableTypes + /** Returns passed in arguments of multiple types. */ + abstract fun sendMultipleNullableTypesWithoutRecursion( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NativeInteropAllNullableTypesWithoutRecursion + /** 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: NativeInteropAnEnum?): NativeInteropAnEnum? + + abstract fun echoAnotherNullableEnum( + anotherEnum: NativeInteropAnotherEnum? + ): NativeInteropAnotherEnum? + /** 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: NativeInteropAnEnum): NativeInteropAnEnum + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAnotherAsyncEnum( + anotherEnum: NativeInteropAnotherEnum + ): NativeInteropAnotherEnum + /** 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 echoAsyncNativeInteropAllTypes( + everything: NativeInteropAllTypes + ): NativeInteropAllTypes + /** Returns the passed object, to test serialization and deserialization. */ + abstract suspend fun echoAsyncNullableNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypes? + ): NativeInteropAllNullableTypes? + /** Returns the passed object, to test serialization and deserialization. */ + abstract suspend fun echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ): NativeInteropAllNullableTypesWithoutRecursion? + /** 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: NativeInteropAnEnum?): NativeInteropAnEnum? + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + abstract suspend fun echoAnotherAsyncNullableEnum( + anotherEnum: NativeInteropAnotherEnum? + ): NativeInteropAnotherEnum? + + abstract fun callFlutterNoop() + + abstract fun callFlutterThrowError(): Any? + + abstract fun callFlutterThrowErrorFromVoid() + + abstract fun callFlutterEchoNativeInteropAllTypes( + everything: NativeInteropAllTypes + ): NativeInteropAllTypes + + abstract fun callFlutterEchoNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypes? + ): NativeInteropAllNullableTypes? + + abstract fun callFlutterSendMultipleNullableTypes( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NativeInteropAllNullableTypes + + abstract fun callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ): NativeInteropAllNullableTypesWithoutRecursion? + + abstract fun callFlutterSendMultipleNullableTypesWithoutRecursion( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NativeInteropAllNullableTypesWithoutRecursion + + 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: NativeInteropAnEnum): NativeInteropAnEnum + + abstract fun callFlutterEchoNativeInteropAnotherEnum( + anotherEnum: NativeInteropAnotherEnum + ): NativeInteropAnotherEnum + + 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: NativeInteropAnEnum?): NativeInteropAnEnum? + + abstract fun callFlutterEchoAnotherNullableEnum( + anotherEnum: NativeInteropAnotherEnum? + ): NativeInteropAnotherEnum? + + abstract suspend fun callFlutterNoopAsync() + + abstract suspend fun callFlutterEchoAsyncNativeInteropAllTypes( + everything: NativeInteropAllTypes + ): NativeInteropAllTypes + + abstract suspend fun callFlutterEchoAsyncNullableNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypes? + ): NativeInteropAllNullableTypes? + + abstract suspend fun callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ): NativeInteropAllNullableTypesWithoutRecursion? + + 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: NativeInteropAnEnum): NativeInteropAnEnum + + abstract suspend fun callFlutterEchoAnotherAsyncEnum( + anotherEnum: NativeInteropAnotherEnum + ): NativeInteropAnotherEnum + + 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: NativeInteropAnEnum? + ): NativeInteropAnEnum? + + abstract suspend fun callFlutterEchoAnotherAsyncNullableEnum( + anotherEnum: NativeInteropAnotherEnum? + ): NativeInteropAnotherEnum? + /** Returns true if the handler is run on a main thread. */ + abstract fun defaultIsMainThread(): Boolean + /** + * Spawns a background thread and calls `noop` on the [NativeInteropFlutterIntegrationCoreApi]. + * + * Returns the result of whether the flutter call was successful. + */ + abstract suspend fun callFlutterNoopOnBackgroundThread(): Boolean + /** Tests deregistering a Host API natively. */ + abstract fun testDeregisterHostApi(): Boolean + /** Tests deregistering a Flutter API natively. */ + abstract fun testDeregisterFlutterApi(): Boolean + /** Registers and immediately deregisters a Host API under [name]. */ + abstract fun registerAndImmediatelyDeregisterHostApi(name: String) + /** Tests that calling a deregistered Flutter API under [name] fails / returns null. */ + abstract fun testCallDeregisteredFlutterApi(name: String): Boolean +} + +@Keep +class NativeInteropHostIntegrationCoreApiRegistrar : NativeInteropHostIntegrationCoreApi() { + var api: NativeInteropHostIntegrationCoreApi? = null + + fun register( + api: NativeInteropHostIntegrationCoreApi?, + name: String = defaultInstanceName + ): NativeInteropHostIntegrationCoreApiRegistrar { + if (api != null) { + this.api = api + NativeInteropHostIntegrationCoreApiInstances[name] = this + } else { + NativeInteropHostIntegrationCoreApiInstances.remove(name) + } + return this + } + + @Keep + fun getInstance(name: String): NativeInteropHostIntegrationCoreApiRegistrar? { + return NativeInteropHostIntegrationCoreApiInstances[name] + } + /** A no-op function taking no arguments and returning no value, to sanity test basic calling. */ + override fun noop() { + api?.let { + try { + return it.noop() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test serialization and deserialization. */ + override fun echoAllTypes(everything: NativeInteropAllTypes): NativeInteropAllTypes { + api?.let { + try { + return it.echoAllTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns an error, to test error handling. */ + override fun throwError(): Any? { + api?.let { + try { + return it.throwError() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns an error from a void function, to test error handling. */ + override fun throwErrorFromVoid() { + api?.let { + try { + return it.throwErrorFromVoid() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns a Flutter error, to test error handling. */ + override fun throwFlutterError(): Any? { + api?.let { + try { + return it.throwFlutterError() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns passed in int. */ + override fun echoInt(anInt: Long): Long { + api?.let { + try { + return it.echoInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns passed in double. */ + override fun echoDouble(aDouble: Double): Double { + api?.let { + try { + return it.echoDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in boolean. */ + override fun echoBool(aBool: Boolean): Boolean { + api?.let { + try { + return it.echoBool(aBool) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in string. */ + override fun echoString(aString: String): String { + api?.let { + try { + return it.echoString(aString) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Uint8List. */ + override fun echoUint8List(aUint8List: ByteArray): ByteArray { + api?.let { + try { + return it.echoUint8List(aUint8List) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int32List. */ + override fun echoInt32List(aInt32List: IntArray): IntArray { + api?.let { + try { + return it.echoInt32List(aInt32List) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int64List. */ + override fun echoInt64List(aInt64List: LongArray): LongArray { + api?.let { + try { + return it.echoInt64List(aInt64List) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Float64List. */ + override fun echoFloat64List(aFloat64List: DoubleArray): DoubleArray { + api?.let { + try { + return it.echoFloat64List(aFloat64List) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in generic Object. */ + override fun echoObject(anObject: Any): Any { + api?.let { + try { + return it.echoObject(anObject) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoList(list: List): List { + api?.let { + try { + return it.echoList(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoStringList(stringList: List): List { + api?.let { + try { + return it.echoStringList(stringList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoIntList(intList: List): List { + api?.let { + try { + return it.echoIntList(intList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoDoubleList(doubleList: List): List { + api?.let { + try { + return it.echoDoubleList(doubleList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoBoolList(boolList: List): List { + api?.let { + try { + return it.echoBoolList(boolList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoEnumList(enumList: List): List { + api?.let { + try { + return it.echoEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoClassList( + classList: List + ): List { + api?.let { + try { + return it.echoClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNonNullEnumList(enumList: List): List { + api?.let { + try { + return it.echoNonNullEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNonNullClassList( + classList: List + ): List { + api?.let { + try { + return it.echoNonNullClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoMap(map: Map): Map { + api?.let { + try { + return it.echoMap(map) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoStringMap(stringMap: Map): Map { + api?.let { + try { + return it.echoStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoIntMap(intMap: Map): Map { + api?.let { + try { + return it.echoIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoEnumMap( + enumMap: Map + ): Map { + api?.let { + try { + return it.echoEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoClassMap( + classMap: Map + ): Map { + api?.let { + try { + return it.echoClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNonNullStringMap(stringMap: Map): Map { + api?.let { + try { + return it.echoNonNullStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNonNullIntMap(intMap: Map): Map { + api?.let { + try { + return it.echoNonNullIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNonNullEnumMap( + enumMap: Map + ): Map { + api?.let { + try { + return it.echoNonNullEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNonNullClassMap( + classMap: Map + ): Map { + api?.let { + try { + return it.echoNonNullClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed class to test nested class serialization and deserialization. */ + override fun echoClassWrapper( + wrapper: NativeInteropAllClassesWrapper + ): NativeInteropAllClassesWrapper { + api?.let { + try { + return it.echoClassWrapper(wrapper) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum to test serialization and deserialization. */ + override fun echoEnum(anEnum: NativeInteropAnEnum): NativeInteropAnEnum { + api?.let { + try { + return it.echoEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum to test serialization and deserialization. */ + override fun echoAnotherEnum(anotherEnum: NativeInteropAnotherEnum): NativeInteropAnotherEnum { + api?.let { + try { + return it.echoAnotherEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the default string. */ + override fun echoNamedDefaultString(aString: String): String { + api?.let { + try { + return it.echoNamedDefaultString(aString) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns passed in double. */ + override fun echoOptionalDefaultDouble(aDouble: Double): Double { + api?.let { + try { + return it.echoOptionalDefaultDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns passed in int. */ + override fun echoRequiredInt(anInt: Long): Long { + api?.let { + try { + return it.echoRequiredInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test serialization and deserialization. */ + override fun echoAllNullableTypes( + everything: NativeInteropAllNullableTypes? + ): NativeInteropAllNullableTypes? { + api?.let { + try { + return it.echoAllNullableTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test serialization and deserialization. */ + override fun echoAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ): NativeInteropAllNullableTypesWithoutRecursion? { + api?.let { + try { + return it.echoAllNullableTypesWithoutRecursion(everything) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** + * Returns the inner `aString` value from the wrapped object, to test sending of nested objects. + */ + override fun extractNestedNullableString(wrapper: NativeInteropAllClassesWrapper): String? { + api?.let { + try { + return it.extractNestedNullableString(wrapper) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** + * Returns the inner `aString` value from the wrapped object, to test sending of nested objects. + */ + override fun createNestedNullableString(nullableString: String?): NativeInteropAllClassesWrapper { + api?.let { + try { + return it.createNestedNullableString(nullableString) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun sendMultipleNullableTypes( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NativeInteropAllNullableTypes { + api?.let { + try { + return it.sendMultipleNullableTypes(aNullableBool, aNullableInt, aNullableString) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns passed in arguments of multiple types. */ + override fun sendMultipleNullableTypesWithoutRecursion( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NativeInteropAllNullableTypesWithoutRecursion { + api?.let { + try { + return it.sendMultipleNullableTypesWithoutRecursion( + aNullableBool, aNullableInt, aNullableString) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns passed in int. */ + override fun echoNullableInt(aNullableInt: Long?): Long? { + api?.let { + try { + return it.echoNullableInt(aNullableInt) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns passed in double. */ + override fun echoNullableDouble(aNullableDouble: Double?): Double? { + api?.let { + try { + return it.echoNullableDouble(aNullableDouble) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in boolean. */ + override fun echoNullableBool(aNullableBool: Boolean?): Boolean? { + api?.let { + try { + return it.echoNullableBool(aNullableBool) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in string. */ + override fun echoNullableString(aNullableString: String?): String? { + api?.let { + try { + return it.echoNullableString(aNullableString) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Uint8List. */ + override fun echoNullableUint8List(aNullableUint8List: ByteArray?): ByteArray? { + api?.let { + try { + return it.echoNullableUint8List(aNullableUint8List) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int32List. */ + override fun echoNullableInt32List(aNullableInt32List: IntArray?): IntArray? { + api?.let { + try { + return it.echoNullableInt32List(aNullableInt32List) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int64List. */ + override fun echoNullableInt64List(aNullableInt64List: LongArray?): LongArray? { + api?.let { + try { + return it.echoNullableInt64List(aNullableInt64List) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Float64List. */ + override fun echoNullableFloat64List(aNullableFloat64List: DoubleArray?): DoubleArray? { + api?.let { + try { + return it.echoNullableFloat64List(aNullableFloat64List) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in generic Object. */ + override fun echoNullableObject(aNullableObject: Any?): Any? { + api?.let { + try { + return it.echoNullableObject(aNullableObject) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNullableList(aNullableList: List?): List? { + api?.let { + try { + return it.echoNullableList(aNullableList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNullableEnumList( + enumList: List? + ): List? { + api?.let { + try { + return it.echoNullableEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNullableClassList( + classList: List? + ): List? { + api?.let { + try { + return it.echoNullableClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNullableNonNullEnumList( + enumList: List? + ): List? { + api?.let { + try { + return it.echoNullableNonNullEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed list, to test serialization and deserialization. */ + override fun echoNullableNonNullClassList( + classList: List? + ): List? { + api?.let { + try { + return it.echoNullableNonNullClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableMap(map: Map?): Map? { + api?.let { + try { + return it.echoNullableMap(map) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableStringMap(stringMap: Map?): Map? { + api?.let { + try { + return it.echoNullableStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableIntMap(intMap: Map?): Map? { + api?.let { + try { + return it.echoNullableIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableEnumMap( + enumMap: Map? + ): Map? { + api?.let { + try { + return it.echoNullableEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableClassMap( + classMap: Map? + ): Map? { + api?.let { + try { + return it.echoNullableClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableNonNullStringMap(stringMap: Map?): Map? { + api?.let { + try { + return it.echoNullableNonNullStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableNonNullIntMap(intMap: Map?): Map? { + api?.let { + try { + return it.echoNullableNonNullIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableNonNullEnumMap( + enumMap: Map? + ): Map? { + api?.let { + try { + return it.echoNullableNonNullEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed map, to test serialization and deserialization. */ + override fun echoNullableNonNullClassMap( + classMap: Map? + ): Map? { + api?.let { + try { + return it.echoNullableNonNullClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun echoNullableEnum(anEnum: NativeInteropAnEnum?): NativeInteropAnEnum? { + api?.let { + try { + return it.echoNullableEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun echoAnotherNullableEnum( + anotherEnum: NativeInteropAnotherEnum? + ): NativeInteropAnotherEnum? { + api?.let { + try { + return it.echoAnotherNullableEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns passed in int. */ + override fun echoOptionalNullableInt(aNullableInt: Long?): Long? { + api?.let { + try { + return it.echoOptionalNullableInt(aNullableInt) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in string. */ + override fun echoNamedNullableString(aNullableString: String?): String? { + api?.let { + try { + return it.echoNamedNullableString(aNullableString) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.noopAsync() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns passed in int asynchronously. */ + override suspend fun echoAsyncInt(anInt: Long): Long { + api?.let { + try { + return it.echoAsyncInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns passed in double asynchronously. */ + override suspend fun echoAsyncDouble(aDouble: Double): Double { + api?.let { + try { + return it.echoAsyncDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in boolean asynchronously. */ + override suspend fun echoAsyncBool(aBool: Boolean): Boolean { + api?.let { + try { + return it.echoAsyncBool(aBool) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed string asynchronously. */ + override suspend fun echoAsyncString(aString: String): String { + api?.let { + try { + return it.echoAsyncString(aString) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Uint8List asynchronously. */ + override suspend fun echoAsyncUint8List(aUint8List: ByteArray): ByteArray { + api?.let { + try { + return it.echoAsyncUint8List(aUint8List) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int32List asynchronously. */ + override suspend fun echoAsyncInt32List(aInt32List: IntArray): IntArray { + api?.let { + try { + return it.echoAsyncInt32List(aInt32List) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int64List asynchronously. */ + override suspend fun echoAsyncInt64List(aInt64List: LongArray): LongArray { + api?.let { + try { + return it.echoAsyncInt64List(aInt64List) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Float64List asynchronously. */ + override suspend fun echoAsyncFloat64List(aFloat64List: DoubleArray): DoubleArray { + api?.let { + try { + return it.echoAsyncFloat64List(aFloat64List) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in generic Object asynchronously. */ + override suspend fun echoAsyncObject(anObject: Any): Any { + api?.let { + try { + return it.echoAsyncObject(anObject) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.echoAsyncList(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.echoAsyncEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.echoAsyncClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.echoAsyncMap(map) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.echoAsyncStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.echoAsyncIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.echoAsyncEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.echoAsyncClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncEnum(anEnum: NativeInteropAnEnum): NativeInteropAnEnum { + api?.let { + try { + return it.echoAsyncEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + override suspend fun echoAnotherAsyncEnum( + anotherEnum: NativeInteropAnotherEnum + ): NativeInteropAnotherEnum { + api?.let { + try { + return it.echoAnotherAsyncEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Responds with an error from an async function returning a value. */ + override suspend fun throwAsyncError(): Any? { + api?.let { + try { + return it.throwAsyncError() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Responds with an error from an async void function. */ + override suspend fun throwAsyncErrorFromVoid() { + api?.let { + try { + return it.throwAsyncErrorFromVoid() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.throwAsyncFlutterError() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test async serialization and deserialization. */ + override suspend fun echoAsyncNativeInteropAllTypes( + everything: NativeInteropAllTypes + ): NativeInteropAllTypes { + api?.let { + try { + return it.echoAsyncNativeInteropAllTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test serialization and deserialization. */ + override suspend fun echoAsyncNullableNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypes? + ): NativeInteropAllNullableTypes? { + api?.let { + try { + return it.echoAsyncNullableNativeInteropAllNullableTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed object, to test serialization and deserialization. */ + override suspend fun echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ): NativeInteropAllNullableTypesWithoutRecursion? { + api?.let { + try { + return it.echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion(everything) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns passed in int asynchronously. */ + override suspend fun echoAsyncNullableInt(anInt: Long?): Long? { + api?.let { + try { + return it.echoAsyncNullableInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns passed in double asynchronously. */ + override suspend fun echoAsyncNullableDouble(aDouble: Double?): Double? { + api?.let { + try { + return it.echoAsyncNullableDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in boolean asynchronously. */ + override suspend fun echoAsyncNullableBool(aBool: Boolean?): Boolean? { + api?.let { + try { + return it.echoAsyncNullableBool(aBool) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed string asynchronously. */ + override suspend fun echoAsyncNullableString(aString: String?): String? { + api?.let { + try { + return it.echoAsyncNullableString(aString) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Uint8List asynchronously. */ + override suspend fun echoAsyncNullableUint8List(aUint8List: ByteArray?): ByteArray? { + api?.let { + try { + return it.echoAsyncNullableUint8List(aUint8List) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int32List asynchronously. */ + override suspend fun echoAsyncNullableInt32List(aInt32List: IntArray?): IntArray? { + api?.let { + try { + return it.echoAsyncNullableInt32List(aInt32List) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Int64List asynchronously. */ + override suspend fun echoAsyncNullableInt64List(aInt64List: LongArray?): LongArray? { + api?.let { + try { + return it.echoAsyncNullableInt64List(aInt64List) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in Float64List asynchronously. */ + override suspend fun echoAsyncNullableFloat64List(aFloat64List: DoubleArray?): DoubleArray? { + api?.let { + try { + return it.echoAsyncNullableFloat64List(aFloat64List) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed in generic Object asynchronously. */ + override suspend fun echoAsyncNullableObject(anObject: Any?): Any? { + api?.let { + try { + return it.echoAsyncNullableObject(anObject) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.echoAsyncNullableList(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.echoAsyncNullableEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.echoAsyncNullableClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.echoAsyncNullableMap(map) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.echoAsyncNullableStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.echoAsyncNullableIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.echoAsyncNullableEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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 it.echoAsyncNullableClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + override suspend fun echoAsyncNullableEnum(anEnum: NativeInteropAnEnum?): NativeInteropAnEnum? { + api?.let { + try { + return it.echoAsyncNullableEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns the passed enum, to test asynchronous serialization and deserialization. */ + override suspend fun echoAnotherAsyncNullableEnum( + anotherEnum: NativeInteropAnotherEnum? + ): NativeInteropAnotherEnum? { + api?.let { + try { + return it.echoAnotherAsyncNullableEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterNoop() { + api?.let { + try { + return it.callFlutterNoop() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterThrowError(): Any? { + api?.let { + try { + return it.callFlutterThrowError() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterThrowErrorFromVoid() { + api?.let { + try { + return it.callFlutterThrowErrorFromVoid() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNativeInteropAllTypes( + everything: NativeInteropAllTypes + ): NativeInteropAllTypes { + api?.let { + try { + return it.callFlutterEchoNativeInteropAllTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypes? + ): NativeInteropAllNullableTypes? { + api?.let { + try { + return it.callFlutterEchoNativeInteropAllNullableTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterSendMultipleNullableTypes( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NativeInteropAllNullableTypes { + api?.let { + try { + return it.callFlutterSendMultipleNullableTypes(aNullableBool, aNullableInt, aNullableString) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ): NativeInteropAllNullableTypesWithoutRecursion? { + api?.let { + try { + return it.callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion(everything) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterSendMultipleNullableTypesWithoutRecursion( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NativeInteropAllNullableTypesWithoutRecursion { + api?.let { + try { + return it.callFlutterSendMultipleNullableTypesWithoutRecursion( + aNullableBool, aNullableInt, aNullableString) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoBool(aBool: Boolean): Boolean { + api?.let { + try { + return it.callFlutterEchoBool(aBool) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoInt(anInt: Long): Long { + api?.let { + try { + return it.callFlutterEchoInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoDouble(aDouble: Double): Double { + api?.let { + try { + return it.callFlutterEchoDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoString(aString: String): String { + api?.let { + try { + return it.callFlutterEchoString(aString) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoUint8List(list: ByteArray): ByteArray { + api?.let { + try { + return it.callFlutterEchoUint8List(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoInt32List(list: IntArray): IntArray { + api?.let { + try { + return it.callFlutterEchoInt32List(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoInt64List(list: LongArray): LongArray { + api?.let { + try { + return it.callFlutterEchoInt64List(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoFloat64List(list: DoubleArray): DoubleArray { + api?.let { + try { + return it.callFlutterEchoFloat64List(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoList(list: List): List { + api?.let { + try { + return it.callFlutterEchoList(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoEnumList( + enumList: List + ): List { + api?.let { + try { + return it.callFlutterEchoEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoClassList( + classList: List + ): List { + api?.let { + try { + return it.callFlutterEchoClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNonNullEnumList( + enumList: List + ): List { + api?.let { + try { + return it.callFlutterEchoNonNullEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNonNullClassList( + classList: List + ): List { + api?.let { + try { + return it.callFlutterEchoNonNullClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoMap(map: Map): Map { + api?.let { + try { + return it.callFlutterEchoMap(map) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoStringMap(stringMap: Map): Map { + api?.let { + try { + return it.callFlutterEchoStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoIntMap(intMap: Map): Map { + api?.let { + try { + return it.callFlutterEchoIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoEnumMap( + enumMap: Map + ): Map { + api?.let { + try { + return it.callFlutterEchoEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoClassMap( + classMap: Map + ): Map { + api?.let { + try { + return it.callFlutterEchoClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNonNullStringMap( + stringMap: Map + ): Map { + api?.let { + try { + return it.callFlutterEchoNonNullStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNonNullIntMap(intMap: Map): Map { + api?.let { + try { + return it.callFlutterEchoNonNullIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNonNullEnumMap( + enumMap: Map + ): Map { + api?.let { + try { + return it.callFlutterEchoNonNullEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNonNullClassMap( + classMap: Map + ): Map { + api?.let { + try { + return it.callFlutterEchoNonNullClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoEnum(anEnum: NativeInteropAnEnum): NativeInteropAnEnum { + api?.let { + try { + return it.callFlutterEchoEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNativeInteropAnotherEnum( + anotherEnum: NativeInteropAnotherEnum + ): NativeInteropAnotherEnum { + api?.let { + try { + return it.callFlutterEchoNativeInteropAnotherEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableBool(aBool: Boolean?): Boolean? { + api?.let { + try { + return it.callFlutterEchoNullableBool(aBool) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableInt(anInt: Long?): Long? { + api?.let { + try { + return it.callFlutterEchoNullableInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableDouble(aDouble: Double?): Double? { + api?.let { + try { + return it.callFlutterEchoNullableDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableString(aString: String?): String? { + api?.let { + try { + return it.callFlutterEchoNullableString(aString) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableUint8List(list: ByteArray?): ByteArray? { + api?.let { + try { + return it.callFlutterEchoNullableUint8List(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableInt32List(list: IntArray?): IntArray? { + api?.let { + try { + return it.callFlutterEchoNullableInt32List(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableInt64List(list: LongArray?): LongArray? { + api?.let { + try { + return it.callFlutterEchoNullableInt64List(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableFloat64List(list: DoubleArray?): DoubleArray? { + api?.let { + try { + return it.callFlutterEchoNullableFloat64List(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableList(list: List?): List? { + api?.let { + try { + return it.callFlutterEchoNullableList(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableEnumList( + enumList: List? + ): List? { + api?.let { + try { + return it.callFlutterEchoNullableEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableClassList( + classList: List? + ): List? { + api?.let { + try { + return it.callFlutterEchoNullableClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableNonNullEnumList( + enumList: List? + ): List? { + api?.let { + try { + return it.callFlutterEchoNullableNonNullEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableNonNullClassList( + classList: List? + ): List? { + api?.let { + try { + return it.callFlutterEchoNullableNonNullClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableMap(map: Map?): Map? { + api?.let { + try { + return it.callFlutterEchoNullableMap(map) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableStringMap( + stringMap: Map? + ): Map? { + api?.let { + try { + return it.callFlutterEchoNullableStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableIntMap(intMap: Map?): Map? { + api?.let { + try { + return it.callFlutterEchoNullableIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableEnumMap( + enumMap: Map? + ): Map? { + api?.let { + try { + return it.callFlutterEchoNullableEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableClassMap( + classMap: Map? + ): Map? { + api?.let { + try { + return it.callFlutterEchoNullableClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableNonNullStringMap( + stringMap: Map? + ): Map? { + api?.let { + try { + return it.callFlutterEchoNullableNonNullStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableNonNullIntMap(intMap: Map?): Map? { + api?.let { + try { + return it.callFlutterEchoNullableNonNullIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableNonNullEnumMap( + enumMap: Map? + ): Map? { + api?.let { + try { + return it.callFlutterEchoNullableNonNullEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableNonNullClassMap( + classMap: Map? + ): Map? { + api?.let { + try { + return it.callFlutterEchoNullableNonNullClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoNullableEnum(anEnum: NativeInteropAnEnum?): NativeInteropAnEnum? { + api?.let { + try { + return it.callFlutterEchoNullableEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override fun callFlutterEchoAnotherNullableEnum( + anotherEnum: NativeInteropAnotherEnum? + ): NativeInteropAnotherEnum? { + api?.let { + try { + return it.callFlutterEchoAnotherNullableEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterNoopAsync() { + api?.let { + try { + return it.callFlutterNoopAsync() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNativeInteropAllTypes( + everything: NativeInteropAllTypes + ): NativeInteropAllTypes { + api?.let { + try { + return it.callFlutterEchoAsyncNativeInteropAllTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypes? + ): NativeInteropAllNullableTypes? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableNativeInteropAllNullableTypes(everything) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ): NativeInteropAllNullableTypesWithoutRecursion? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncBool(aBool: Boolean): Boolean { + api?.let { + try { + return it.callFlutterEchoAsyncBool(aBool) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncInt(anInt: Long): Long { + api?.let { + try { + return it.callFlutterEchoAsyncInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncDouble(aDouble: Double): Double { + api?.let { + try { + return it.callFlutterEchoAsyncDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncString(aString: String): String { + api?.let { + try { + return it.callFlutterEchoAsyncString(aString) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncUint8List(list: ByteArray): ByteArray { + api?.let { + try { + return it.callFlutterEchoAsyncUint8List(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncInt32List(list: IntArray): IntArray { + api?.let { + try { + return it.callFlutterEchoAsyncInt32List(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncInt64List(list: LongArray): LongArray { + api?.let { + try { + return it.callFlutterEchoAsyncInt64List(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncFloat64List(list: DoubleArray): DoubleArray { + api?.let { + try { + return it.callFlutterEchoAsyncFloat64List(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncObject(anObject: Any): Any { + api?.let { + try { + return it.callFlutterEchoAsyncObject(anObject) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncList(list: List): List { + api?.let { + try { + return it.callFlutterEchoAsyncList(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncEnumList( + enumList: List + ): List { + api?.let { + try { + return it.callFlutterEchoAsyncEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncClassList( + classList: List + ): List { + api?.let { + try { + return it.callFlutterEchoAsyncClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNonNullEnumList( + enumList: List + ): List { + api?.let { + try { + return it.callFlutterEchoAsyncNonNullEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNonNullClassList( + classList: List + ): List { + api?.let { + try { + return it.callFlutterEchoAsyncNonNullClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncMap(map: Map): Map { + api?.let { + try { + return it.callFlutterEchoAsyncMap(map) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncStringMap( + stringMap: Map + ): Map { + api?.let { + try { + return it.callFlutterEchoAsyncStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncIntMap(intMap: Map): Map { + api?.let { + try { + return it.callFlutterEchoAsyncIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncEnumMap( + enumMap: Map + ): Map { + api?.let { + try { + return it.callFlutterEchoAsyncEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncClassMap( + classMap: Map + ): Map { + api?.let { + try { + return it.callFlutterEchoAsyncClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncEnum(anEnum: NativeInteropAnEnum): NativeInteropAnEnum { + api?.let { + try { + return it.callFlutterEchoAsyncEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAnotherAsyncEnum( + anotherEnum: NativeInteropAnotherEnum + ): NativeInteropAnotherEnum { + api?.let { + try { + return it.callFlutterEchoAnotherAsyncEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableBool(aBool: Boolean?): Boolean? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableBool(aBool) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableInt(anInt: Long?): Long? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableInt(anInt) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableDouble(aDouble: Double?): Double? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableDouble(aDouble) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableString(aString: String?): String? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableString(aString) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableUint8List(list: ByteArray?): ByteArray? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableUint8List(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableInt32List(list: IntArray?): IntArray? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableInt32List(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableInt64List(list: LongArray?): LongArray? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableInt64List(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableFloat64List(list: DoubleArray?): DoubleArray? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableFloat64List(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterThrowFlutterErrorAsync(): Any? { + api?.let { + try { + return it.callFlutterThrowFlutterErrorAsync() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableObject(anObject: Any?): Any? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableObject(anObject) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableList(list: List?): List? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableList(list) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableEnumList( + enumList: List? + ): List? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableClassList( + classList: List? + ): List? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableNonNullEnumList( + enumList: List? + ): List? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableNonNullEnumList(enumList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableNonNullClassList( + classList: List? + ): List? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableNonNullClassList(classList) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableMap(map: Map?): Map? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableMap(map) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableStringMap( + stringMap: Map? + ): Map? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableStringMap(stringMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableIntMap( + intMap: Map? + ): Map? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableIntMap(intMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableEnumMap( + enumMap: Map? + ): Map? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableEnumMap(enumMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableClassMap( + classMap: Map? + ): Map? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableClassMap(classMap) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAsyncNullableEnum( + anEnum: NativeInteropAnEnum? + ): NativeInteropAnEnum? { + api?.let { + try { + return it.callFlutterEchoAsyncNullableEnum(anEnum) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + + override suspend fun callFlutterEchoAnotherAsyncNullableEnum( + anotherEnum: NativeInteropAnotherEnum? + ): NativeInteropAnotherEnum? { + api?.let { + try { + return it.callFlutterEchoAnotherAsyncNullableEnum(anotherEnum) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Returns true if the handler is run on a main thread. */ + override fun defaultIsMainThread(): Boolean { + api?.let { + try { + return it.defaultIsMainThread() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** + * Spawns a background thread and calls `noop` on the [NativeInteropFlutterIntegrationCoreApi]. + * + * Returns the result of whether the flutter call was successful. + */ + override suspend fun callFlutterNoopOnBackgroundThread(): Boolean { + api?.let { + try { + return it.callFlutterNoopOnBackgroundThread() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Tests deregistering a Host API natively. */ + override fun testDeregisterHostApi(): Boolean { + api?.let { + try { + return it.testDeregisterHostApi() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Tests deregistering a Flutter API natively. */ + override fun testDeregisterFlutterApi(): Boolean { + api?.let { + try { + return it.testDeregisterFlutterApi() + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Registers and immediately deregisters a Host API under [name]. */ + override fun registerAndImmediatelyDeregisterHostApi(name: String) { + api?.let { + try { + return it.registerAndImmediatelyDeregisterHostApi(name) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi has not been set") + } + /** Tests that calling a deregistered Flutter API under [name] fails / returns null. */ + override fun testCallDeregisteredFlutterApi(name: String): Boolean { + api?.let { + try { + return it.testCallDeregisteredFlutterApi(name) + } catch (e: Exception) { + throw e + } + } + error("NativeInteropHostIntegrationCoreApi 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. + */ +/// Map that stores instances +val registeredNativeInteropFlutterIntegrationCoreApi: + MutableMap = + mutableMapOf() + +/// Class that stores instances +class NativeInteropFlutterIntegrationCoreApiRegistrar() { + + /// Registers an instance with the given name. + fun registerInstance( + api: NativeInteropFlutterIntegrationCoreApi?, + name: String = defaultInstanceName + ) { + if (api != null) { + registeredNativeInteropFlutterIntegrationCoreApi[name] = api + } else { + registeredNativeInteropFlutterIntegrationCoreApi.remove(name) + } + } + + /// Gets an instance with the given name. + fun getInstance(name: String = defaultInstanceName): NativeInteropFlutterIntegrationCoreApi? { + return registeredNativeInteropFlutterIntegrationCoreApi[name] + } +} + +interface NativeInteropFlutterIntegrationCoreApi { + /** 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 echoNativeInteropAllTypes(everything: NativeInteropAllTypes): NativeInteropAllTypes + /** Returns the passed object, to test serialization and deserialization. */ + fun echoNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypes? + ): NativeInteropAllNullableTypes? + /** + * Returns passed in arguments of multiple types. + * + * Tests multiple-arity FlutterApi handling. + */ + fun sendMultipleNullableTypes( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NativeInteropAllNullableTypes + /** Returns the passed object, to test serialization and deserialization. */ + fun echoNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ): NativeInteropAllNullableTypesWithoutRecursion? + /** + * Returns passed in arguments of multiple types. + * + * Tests multiple-arity FlutterApi handling. + */ + fun sendMultipleNullableTypesWithoutRecursion( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NativeInteropAllNullableTypesWithoutRecursion + /** 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: NativeInteropAnEnum): NativeInteropAnEnum + /** Returns the passed enum to test serialization and deserialization. */ + fun echoNativeInteropAnotherEnum(anotherEnum: NativeInteropAnotherEnum): NativeInteropAnotherEnum + /** 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: NativeInteropAnEnum?): NativeInteropAnEnum? + /** Returns the passed enum to test serialization and deserialization. */ + fun echoAnotherNullableEnum(anotherEnum: NativeInteropAnotherEnum?): NativeInteropAnotherEnum? + /** + * 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 echoAsyncNativeInteropAllTypes( + everything: NativeInteropAllTypes + ): NativeInteropAllTypes + + suspend fun echoAsyncNullableNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypes? + ): NativeInteropAllNullableTypes? + + suspend fun echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ): NativeInteropAllNullableTypesWithoutRecursion? + + 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: NativeInteropAnEnum): NativeInteropAnEnum + + suspend fun echoAnotherAsyncEnum(anotherEnum: NativeInteropAnotherEnum): NativeInteropAnotherEnum + + 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: NativeInteropAnEnum?): NativeInteropAnEnum? + + suspend fun echoAnotherAsyncNullableEnum( + anotherEnum: NativeInteropAnotherEnum? + ): NativeInteropAnotherEnum? +} 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 8373ef71335b..6f79588cb333 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 @@ -8,6 +8,8 @@ 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 +17,9 @@ class TestPlugin : FlutterPlugin, HostIntegrationCoreApi { private var flutterSmallApiOne: FlutterSmallApi? = null private var flutterSmallApiTwo: FlutterSmallApi? = null private var proxyApiRegistrar: ProxyApiRegistrar? = null + private var niMessageApi: NativeInteropHostIntegrationCoreApiRegistrar? = null + // private var niSmallApiOne: NIHostSmallApiRegistrar? = null + // private var niSmallApiTwo: NIHostSmallApiRegistrar? = null override fun onAttachedToEngine(binding: FlutterPluginBinding) { HostIntegrationCoreApi.setUp(binding.binaryMessenger, this) @@ -22,6 +27,8 @@ class TestPlugin : FlutterPlugin, HostIntegrationCoreApi { testSuffixApiOne.setUp(binding, "suffixOne") val testSuffixApiTwo = TestPluginWithSuffix() testSuffixApiTwo.setUp(binding, "suffixTwo") + niMessageApi = + NativeInteropHostIntegrationCoreApiRegistrar().register(NativeInteropIntegrationTests()) flutterApi = FlutterIntegrationCoreApi(binding.binaryMessenger) flutterSmallApiOne = FlutterSmallApi(binding.binaryMessenger, "suffixOne") flutterSmallApiTwo = FlutterSmallApi(binding.binaryMessenger, "suffixTwo") @@ -37,7 +44,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 +80,7 @@ class TestPlugin : FlutterPlugin, HostIntegrationCoreApi { return everything } - override fun throwError(): Any? { + override fun throwError(): Any { throw Exception("An error") } @@ -81,7 +88,7 @@ class TestPlugin : FlutterPlugin, HostIntegrationCoreApi { throw Exception("An error") } - override fun throwFlutterError(): Any? { + override fun throwFlutterError(): Any { throw FlutterError("code", "message", "details") } @@ -915,6 +922,1262 @@ class TestPluginWithSuffix : HostSmallApi { } } +class NativeInteropIntegrationTests : NativeInteropHostIntegrationCoreApi() { + override fun noop() {} + + override fun echoAllTypes(everything: NativeInteropAllTypes): NativeInteropAllTypes { + return everything + } + + override fun throwError(): Any? { + throw Exception("An error") + } + + override fun throwErrorFromVoid() { + throw Exception("An error") + } + + override fun throwFlutterError(): Any? { + throw NativeInteropTestsError("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: NativeInteropAllClassesWrapper + ): NativeInteropAllClassesWrapper { + return wrapper + } + + override fun echoEnum(anEnum: NativeInteropAnEnum): NativeInteropAnEnum { + return anEnum + } + + override fun echoAnotherEnum(anotherEnum: NativeInteropAnotherEnum): NativeInteropAnotherEnum { + 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: NativeInteropAllNullableTypes? + ): NativeInteropAllNullableTypes? { + return everything + } + + override fun echoAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ): NativeInteropAllNullableTypesWithoutRecursion? { + return everything + } + + override fun extractNestedNullableString(wrapper: NativeInteropAllClassesWrapper): String? { + return wrapper.allNullableTypes.aNullableString + } + + override fun createNestedNullableString(nullableString: String?): NativeInteropAllClassesWrapper { + return NativeInteropAllClassesWrapper( + NativeInteropAllNullableTypes(aNullableString = nullableString), + classList = arrayOf().toList(), + classMap = HashMap()) + } + + override fun sendMultipleNullableTypes( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NativeInteropAllNullableTypes { + return NativeInteropAllNullableTypes( + aNullableBool = aNullableBool, + aNullableInt = aNullableInt, + aNullableString = aNullableString) + } + + override fun sendMultipleNullableTypesWithoutRecursion( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NativeInteropAllNullableTypesWithoutRecursion { + return NativeInteropAllNullableTypesWithoutRecursion( + 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: NativeInteropAnEnum?): NativeInteropAnEnum? { + return anEnum + } + + override fun echoAnotherNullableEnum( + anotherEnum: NativeInteropAnotherEnum? + ): NativeInteropAnotherEnum? { + 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: NativeInteropAnEnum): NativeInteropAnEnum { + return anEnum + } + + override suspend fun echoAnotherAsyncEnum( + anotherEnum: NativeInteropAnotherEnum + ): NativeInteropAnotherEnum { + 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 NativeInteropTestsError("code", "message", "details") + } + + override suspend fun echoAsyncNativeInteropAllTypes( + everything: NativeInteropAllTypes + ): NativeInteropAllTypes { + return everything + } + + override suspend fun echoAsyncNullableNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypes? + ): NativeInteropAllNullableTypes? { + return everything + } + + override suspend fun echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ): NativeInteropAllNullableTypesWithoutRecursion? { + 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: NativeInteropAnEnum?): NativeInteropAnEnum? { + return anEnum + } + + override suspend fun echoAnotherAsyncNullableEnum( + anotherEnum: NativeInteropAnotherEnum? + ): NativeInteropAnotherEnum? { + return anotherEnum + } + + override fun callFlutterNoop() { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.noop() + } + + override fun callFlutterThrowError(): Any? { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.throwError() + } + + override fun callFlutterThrowErrorFromVoid() { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.throwErrorFromVoid() + } + + override fun callFlutterEchoNativeInteropAllTypes( + everything: NativeInteropAllTypes + ): NativeInteropAllTypes { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNativeInteropAllTypes(everything) + } + + override fun callFlutterEchoNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypes? + ): NativeInteropAllNullableTypes? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNativeInteropAllNullableTypes(everything) + } + + override fun callFlutterSendMultipleNullableTypes( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NativeInteropAllNullableTypes { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .sendMultipleNullableTypes(aNullableBool, aNullableInt, aNullableString) + } + + override fun callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ): NativeInteropAllNullableTypesWithoutRecursion? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNativeInteropAllNullableTypesWithoutRecursion(everything) + } + + override fun callFlutterSendMultipleNullableTypesWithoutRecursion( + aNullableBool: Boolean?, + aNullableInt: Long?, + aNullableString: String? + ): NativeInteropAllNullableTypesWithoutRecursion { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .sendMultipleNullableTypesWithoutRecursion(aNullableBool, aNullableInt, aNullableString) + } + + override fun callFlutterEchoBool(aBool: Boolean): Boolean { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoBool(aBool) + } + + override fun callFlutterEchoInt(anInt: Long): Long { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoInt(anInt) + } + + override fun callFlutterEchoDouble(aDouble: Double): Double { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoDouble(aDouble) + } + // + override fun callFlutterEchoString(aString: String): String { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoString(aString) + } + + override fun callFlutterEchoUint8List(list: ByteArray): ByteArray { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoUint8List(list) + } + + override fun callFlutterEchoInt32List(list: IntArray): IntArray { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoInt32List(list) + } + + override fun callFlutterEchoInt64List(list: LongArray): LongArray { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoInt64List(list) + } + + override fun callFlutterEchoFloat64List(list: DoubleArray): DoubleArray { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoFloat64List(list) + } + + override fun callFlutterEchoList(list: List): List { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoList(list) + } + + override fun callFlutterEchoEnumList( + enumList: List + ): List { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoEnumList(enumList) + } + + override fun callFlutterEchoClassList( + classList: List + ): List { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoClassList(classList) + } + + override fun callFlutterEchoNonNullEnumList( + enumList: List + ): List { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNonNullEnumList(enumList) + } + + override fun callFlutterEchoNonNullClassList( + classList: List + ): List { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNonNullClassList(classList) + } + + override fun callFlutterEchoMap(map: Map): Map { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoMap(map) + } + + override fun callFlutterEchoStringMap(stringMap: Map): Map { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoStringMap(stringMap) + } + + override fun callFlutterEchoIntMap(intMap: Map): Map { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoIntMap(intMap) + } + + override fun callFlutterEchoEnumMap( + enumMap: Map + ): Map { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoEnumMap(enumMap) + } + + override fun callFlutterEchoClassMap( + classMap: Map + ): Map { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoClassMap(classMap) + } + + override fun callFlutterEchoNonNullStringMap( + stringMap: Map + ): Map { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNonNullStringMap(stringMap) + } + + override fun callFlutterEchoNonNullIntMap(intMap: Map): Map { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNonNullIntMap(intMap) + } + + override fun callFlutterEchoNonNullEnumMap( + enumMap: Map + ): Map { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNonNullEnumMap(enumMap) + } + + override fun callFlutterEchoNonNullClassMap( + classMap: Map + ): Map { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNonNullClassMap(classMap) + } + + override fun callFlutterEchoEnum(anEnum: NativeInteropAnEnum): NativeInteropAnEnum { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoEnum(anEnum) + } + + override fun callFlutterEchoNativeInteropAnotherEnum( + anotherEnum: NativeInteropAnotherEnum + ): NativeInteropAnotherEnum { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNativeInteropAnotherEnum(anotherEnum) + } + + override fun callFlutterEchoNullableBool(aBool: Boolean?): Boolean? { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableBool(aBool) + } + + override fun callFlutterEchoNullableInt(anInt: Long?): Long? { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableInt(anInt) + } + + override fun callFlutterEchoNullableDouble(aDouble: Double?): Double? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableDouble(aDouble) + } + + override fun callFlutterEchoNullableString(aString: String?): String? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableString(aString) + } + + override fun callFlutterEchoNullableUint8List(list: ByteArray?): ByteArray? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableUint8List(list) + } + + override fun callFlutterEchoNullableInt32List(list: IntArray?): IntArray? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableInt32List(list) + } + + override fun callFlutterEchoNullableInt64List(list: LongArray?): LongArray? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableInt64List(list) + } + + override fun callFlutterEchoNullableFloat64List(list: DoubleArray?): DoubleArray? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableFloat64List(list) + } + + override fun callFlutterEchoNullableList(list: List?): List? { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableList(list) + } + + override fun callFlutterEchoNullableEnumList( + enumList: List? + ): List? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableEnumList(enumList) + } + + override fun callFlutterEchoNullableClassList( + classList: List? + ): List? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableClassList(classList) + } + + override fun callFlutterEchoNullableNonNullEnumList( + enumList: List? + ): List? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableNonNullEnumList(enumList) + } + + override fun callFlutterEchoNullableNonNullClassList( + classList: List? + ): List? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableNonNullClassList(classList) + } + + override fun callFlutterEchoNullableMap(map: Map?): Map? { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoNullableMap(map) + } + + override fun callFlutterEchoNullableStringMap( + stringMap: Map? + ): Map? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableStringMap(stringMap) + } + + override fun callFlutterEchoNullableIntMap(intMap: Map?): Map? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableIntMap(intMap) + } + + override fun callFlutterEchoNullableEnumMap( + enumMap: Map? + ): Map? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableEnumMap(enumMap) + } + + override fun callFlutterEchoNullableClassMap( + classMap: Map? + ): Map? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableClassMap(classMap) + } + + override fun callFlutterEchoNullableNonNullStringMap( + stringMap: Map? + ): Map? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableNonNullStringMap(stringMap) + } + + override fun callFlutterEchoNullableNonNullIntMap(intMap: Map?): Map? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableNonNullIntMap(intMap) + } + + override fun callFlutterEchoNullableNonNullEnumMap( + enumMap: Map? + ): Map? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableNonNullEnumMap(enumMap) + } + + override fun callFlutterEchoNullableNonNullClassMap( + classMap: Map? + ): Map? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableNonNullClassMap(classMap) + } + + override fun callFlutterEchoNullableEnum(anEnum: NativeInteropAnEnum?): NativeInteropAnEnum? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoNullableEnum(anEnum) + } + + override fun callFlutterEchoAnotherNullableEnum( + anotherEnum: NativeInteropAnotherEnum? + ): NativeInteropAnotherEnum? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAnotherNullableEnum(anotherEnum) + } + + override suspend fun callFlutterNoopAsync() { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.noopAsync() + } + + override suspend fun callFlutterEchoAsyncNativeInteropAllTypes( + everything: NativeInteropAllTypes + ): NativeInteropAllTypes { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNativeInteropAllTypes(everything) + } + + override suspend fun callFlutterEchoAsyncNullableNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypes? + ): NativeInteropAllNullableTypes? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableNativeInteropAllNullableTypes(everything) + } + + override suspend fun callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ): NativeInteropAllNullableTypesWithoutRecursion? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion(everything) + } + + override suspend fun callFlutterEchoAsyncBool(aBool: Boolean): Boolean { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncBool(aBool) + } + + override suspend fun callFlutterEchoAsyncInt(anInt: Long): Long { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncInt(anInt) + } + + override suspend fun callFlutterEchoAsyncDouble(aDouble: Double): Double { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncDouble(aDouble) + } + + override suspend fun callFlutterEchoAsyncString(aString: String): String { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncString(aString) + } + + override suspend fun callFlutterEchoAsyncUint8List(list: ByteArray): ByteArray { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncUint8List(list) + } + + override suspend fun callFlutterEchoAsyncInt32List(list: IntArray): IntArray { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncInt32List(list) + } + + override suspend fun callFlutterEchoAsyncInt64List(list: LongArray): LongArray { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncInt64List(list) + } + + override suspend fun callFlutterEchoAsyncFloat64List(list: DoubleArray): DoubleArray { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncFloat64List(list) + } + + override suspend fun callFlutterEchoAsyncObject(anObject: Any): Any { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncObject(anObject) + } + + override suspend fun callFlutterEchoAsyncList(list: List): List { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncList(list) + } + + override suspend fun callFlutterEchoAsyncEnumList( + enumList: List + ): List { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncEnumList(enumList) + } + + override suspend fun callFlutterEchoAsyncClassList( + classList: List + ): List { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncClassList(classList) + } + + override suspend fun callFlutterEchoAsyncNonNullEnumList( + enumList: List + ): List { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNonNullEnumList(enumList) + } + + override suspend fun callFlutterEchoAsyncNonNullClassList( + classList: List + ): List { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNonNullClassList(classList) + } + + override suspend fun callFlutterEchoAsyncMap(map: Map): Map { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncMap(map) + } + + override suspend fun callFlutterEchoAsyncStringMap( + stringMap: Map + ): Map { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncStringMap(stringMap) + } + + override suspend fun callFlutterEchoAsyncIntMap(intMap: Map): Map { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncIntMap(intMap) + } + + override suspend fun callFlutterEchoAsyncEnumMap( + enumMap: Map + ): Map { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncEnumMap(enumMap) + } + + override suspend fun callFlutterEchoAsyncClassMap( + classMap: Map + ): Map { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncClassMap(classMap) + } + + override suspend fun callFlutterEchoAsyncEnum(anEnum: NativeInteropAnEnum): NativeInteropAnEnum { + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.echoAsyncEnum(anEnum) + } + + override suspend fun callFlutterEchoAnotherAsyncEnum( + anotherEnum: NativeInteropAnotherEnum + ): NativeInteropAnotherEnum { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAnotherAsyncEnum(anotherEnum) + } + + override suspend fun callFlutterEchoAsyncNullableBool(aBool: Boolean?): Boolean? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableBool(aBool) + } + + override suspend fun callFlutterEchoAsyncNullableInt(anInt: Long?): Long? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableInt(anInt) + } + + override suspend fun callFlutterEchoAsyncNullableDouble(aDouble: Double?): Double? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableDouble(aDouble) + } + + override suspend fun callFlutterEchoAsyncNullableString(aString: String?): String? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableString(aString) + } + + override suspend fun callFlutterEchoAsyncNullableUint8List(list: ByteArray?): ByteArray? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableUint8List(list) + } + + override suspend fun callFlutterEchoAsyncNullableInt32List(list: IntArray?): IntArray? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableInt32List(list) + } + + override suspend fun callFlutterEchoAsyncNullableInt64List(list: LongArray?): LongArray? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableInt64List(list) + } + + override suspend fun callFlutterEchoAsyncNullableFloat64List(list: DoubleArray?): DoubleArray? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableFloat64List(list) + } + + override suspend fun callFlutterThrowFlutterErrorAsync(): Any? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .throwFlutterErrorAsync() + } + + override suspend fun callFlutterEchoAsyncNullableObject(anObject: Any?): Any? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableObject(anObject) + } + + override suspend fun callFlutterEchoAsyncNullableList(list: List?): List? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableList(list) + } + + override suspend fun callFlutterEchoAsyncNullableEnumList( + enumList: List? + ): List? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableEnumList(enumList) + } + + override suspend fun callFlutterEchoAsyncNullableClassList( + classList: List? + ): List? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableClassList(classList) + } + + override suspend fun callFlutterEchoAsyncNullableNonNullEnumList( + enumList: List? + ): List? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableNonNullEnumList(enumList) + } + + override suspend fun callFlutterEchoAsyncNullableNonNullClassList( + classList: List? + ): List? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableNonNullClassList(classList) + } + + override suspend fun callFlutterEchoAsyncNullableMap(map: Map?): Map? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableMap(map) + } + + override suspend fun callFlutterEchoAsyncNullableStringMap( + stringMap: Map? + ): Map? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableStringMap(stringMap) + } + + override suspend fun callFlutterEchoAsyncNullableIntMap( + intMap: Map? + ): Map? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableIntMap(intMap) + } + + override suspend fun callFlutterEchoAsyncNullableEnumMap( + enumMap: Map? + ): Map? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableEnumMap(enumMap) + } + + override suspend fun callFlutterEchoAsyncNullableClassMap( + classMap: Map? + ): Map? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableClassMap(classMap) + } + + override suspend fun callFlutterEchoAsyncNullableEnum( + anEnum: NativeInteropAnEnum? + ): NativeInteropAnEnum? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAsyncNullableEnum(anEnum) + } + + override suspend fun callFlutterEchoAnotherAsyncNullableEnum( + anotherEnum: NativeInteropAnotherEnum? + ): NativeInteropAnotherEnum? { + return NativeInteropFlutterIntegrationCoreApiRegistrar() + .getInstance()!! + .echoAnotherAsyncNullableEnum(anotherEnum) + } + + override fun defaultIsMainThread(): Boolean { + return Thread.currentThread() == Looper.getMainLooper().thread + } + + override suspend fun callFlutterNoopOnBackgroundThread(): Boolean { + return withContext(Dispatchers.Default) { + try { + NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance()!!.noopAsync() + true + } catch (e: Exception) { + false + } + } + } + + override fun testDeregisterHostApi(): Boolean { + val name = "testDeregisterHostInstance" + NativeInteropHostIntegrationCoreApiRegistrar() + .register(NativeInteropIntegrationTests(), name = name) + if (NativeInteropHostIntegrationCoreApiRegistrar().getInstance(name) == null) { + return false + } + NativeInteropHostIntegrationCoreApiRegistrar().register(null, name = name) + return NativeInteropHostIntegrationCoreApiRegistrar().getInstance(name) == null + } + + override fun testDeregisterFlutterApi(): Boolean { + val name = "testDeregisterFlutterInstance" + NativeInteropFlutterIntegrationCoreApiRegistrar().registerInstance(null, name = name) + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance(name) == null + } + + override fun registerAndImmediatelyDeregisterHostApi(name: String) { + NativeInteropHostIntegrationCoreApiRegistrar() + .register(NativeInteropIntegrationTests(), name = name) + NativeInteropHostIntegrationCoreApiRegistrar().register(null, name = name) + } + + override fun testCallDeregisteredFlutterApi(name: String): Boolean { + NativeInteropFlutterIntegrationCoreApiRegistrar().registerInstance(null, name = name) + return NativeInteropFlutterIntegrationCoreApiRegistrar().getInstance(name) == null + } +} + +// 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()) @@ -952,7 +2215,7 @@ object SendClass : StreamEventsStreamHandler() { EmptyEvent()) override fun onListen(p0: Any?, sink: PigeonEventSink) { - var count: Int = 0 + var count = 0 val r: Runnable = object : Runnable { override fun run() { @@ -976,7 +2239,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/.gitignore b/packages/pigeon/platform_tests/test_plugin/darwin/.gitignore index 0c885071e36b..d9f7d81f50c3 100644 --- a/packages/pigeon/platform_tests/test_plugin/darwin/.gitignore +++ b/packages/pigeon/platform_tests/test_plugin/darwin/.gitignore @@ -35,4 +35,6 @@ Icon? /Flutter/Generated.xcconfig /Flutter/ephemeral/ -/Flutter/flutter_export_environment.sh \ No newline at end of file +/Flutter/flutter_export_environment.sh + +*.o \ No newline at end of file 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..9c287a3f2d11 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 @@ -17,11 +17,17 @@ let package = Package( .library(name: "test-plugin", targets: ["test_plugin"]) ], dependencies: [], + // #docregion swiftpm-targets targets: [ .target( - name: "test_plugin", + name: "test_plugin_objc_gen", dependencies: [], - resources: [] - ) + publicHeadersPath: "." + ), + .target( + name: "test_plugin", + dependencies: ["test_plugin_objc_gen"] + ), ] + // #enddocregion swiftpm-targets ) 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..294d0ce6fe2d 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 +!NativeInteropTests.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 91af587825a1..0231a6df5e2b 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 @@ -35,7 +35,7 @@ final class PigeonError: Error { var localizedDescription: String { return - "PigeonError(code: \(code), message: \(message ?? ""), details: \(details ?? "")" + "PigeonError(code: \(code), message: \(message ?? ""), details: \(details ?? ""))" } } @@ -112,19 +112,19 @@ enum CoreTestsPigeonInternal { case is (Void, Void): return true - case (let lhsArray, let rhsArray) as ([Any?], [Any?]): + case (let lhsArray, let rhsArray) as ([Double], [Double]): guard lhsArray.count == rhsArray.count else { return false } for (index, element) in lhsArray.enumerated() { - if !deepEquals(element, rhsArray[index]) { + if !doubleEquals(element, rhsArray[index]) { return false } } return true - case (let lhsArray, let rhsArray) as ([Double], [Double]): + case (let lhsArray, let rhsArray) as ([Any?], [Any?]): guard lhsArray.count == rhsArray.count else { return false } for (index, element) in lhsArray.enumerated() { - if !doubleEquals(element, rhsArray[index]) { + if !deepEquals(element, rhsArray[index]) { return false } } 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 377ef2582333..1702b870b815 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 @@ -29,7 +29,7 @@ final class EventChannelTestsError: Error { var localizedDescription: String { return - "EventChannelTestsError(code: \(code), message: \(message ?? ""), details: \(details ?? "")" + "EventChannelTestsError(code: \(code), message: \(message ?? ""), details: \(details ?? ""))" } } @@ -74,19 +74,19 @@ enum EventChannelTestsPigeonInternal { case is (Void, Void): return true - case (let lhsArray, let rhsArray) as ([Any?], [Any?]): + case (let lhsArray, let rhsArray) as ([Double], [Double]): guard lhsArray.count == rhsArray.count else { return false } for (index, element) in lhsArray.enumerated() { - if !deepEquals(element, rhsArray[index]) { + if !doubleEquals(element, rhsArray[index]) { return false } } return true - case (let lhsArray, let rhsArray) as ([Double], [Double]): + case (let lhsArray, let rhsArray) as ([Any?], [Any?]): guard lhsArray.count == rhsArray.count else { return false } for (index, element) in lhsArray.enumerated() { - if !doubleEquals(element, rhsArray[index]) { + if !deepEquals(element, rhsArray[index]) { return false } } diff --git a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/NativeInteropTests.gen.swift b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/NativeInteropTests.gen.swift new file mode 100644 index 000000000000..928b9346f20b --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/NativeInteropTests.gen.swift @@ -0,0 +1,8340 @@ +// 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 NativeInteropTestsError: 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 + "NativeInteropTestsError(code: \(code ?? ""), message: \(message ?? ""), details: \(details ?? ""))" + } +} + +private func createConnectionError(withChannelName channelName: String) -> NativeInteropTestsError { + return NativeInteropTestsError( + code: "channel-error", message: "Unable to establish connection on channel: '\(channelName)'.", + details: "") +} + +// A wrapper around NSNumber that preserves the original primitive/enum type across FFI. +@objc class NativeInteropTestsNumberWrapper: 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: NativeInteropTestsNumberWrapper, rhs: NativeInteropTestsNumberWrapper) + -> Bool + { + return lhs.number == rhs.number && lhs.type == rhs.type + } + + override func isEqual(_ object: Any?) -> Bool { + guard let other = object as? NativeInteropTestsNumberWrapper else { + return false + } + return self == other + } + + override var hash: Int { + return number.hashValue ^ type.hashValue + } + +} + +private func wrapNumber(number: Any) -> NativeInteropTestsNumberWrapper { + switch number { + case let value as Int: + return NativeInteropTestsNumberWrapper(number: NSNumber(value: value), type: 1) + case let value as Int64: + return NativeInteropTestsNumberWrapper(number: NSNumber(value: value), type: 1) + case let value as Double: + return NativeInteropTestsNumberWrapper(number: NSNumber(value: value), type: 2) + case let value as Float: + return NativeInteropTestsNumberWrapper(number: NSNumber(value: value), type: 2) + case let value as Bool: + return NativeInteropTestsNumberWrapper(number: NSNumber(value: value), type: 3) + + case let value as NativeInteropAnEnum: + return NativeInteropTestsNumberWrapper(number: NSNumber(value: value.rawValue), type: 4) + case let value as NativeInteropAnotherEnum: + return NativeInteropTestsNumberWrapper(number: NSNumber(value: value.rawValue), type: 5) + default: + return NativeInteropTestsNumberWrapper(number: NSNumber(value: 0), type: 0) + } +} + +private func unwrapNumber(wrappedNumber: NativeInteropTestsNumberWrapper) -> 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 NativeInteropAnEnum(rawValue: wrappedNumber.number.intValue)! + case 5: + return NativeInteropAnotherEnum(rawValue: wrappedNumber.number.intValue)! + default: + return wrappedNumber.number.int64Value + } +} +// Enum to represent the Dart TypedData types +enum NativeInteropTestsPigeonInternalNumberType: Int { + case uint8 = 0 + case int32 = 1 + case int64 = 2 + case float32 = 3 + case float64 = 4 +} + +@objc public class NativeInteropTestsPigeonTypedData: 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 = NativeInteropTestsPigeonInternalNumberType.uint8.rawValue + } + + public init(_ data: [Int32]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = NativeInteropTestsPigeonInternalNumberType.int32.rawValue + } + + public init(_ data: [Int64]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = NativeInteropTestsPigeonInternalNumberType.int64.rawValue + } + + public init(_ data: [Float32]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = NativeInteropTestsPigeonInternalNumberType.float32.rawValue + } + + public init(_ data: [Float64]) { + self.data = NSData(bytes: data, length: data.count * MemoryLayout.size) + self.type = NativeInteropTestsPigeonInternalNumberType.float64.rawValue + } + + /// Returns the data as a [UInt8] array, if the type is .uint8 + public func toUint8Array() -> [UInt8]? { + guard type == NativeInteropTestsPigeonInternalNumberType.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 == NativeInteropTestsPigeonInternalNumberType.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 == NativeInteropTestsPigeonInternalNumberType.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 == NativeInteropTestsPigeonInternalNumberType.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 == NativeInteropTestsPigeonInternalNumberType.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 + } +} + +enum NativeInteropTestsPigeonInternal { + static let defaultInstanceName = "PigeonDefaultClassName32uh4ui3lh445uh4h3l2l455g4y34u" + static 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 NativeInteropTestsPigeonInternalNull + } + static func doubleEquals(_ lhs: Double, _ rhs: Double) -> Bool { + return (lhs.isNaN && rhs.isNaN) || lhs == rhs + } + + static func doubleHash(_ 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) + } + } + + static func deepEquals(_ 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 ([Double], [Double]): + guard lhsArray.count == rhsArray.count else { return false } + for (index, element) in lhsArray.enumerated() { + if !doubleEquals(element, rhsArray[index]) { + return false + } + } + 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 !deepEquals(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 deepEquals(lhsKey, rhsKey) { + if deepEquals(lhsValue, rhsValue) { + found = true + break + } else { + return false + } + } + } + if !found { return false } + } + return true + + case (let lhs as Double, let rhs as Double): + return doubleEquals(lhs, rhs) + + case (let lhsHashable, let rhsHashable) as (AnyHashable, AnyHashable): + return lhsHashable == rhsHashable + + default: + return false + } + } + + static func deepHash(value: Any?, hasher: inout Hasher) { + let cleanValue = nilOrValue(value) as Any? + if let cleanValue = cleanValue { + if let doubleValue = cleanValue as? Double { + doubleHash(doubleValue, &hasher) + } else if let valueList = cleanValue as? [Any?] { + for item in valueList { + deepHash(value: item, hasher: &hasher) + } + } else if let valueList = cleanValue as? [Double] { + for item in valueList { + doubleHash(item, &hasher) + } + } else if let valueDict = cleanValue as? [AnyHashable: Any?] { + var result = 0 + for (key, value) in valueDict { + var entryKeyHasher = Hasher() + deepHash(value: key, hasher: &entryKeyHasher) + var entryValueHasher = Hasher() + deepHash(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) + } + } + +} + +private func nilOrValue(_ value: Any?) -> T? { + if value is NSNull { return nil } + return value as! T? +} + +@objc enum NativeInteropAnEnum: Int, CaseIterable { + case one = 0 + case two = 1 + case three = 2 + case fortyTwo = 3 + case fourHundredTwentyTwo = 4 +} + +@objc enum NativeInteropAnotherEnum: Int, CaseIterable { + case justInCase = 0 +} + +/// Generated class from Pigeon that represents data sent in messages. +struct NativeInteropUnusedClass: Hashable, CustomStringConvertible { + var aField: Any? = nil + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromList(_ pigeonVar_list: [Any?]) -> NativeInteropUnusedClass? { + let aField: Any? = pigeonVar_list[0] + + return NativeInteropUnusedClass( + aField: aField + ) + } + func toList() -> [Any?] { + return [ + aField + ] + } + static func == (lhs: NativeInteropUnusedClass, rhs: NativeInteropUnusedClass) -> Bool { + if Swift.type(of: lhs) != Swift.type(of: rhs) { + return false + } + return NativeInteropTestsPigeonInternal.deepEquals(lhs.aField, rhs.aField) + } + + func hash(into hasher: inout Hasher) { + hasher.combine("NativeInteropUnusedClass") + NativeInteropTestsPigeonInternal.deepHash(value: aField, hasher: &hasher) + } + + public var description: String { + return "NativeInteropUnusedClass(aField: \(String(describing: aField)))" + } +} + +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +@objc class NativeInteropUnusedClassBridge: NSObject { + @objc init( + aField: NSObject? = nil + ) { + self.aField = aField + } + @objc var aField: NSObject? = nil + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromSwift(_ pigeonVar_Class: NativeInteropUnusedClass?) + -> NativeInteropUnusedClassBridge? + { + if NativeInteropTestsPigeonInternal.isNullish(pigeonVar_Class) { + return nil + } + return NativeInteropUnusedClassBridge( + aField: _PigeonFfiCodec.writeValue(value: pigeonVar_Class!.aField, isObject: true) + as? NSObject, + ) + } + func toSwift() -> NativeInteropUnusedClass { + return NativeInteropUnusedClass( + aField: _PigeonFfiCodec.readValue(value: aField), + ) + } +} + +/// A class containing all supported types. +/// +/// Generated class from Pigeon that represents data sent in messages. +struct NativeInteropAllTypes: Hashable, CustomStringConvertible { + 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: NativeInteropAnEnum + var anotherEnum: NativeInteropAnotherEnum + var aString: String + var anObject: Any + var list: [Any?] + var stringList: [String] + var intList: [Int64] + var doubleList: [Double] + var boolList: [Bool] + var enumList: [NativeInteropAnEnum] + var objectList: [Any] + var listList: [[Any?]] + var mapList: [[AnyHashable?: Any?]] + var map: [AnyHashable?: Any?] + var stringMap: [String: String] + var intMap: [Int64: Int64] + var enumMap: [NativeInteropAnEnum: NativeInteropAnEnum] + var objectMap: [AnyHashable: Any] + var listMap: [Int64: [Any?]] + var mapMap: [Int64: [AnyHashable?: Any?]] + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromList(_ pigeonVar_list: [Any?]) -> NativeInteropAllTypes? { + 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! NativeInteropAnEnum + let anotherEnum = pigeonVar_list[9] as! NativeInteropAnotherEnum + 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! [NativeInteropAnEnum] + 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? [NativeInteropAnEnum: NativeInteropAnEnum] + 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 NativeInteropAllTypes( + 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: NativeInteropAllTypes, rhs: NativeInteropAllTypes) -> Bool { + if Swift.type(of: lhs) != Swift.type(of: rhs) { + return false + } + return NativeInteropTestsPigeonInternal.deepEquals(lhs.aBool, rhs.aBool) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.anInt, rhs.anInt) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.anInt64, rhs.anInt64) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aDouble, rhs.aDouble) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aByteArray, rhs.aByteArray) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.a4ByteArray, rhs.a4ByteArray) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.a8ByteArray, rhs.a8ByteArray) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aFloatArray, rhs.aFloatArray) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.anEnum, rhs.anEnum) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.anotherEnum, rhs.anotherEnum) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aString, rhs.aString) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.anObject, rhs.anObject) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.list, rhs.list) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.stringList, rhs.stringList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.intList, rhs.intList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.doubleList, rhs.doubleList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.boolList, rhs.boolList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.enumList, rhs.enumList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.objectList, rhs.objectList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.listList, rhs.listList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.mapList, rhs.mapList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.map, rhs.map) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.stringMap, rhs.stringMap) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.intMap, rhs.intMap) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.enumMap, rhs.enumMap) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.objectMap, rhs.objectMap) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.listMap, rhs.listMap) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.mapMap, rhs.mapMap) + } + + func hash(into hasher: inout Hasher) { + hasher.combine("NativeInteropAllTypes") + NativeInteropTestsPigeonInternal.deepHash(value: aBool, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: anInt, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: anInt64, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aDouble, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aByteArray, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: a4ByteArray, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: a8ByteArray, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aFloatArray, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: anEnum, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: anotherEnum, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aString, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: anObject, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: list, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: stringList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: intList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: doubleList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: boolList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: enumList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: objectList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: listList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: mapList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: map, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: stringMap, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: intMap, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: enumMap, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: objectMap, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: listMap, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: mapMap, hasher: &hasher) + } + + public var description: String { + return + "NativeInteropAllTypes(aBool: \(String(describing: aBool)), anInt: \(String(describing: anInt)), anInt64: \(String(describing: anInt64)), aDouble: \(String(describing: aDouble)), aByteArray: \(String(describing: aByteArray)), a4ByteArray: \(String(describing: a4ByteArray)), a8ByteArray: \(String(describing: a8ByteArray)), aFloatArray: \(String(describing: aFloatArray)), anEnum: \(String(describing: anEnum)), anotherEnum: \(String(describing: anotherEnum)), aString: \(String(describing: aString)), anObject: \(String(describing: anObject)), list: \(String(describing: list)), stringList: \(String(describing: stringList)), intList: \(String(describing: intList)), doubleList: \(String(describing: doubleList)), boolList: \(String(describing: boolList)), enumList: \(String(describing: enumList)), objectList: \(String(describing: objectList)), listList: \(String(describing: listList)), mapList: \(String(describing: mapList)), map: \(String(describing: map)), stringMap: \(String(describing: stringMap)), intMap: \(String(describing: intMap)), enumMap: \(String(describing: enumMap)), objectMap: \(String(describing: objectMap)), listMap: \(String(describing: listMap)), mapMap: \(String(describing: mapMap)))" + } +} + +/// A class containing all supported types. +/// +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +@objc class NativeInteropAllTypesBridge: NSObject { + @objc init( + aBool: Bool, + anInt: Int64, + anInt64: Int64, + aDouble: Double, + aByteArray: NativeInteropTestsPigeonTypedData, + a4ByteArray: NativeInteropTestsPigeonTypedData, + a8ByteArray: NativeInteropTestsPigeonTypedData, + aFloatArray: NativeInteropTestsPigeonTypedData, + anEnum: NativeInteropAnEnum, + anotherEnum: NativeInteropAnotherEnum, + 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: NativeInteropTestsPigeonTypedData + @objc var a4ByteArray: NativeInteropTestsPigeonTypedData + @objc var a8ByteArray: NativeInteropTestsPigeonTypedData + @objc var aFloatArray: NativeInteropTestsPigeonTypedData + @objc var anEnum: NativeInteropAnEnum + @objc var anotherEnum: NativeInteropAnotherEnum + @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: NativeInteropAllTypes?) -> NativeInteropAllTypesBridge? { + if NativeInteropTestsPigeonInternal.isNullish(pigeonVar_Class) { + return nil + } + return NativeInteropAllTypesBridge( + aBool: pigeonVar_Class!.aBool, + anInt: pigeonVar_Class!.anInt, + anInt64: pigeonVar_Class!.anInt64, + aDouble: pigeonVar_Class!.aDouble, + aByteArray: NativeInteropTestsPigeonTypedData(pigeonVar_Class!.aByteArray), + a4ByteArray: NativeInteropTestsPigeonTypedData(pigeonVar_Class!.a4ByteArray), + a8ByteArray: NativeInteropTestsPigeonTypedData(pigeonVar_Class!.a8ByteArray), + aFloatArray: NativeInteropTestsPigeonTypedData(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() -> NativeInteropAllTypes { + return NativeInteropAllTypes( + 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: "NativeInteropAnEnum") + as! [NativeInteropAnEnum], + 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: "NativeInteropAnEnum", type2: "NativeInteropAnEnum") + as! [NativeInteropAnEnum: NativeInteropAnEnum], + 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 NativeInteropAllNullableTypes: Hashable, CustomStringConvertible { + 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: NativeInteropAnEnum? = nil, + anotherNullableEnum: NativeInteropAnotherEnum? = nil, + aNullableString: String? = nil, + aNullableObject: Any? = nil, + allNullableTypes: NativeInteropAllNullableTypes? = nil, + list: [Any?]? = nil, + stringList: [String?]? = nil, + intList: [Int64?]? = nil, + doubleList: [Double?]? = nil, + boolList: [Bool?]? = nil, + enumList: [NativeInteropAnEnum?]? = nil, + objectList: [Any?]? = nil, + listList: [[Any?]?]? = nil, + mapList: [[AnyHashable?: Any?]?]? = nil, + recursiveClassList: [NativeInteropAllNullableTypes?]? = nil, + map: [AnyHashable?: Any?]? = nil, + stringMap: [String?: String?]? = nil, + intMap: [Int64?: Int64?]? = nil, + enumMap: [NativeInteropAnEnum?: NativeInteropAnEnum?]? = nil, + objectMap: [AnyHashable?: Any?]? = nil, + listMap: [Int64?: [Any?]?]? = nil, + mapMap: [Int64?: [AnyHashable?: Any?]?]? = nil, + recursiveClassMap: [Int64?: NativeInteropAllNullableTypes?]? = 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: NativeInteropAnEnum? + var anotherNullableEnum: NativeInteropAnotherEnum? + var aNullableString: String? + var aNullableObject: Any? + var allNullableTypes: NativeInteropAllNullableTypes? + var list: [Any?]? + var stringList: [String?]? + var intList: [Int64?]? + var doubleList: [Double?]? + var boolList: [Bool?]? + var enumList: [NativeInteropAnEnum?]? + var objectList: [Any?]? + var listList: [[Any?]?]? + var mapList: [[AnyHashable?: Any?]?]? + var recursiveClassList: [NativeInteropAllNullableTypes?]? + var map: [AnyHashable?: Any?]? + var stringMap: [String?: String?]? + var intMap: [Int64?: Int64?]? + var enumMap: [NativeInteropAnEnum?: NativeInteropAnEnum?]? + var objectMap: [AnyHashable?: Any?]? + var listMap: [Int64?: [Any?]?]? + var mapMap: [Int64?: [AnyHashable?: Any?]?]? + var recursiveClassMap: [Int64?: NativeInteropAllNullableTypes?]? + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromList(_ pigeonVar_list: [Any?]) -> NativeInteropAllNullableTypes? { + 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: NativeInteropAnEnum? = nilOrValue(pigeonVar_list[8]) + let anotherNullableEnum: NativeInteropAnotherEnum? = nilOrValue(pigeonVar_list[9]) + let aNullableString: String? = nilOrValue(pigeonVar_list[10]) + let aNullableObject: Any? = pigeonVar_list[11] + let allNullableTypes: NativeInteropAllNullableTypes? = 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: [NativeInteropAnEnum?]? = 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: [NativeInteropAllNullableTypes?]? = 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: [NativeInteropAnEnum?: NativeInteropAnEnum?]? = + pigeonVar_list[26] as? [NativeInteropAnEnum?: NativeInteropAnEnum?] + 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?: NativeInteropAllNullableTypes?]? = nilOrValue( + pigeonVar_list[30]) + + return NativeInteropAllNullableTypes( + 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: NativeInteropAllNullableTypes, rhs: NativeInteropAllNullableTypes) -> Bool { + if Swift.type(of: lhs) != Swift.type(of: rhs) { + return false + } + if lhs === rhs { + return true + } + return NativeInteropTestsPigeonInternal.deepEquals(lhs.aNullableBool, rhs.aNullableBool) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aNullableInt, rhs.aNullableInt) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aNullableInt64, rhs.aNullableInt64) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aNullableDouble, rhs.aNullableDouble) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aNullableByteArray, rhs.aNullableByteArray) + && NativeInteropTestsPigeonInternal.deepEquals( + lhs.aNullable4ByteArray, rhs.aNullable4ByteArray) + && NativeInteropTestsPigeonInternal.deepEquals( + lhs.aNullable8ByteArray, rhs.aNullable8ByteArray) + && NativeInteropTestsPigeonInternal.deepEquals( + lhs.aNullableFloatArray, rhs.aNullableFloatArray) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aNullableEnum, rhs.aNullableEnum) + && NativeInteropTestsPigeonInternal.deepEquals( + lhs.anotherNullableEnum, rhs.anotherNullableEnum) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aNullableString, rhs.aNullableString) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aNullableObject, rhs.aNullableObject) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.allNullableTypes, rhs.allNullableTypes) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.list, rhs.list) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.stringList, rhs.stringList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.intList, rhs.intList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.doubleList, rhs.doubleList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.boolList, rhs.boolList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.enumList, rhs.enumList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.objectList, rhs.objectList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.listList, rhs.listList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.mapList, rhs.mapList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.recursiveClassList, rhs.recursiveClassList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.map, rhs.map) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.stringMap, rhs.stringMap) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.intMap, rhs.intMap) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.enumMap, rhs.enumMap) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.objectMap, rhs.objectMap) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.listMap, rhs.listMap) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.mapMap, rhs.mapMap) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.recursiveClassMap, rhs.recursiveClassMap) + } + + func hash(into hasher: inout Hasher) { + hasher.combine("NativeInteropAllNullableTypes") + NativeInteropTestsPigeonInternal.deepHash(value: aNullableBool, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullableInt, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullableInt64, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullableDouble, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullableByteArray, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullable4ByteArray, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullable8ByteArray, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullableFloatArray, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullableEnum, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: anotherNullableEnum, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullableString, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullableObject, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: allNullableTypes, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: list, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: stringList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: intList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: doubleList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: boolList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: enumList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: objectList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: listList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: mapList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: recursiveClassList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: map, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: stringMap, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: intMap, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: enumMap, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: objectMap, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: listMap, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: mapMap, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: recursiveClassMap, hasher: &hasher) + } + + public var description: String { + return + "NativeInteropAllNullableTypes(aNullableBool: \(String(describing: aNullableBool)), aNullableInt: \(String(describing: aNullableInt)), aNullableInt64: \(String(describing: aNullableInt64)), aNullableDouble: \(String(describing: aNullableDouble)), aNullableByteArray: \(String(describing: aNullableByteArray)), aNullable4ByteArray: \(String(describing: aNullable4ByteArray)), aNullable8ByteArray: \(String(describing: aNullable8ByteArray)), aNullableFloatArray: \(String(describing: aNullableFloatArray)), aNullableEnum: \(String(describing: aNullableEnum)), anotherNullableEnum: \(String(describing: anotherNullableEnum)), aNullableString: \(String(describing: aNullableString)), aNullableObject: \(String(describing: aNullableObject)), allNullableTypes: \(String(describing: allNullableTypes)), list: \(String(describing: list)), stringList: \(String(describing: stringList)), intList: \(String(describing: intList)), doubleList: \(String(describing: doubleList)), boolList: \(String(describing: boolList)), enumList: \(String(describing: enumList)), objectList: \(String(describing: objectList)), listList: \(String(describing: listList)), mapList: \(String(describing: mapList)), recursiveClassList: \(String(describing: recursiveClassList)), map: \(String(describing: map)), stringMap: \(String(describing: stringMap)), intMap: \(String(describing: intMap)), enumMap: \(String(describing: enumMap)), objectMap: \(String(describing: objectMap)), listMap: \(String(describing: listMap)), mapMap: \(String(describing: mapMap)), recursiveClassMap: \(String(describing: recursiveClassMap)))" + } +} + +/// A class containing all supported nullable types. +/// +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +@objc class NativeInteropAllNullableTypesBridge: NSObject { + @objc init( + aNullableBool: NSNumber? = nil, + aNullableInt: NSNumber? = nil, + aNullableInt64: NSNumber? = nil, + aNullableDouble: NSNumber? = nil, + aNullableByteArray: NativeInteropTestsPigeonTypedData? = nil, + aNullable4ByteArray: NativeInteropTestsPigeonTypedData? = nil, + aNullable8ByteArray: NativeInteropTestsPigeonTypedData? = nil, + aNullableFloatArray: NativeInteropTestsPigeonTypedData? = nil, + aNullableEnum: NSNumber? = nil, + anotherNullableEnum: NSNumber? = nil, + aNullableString: NSString? = nil, + aNullableObject: NSObject? = nil, + allNullableTypes: NativeInteropAllNullableTypesBridge? = 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: NativeInteropTestsPigeonTypedData? + @objc var aNullable4ByteArray: NativeInteropTestsPigeonTypedData? + @objc var aNullable8ByteArray: NativeInteropTestsPigeonTypedData? + @objc var aNullableFloatArray: NativeInteropTestsPigeonTypedData? + @objc var aNullableEnum: NSNumber? + @objc var anotherNullableEnum: NSNumber? + @objc var aNullableString: NSString? + @objc var aNullableObject: NSObject? + @objc var allNullableTypes: NativeInteropAllNullableTypesBridge? + @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: NativeInteropAllNullableTypes?) + -> NativeInteropAllNullableTypesBridge? + { + if NativeInteropTestsPigeonInternal.isNullish(pigeonVar_Class) { + return nil + } + return NativeInteropAllNullableTypesBridge( + aNullableBool: NativeInteropTestsPigeonInternal.isNullish(pigeonVar_Class!.aNullableBool) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableBool!), + aNullableInt: NativeInteropTestsPigeonInternal.isNullish(pigeonVar_Class!.aNullableInt) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableInt!), + aNullableInt64: NativeInteropTestsPigeonInternal.isNullish(pigeonVar_Class!.aNullableInt64) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableInt64!), + aNullableDouble: NativeInteropTestsPigeonInternal.isNullish(pigeonVar_Class!.aNullableDouble) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableDouble!), + aNullableByteArray: NativeInteropTestsPigeonInternal.isNullish( + pigeonVar_Class!.aNullableByteArray) + ? nil : NativeInteropTestsPigeonTypedData(pigeonVar_Class!.aNullableByteArray!), + aNullable4ByteArray: NativeInteropTestsPigeonInternal.isNullish( + pigeonVar_Class!.aNullable4ByteArray) + ? nil : NativeInteropTestsPigeonTypedData(pigeonVar_Class!.aNullable4ByteArray!), + aNullable8ByteArray: NativeInteropTestsPigeonInternal.isNullish( + pigeonVar_Class!.aNullable8ByteArray) + ? nil : NativeInteropTestsPigeonTypedData(pigeonVar_Class!.aNullable8ByteArray!), + aNullableFloatArray: NativeInteropTestsPigeonInternal.isNullish( + pigeonVar_Class!.aNullableFloatArray) + ? nil : NativeInteropTestsPigeonTypedData(pigeonVar_Class!.aNullableFloatArray!), + aNullableEnum: NativeInteropTestsPigeonInternal.isNullish(pigeonVar_Class!.aNullableEnum) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableEnum!.rawValue), + anotherNullableEnum: NativeInteropTestsPigeonInternal.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: NativeInteropAllNullableTypesBridge.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() -> NativeInteropAllNullableTypes { + return NativeInteropAllNullableTypes( + aNullableBool: NativeInteropTestsPigeonInternal.isNullish(aNullableBool) + ? nil : aNullableBool!.boolValue, + aNullableInt: NativeInteropTestsPigeonInternal.isNullish(aNullableInt) + ? nil : aNullableInt!.int64Value, + aNullableInt64: NativeInteropTestsPigeonInternal.isNullish(aNullableInt64) + ? nil : aNullableInt64!.int64Value, + aNullableDouble: NativeInteropTestsPigeonInternal.isNullish(aNullableDouble) + ? nil : aNullableDouble!.doubleValue, + aNullableByteArray: NativeInteropTestsPigeonInternal.isNullish(aNullableByteArray) + ? nil : aNullableByteArray!.toUint8Array(), + aNullable4ByteArray: NativeInteropTestsPigeonInternal.isNullish(aNullable4ByteArray) + ? nil : aNullable4ByteArray!.toInt32Array(), + aNullable8ByteArray: NativeInteropTestsPigeonInternal.isNullish(aNullable8ByteArray) + ? nil : aNullable8ByteArray!.toInt64Array(), + aNullableFloatArray: NativeInteropTestsPigeonInternal.isNullish(aNullableFloatArray) + ? nil : aNullableFloatArray!.toFloat64Array(), + aNullableEnum: NativeInteropTestsPigeonInternal.isNullish(aNullableEnum) + ? nil : NativeInteropAnEnum.init(rawValue: aNullableEnum!.intValue), + anotherNullableEnum: NativeInteropTestsPigeonInternal.isNullish(anotherNullableEnum) + ? nil : NativeInteropAnotherEnum.init(rawValue: anotherNullableEnum!.intValue), + aNullableString: aNullableString as String?, + aNullableObject: _PigeonFfiCodec.readValue(value: aNullableObject), + allNullableTypes: NativeInteropTestsPigeonInternal.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: "NativeInteropAnEnum") + as? [NativeInteropAnEnum?], + 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: "NativeInteropAllNullableTypes") + as? [NativeInteropAllNullableTypes?], + 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: "NativeInteropAnEnum", type2: "NativeInteropAnEnum") + as? [NativeInteropAnEnum?: NativeInteropAnEnum?], + 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: "NativeInteropAllNullableTypes") + as? [Int64?: NativeInteropAllNullableTypes?], + ) + } +} + +/// The primary purpose for this class is to ensure coverage of Swift structs +/// with nullable items, as the primary [NativeInteropAllNullableTypes] class is being used to +/// test Swift classes. +/// +/// Generated class from Pigeon that represents data sent in messages. +struct NativeInteropAllNullableTypesWithoutRecursion: Hashable, CustomStringConvertible { + 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: NativeInteropAnEnum? = nil + var anotherNullableEnum: NativeInteropAnotherEnum? = 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: [NativeInteropAnEnum?]? = 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: [NativeInteropAnEnum?: NativeInteropAnEnum?]? = 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?]) -> NativeInteropAllNullableTypesWithoutRecursion? { + 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: NativeInteropAnEnum? = nilOrValue(pigeonVar_list[8]) + let anotherNullableEnum: NativeInteropAnotherEnum? = 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: [NativeInteropAnEnum?]? = 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: [NativeInteropAnEnum?: NativeInteropAnEnum?]? = + pigeonVar_list[24] as? [NativeInteropAnEnum?: NativeInteropAnEnum?] + 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 NativeInteropAllNullableTypesWithoutRecursion( + 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: NativeInteropAllNullableTypesWithoutRecursion, + rhs: NativeInteropAllNullableTypesWithoutRecursion + ) -> Bool { + if Swift.type(of: lhs) != Swift.type(of: rhs) { + return false + } + return NativeInteropTestsPigeonInternal.deepEquals(lhs.aNullableBool, rhs.aNullableBool) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aNullableInt, rhs.aNullableInt) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aNullableInt64, rhs.aNullableInt64) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aNullableDouble, rhs.aNullableDouble) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aNullableByteArray, rhs.aNullableByteArray) + && NativeInteropTestsPigeonInternal.deepEquals( + lhs.aNullable4ByteArray, rhs.aNullable4ByteArray) + && NativeInteropTestsPigeonInternal.deepEquals( + lhs.aNullable8ByteArray, rhs.aNullable8ByteArray) + && NativeInteropTestsPigeonInternal.deepEquals( + lhs.aNullableFloatArray, rhs.aNullableFloatArray) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aNullableEnum, rhs.aNullableEnum) + && NativeInteropTestsPigeonInternal.deepEquals( + lhs.anotherNullableEnum, rhs.anotherNullableEnum) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aNullableString, rhs.aNullableString) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.aNullableObject, rhs.aNullableObject) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.list, rhs.list) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.stringList, rhs.stringList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.intList, rhs.intList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.doubleList, rhs.doubleList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.boolList, rhs.boolList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.enumList, rhs.enumList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.objectList, rhs.objectList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.listList, rhs.listList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.mapList, rhs.mapList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.map, rhs.map) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.stringMap, rhs.stringMap) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.intMap, rhs.intMap) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.enumMap, rhs.enumMap) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.objectMap, rhs.objectMap) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.listMap, rhs.listMap) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.mapMap, rhs.mapMap) + } + + func hash(into hasher: inout Hasher) { + hasher.combine("NativeInteropAllNullableTypesWithoutRecursion") + NativeInteropTestsPigeonInternal.deepHash(value: aNullableBool, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullableInt, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullableInt64, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullableDouble, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullableByteArray, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullable4ByteArray, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullable8ByteArray, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullableFloatArray, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullableEnum, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: anotherNullableEnum, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullableString, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: aNullableObject, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: list, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: stringList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: intList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: doubleList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: boolList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: enumList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: objectList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: listList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: mapList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: map, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: stringMap, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: intMap, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: enumMap, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: objectMap, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: listMap, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: mapMap, hasher: &hasher) + } + + public var description: String { + return + "NativeInteropAllNullableTypesWithoutRecursion(aNullableBool: \(String(describing: aNullableBool)), aNullableInt: \(String(describing: aNullableInt)), aNullableInt64: \(String(describing: aNullableInt64)), aNullableDouble: \(String(describing: aNullableDouble)), aNullableByteArray: \(String(describing: aNullableByteArray)), aNullable4ByteArray: \(String(describing: aNullable4ByteArray)), aNullable8ByteArray: \(String(describing: aNullable8ByteArray)), aNullableFloatArray: \(String(describing: aNullableFloatArray)), aNullableEnum: \(String(describing: aNullableEnum)), anotherNullableEnum: \(String(describing: anotherNullableEnum)), aNullableString: \(String(describing: aNullableString)), aNullableObject: \(String(describing: aNullableObject)), list: \(String(describing: list)), stringList: \(String(describing: stringList)), intList: \(String(describing: intList)), doubleList: \(String(describing: doubleList)), boolList: \(String(describing: boolList)), enumList: \(String(describing: enumList)), objectList: \(String(describing: objectList)), listList: \(String(describing: listList)), mapList: \(String(describing: mapList)), map: \(String(describing: map)), stringMap: \(String(describing: stringMap)), intMap: \(String(describing: intMap)), enumMap: \(String(describing: enumMap)), objectMap: \(String(describing: objectMap)), listMap: \(String(describing: listMap)), mapMap: \(String(describing: mapMap)))" + } +} + +/// The primary purpose for this class is to ensure coverage of Swift structs +/// with nullable items, as the primary [NativeInteropAllNullableTypes] class is being used to +/// test Swift classes. +/// +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +@objc class NativeInteropAllNullableTypesWithoutRecursionBridge: NSObject { + @objc init( + aNullableBool: NSNumber? = nil, + aNullableInt: NSNumber? = nil, + aNullableInt64: NSNumber? = nil, + aNullableDouble: NSNumber? = nil, + aNullableByteArray: NativeInteropTestsPigeonTypedData? = nil, + aNullable4ByteArray: NativeInteropTestsPigeonTypedData? = nil, + aNullable8ByteArray: NativeInteropTestsPigeonTypedData? = nil, + aNullableFloatArray: NativeInteropTestsPigeonTypedData? = 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: NativeInteropTestsPigeonTypedData? = nil + @objc var aNullable4ByteArray: NativeInteropTestsPigeonTypedData? = nil + @objc var aNullable8ByteArray: NativeInteropTestsPigeonTypedData? = nil + @objc var aNullableFloatArray: NativeInteropTestsPigeonTypedData? = 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: NativeInteropAllNullableTypesWithoutRecursion?) + -> NativeInteropAllNullableTypesWithoutRecursionBridge? + { + if NativeInteropTestsPigeonInternal.isNullish(pigeonVar_Class) { + return nil + } + return NativeInteropAllNullableTypesWithoutRecursionBridge( + aNullableBool: NativeInteropTestsPigeonInternal.isNullish(pigeonVar_Class!.aNullableBool) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableBool!), + aNullableInt: NativeInteropTestsPigeonInternal.isNullish(pigeonVar_Class!.aNullableInt) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableInt!), + aNullableInt64: NativeInteropTestsPigeonInternal.isNullish(pigeonVar_Class!.aNullableInt64) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableInt64!), + aNullableDouble: NativeInteropTestsPigeonInternal.isNullish(pigeonVar_Class!.aNullableDouble) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableDouble!), + aNullableByteArray: NativeInteropTestsPigeonInternal.isNullish( + pigeonVar_Class!.aNullableByteArray) + ? nil : NativeInteropTestsPigeonTypedData(pigeonVar_Class!.aNullableByteArray!), + aNullable4ByteArray: NativeInteropTestsPigeonInternal.isNullish( + pigeonVar_Class!.aNullable4ByteArray) + ? nil : NativeInteropTestsPigeonTypedData(pigeonVar_Class!.aNullable4ByteArray!), + aNullable8ByteArray: NativeInteropTestsPigeonInternal.isNullish( + pigeonVar_Class!.aNullable8ByteArray) + ? nil : NativeInteropTestsPigeonTypedData(pigeonVar_Class!.aNullable8ByteArray!), + aNullableFloatArray: NativeInteropTestsPigeonInternal.isNullish( + pigeonVar_Class!.aNullableFloatArray) + ? nil : NativeInteropTestsPigeonTypedData(pigeonVar_Class!.aNullableFloatArray!), + aNullableEnum: NativeInteropTestsPigeonInternal.isNullish(pigeonVar_Class!.aNullableEnum) + ? nil : NSNumber(value: pigeonVar_Class!.aNullableEnum!.rawValue), + anotherNullableEnum: NativeInteropTestsPigeonInternal.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() -> NativeInteropAllNullableTypesWithoutRecursion { + return NativeInteropAllNullableTypesWithoutRecursion( + aNullableBool: NativeInteropTestsPigeonInternal.isNullish(aNullableBool) + ? nil : aNullableBool!.boolValue, + aNullableInt: NativeInteropTestsPigeonInternal.isNullish(aNullableInt) + ? nil : aNullableInt!.int64Value, + aNullableInt64: NativeInteropTestsPigeonInternal.isNullish(aNullableInt64) + ? nil : aNullableInt64!.int64Value, + aNullableDouble: NativeInteropTestsPigeonInternal.isNullish(aNullableDouble) + ? nil : aNullableDouble!.doubleValue, + aNullableByteArray: NativeInteropTestsPigeonInternal.isNullish(aNullableByteArray) + ? nil : aNullableByteArray!.toUint8Array(), + aNullable4ByteArray: NativeInteropTestsPigeonInternal.isNullish(aNullable4ByteArray) + ? nil : aNullable4ByteArray!.toInt32Array(), + aNullable8ByteArray: NativeInteropTestsPigeonInternal.isNullish(aNullable8ByteArray) + ? nil : aNullable8ByteArray!.toInt64Array(), + aNullableFloatArray: NativeInteropTestsPigeonInternal.isNullish(aNullableFloatArray) + ? nil : aNullableFloatArray!.toFloat64Array(), + aNullableEnum: NativeInteropTestsPigeonInternal.isNullish(aNullableEnum) + ? nil : NativeInteropAnEnum.init(rawValue: aNullableEnum!.intValue), + anotherNullableEnum: NativeInteropTestsPigeonInternal.isNullish(anotherNullableEnum) + ? nil : NativeInteropAnotherEnum.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: "NativeInteropAnEnum") + as? [NativeInteropAnEnum?], + 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: "NativeInteropAnEnum", type2: "NativeInteropAnEnum") + as? [NativeInteropAnEnum?: NativeInteropAnEnum?], + 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, +/// `NativeInteropAllNullableTypes` is non-nullable here as it is easier to instantiate +/// than `NativeInteropAllTypes` when testing doesn't require both (ie. testing null classes). +/// +/// Generated class from Pigeon that represents data sent in messages. +struct NativeInteropAllClassesWrapper: Hashable, CustomStringConvertible { + var allNullableTypes: NativeInteropAllNullableTypes + var allNullableTypesWithoutRecursion: NativeInteropAllNullableTypesWithoutRecursion? = nil + var allTypes: NativeInteropAllTypes? = nil + var classList: [NativeInteropAllTypes?] + var nullableClassList: [NativeInteropAllNullableTypesWithoutRecursion?]? = nil + var classMap: [Int64?: NativeInteropAllTypes?] + var nullableClassMap: [Int64?: NativeInteropAllNullableTypesWithoutRecursion?]? = nil + + // swift-format-ignore: AlwaysUseLowerCamelCase + static func fromList(_ pigeonVar_list: [Any?]) -> NativeInteropAllClassesWrapper? { + let allNullableTypes = pigeonVar_list[0] as! NativeInteropAllNullableTypes + let allNullableTypesWithoutRecursion: NativeInteropAllNullableTypesWithoutRecursion? = + nilOrValue(pigeonVar_list[1]) + let allTypes: NativeInteropAllTypes? = nilOrValue(pigeonVar_list[2]) + let classList = pigeonVar_list[3] as! [NativeInteropAllTypes?] + let nullableClassList: [NativeInteropAllNullableTypesWithoutRecursion?]? = nilOrValue( + pigeonVar_list[4]) + let classMap = pigeonVar_list[5] as! [Int64?: NativeInteropAllTypes?] + let nullableClassMap: [Int64?: NativeInteropAllNullableTypesWithoutRecursion?]? = nilOrValue( + pigeonVar_list[6]) + + return NativeInteropAllClassesWrapper( + 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: NativeInteropAllClassesWrapper, rhs: NativeInteropAllClassesWrapper) -> Bool + { + if Swift.type(of: lhs) != Swift.type(of: rhs) { + return false + } + return NativeInteropTestsPigeonInternal.deepEquals(lhs.allNullableTypes, rhs.allNullableTypes) + && NativeInteropTestsPigeonInternal.deepEquals( + lhs.allNullableTypesWithoutRecursion, rhs.allNullableTypesWithoutRecursion) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.allTypes, rhs.allTypes) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.classList, rhs.classList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.nullableClassList, rhs.nullableClassList) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.classMap, rhs.classMap) + && NativeInteropTestsPigeonInternal.deepEquals(lhs.nullableClassMap, rhs.nullableClassMap) + } + + func hash(into hasher: inout Hasher) { + hasher.combine("NativeInteropAllClassesWrapper") + NativeInteropTestsPigeonInternal.deepHash(value: allNullableTypes, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash( + value: allNullableTypesWithoutRecursion, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: allTypes, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: classList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: nullableClassList, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: classMap, hasher: &hasher) + NativeInteropTestsPigeonInternal.deepHash(value: nullableClassMap, hasher: &hasher) + } + + public var description: String { + return + "NativeInteropAllClassesWrapper(allNullableTypes: \(String(describing: allNullableTypes)), allNullableTypesWithoutRecursion: \(String(describing: allNullableTypesWithoutRecursion)), allTypes: \(String(describing: allTypes)), classList: \(String(describing: classList)), nullableClassList: \(String(describing: nullableClassList)), classMap: \(String(describing: classMap)), nullableClassMap: \(String(describing: nullableClassMap)))" + } +} + +/// A class for testing nested class handling. +/// +/// This is needed to test nested nullable and non-nullable classes, +/// `NativeInteropAllNullableTypes` is non-nullable here as it is easier to instantiate +/// than `NativeInteropAllTypes` when testing doesn't require both (ie. testing null classes). +/// +/// Generated bridge class from Pigeon that moves data from Swift to Objective-C. +@objc class NativeInteropAllClassesWrapperBridge: NSObject { + @objc init( + allNullableTypes: NativeInteropAllNullableTypesBridge, + allNullableTypesWithoutRecursion: NativeInteropAllNullableTypesWithoutRecursionBridge? = nil, + allTypes: NativeInteropAllTypesBridge? = 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: NativeInteropAllNullableTypesBridge + @objc var allNullableTypesWithoutRecursion: NativeInteropAllNullableTypesWithoutRecursionBridge? = + nil + @objc var allTypes: NativeInteropAllTypesBridge? = 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: NativeInteropAllClassesWrapper?) + -> NativeInteropAllClassesWrapperBridge? + { + if NativeInteropTestsPigeonInternal.isNullish(pigeonVar_Class) { + return nil + } + return NativeInteropAllClassesWrapperBridge( + allNullableTypes: NativeInteropAllNullableTypesBridge.fromSwift( + pigeonVar_Class!.allNullableTypes)!, + allNullableTypesWithoutRecursion: + NativeInteropAllNullableTypesWithoutRecursionBridge.fromSwift( + pigeonVar_Class!.allNullableTypesWithoutRecursion), + allTypes: NativeInteropAllTypesBridge.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() -> NativeInteropAllClassesWrapper { + return NativeInteropAllClassesWrapper( + allNullableTypes: allNullableTypes.toSwift(), + allNullableTypesWithoutRecursion: NativeInteropTestsPigeonInternal.isNullish( + allNullableTypesWithoutRecursion) ? nil : allNullableTypesWithoutRecursion!.toSwift(), + allTypes: NativeInteropTestsPigeonInternal.isNullish(allTypes) ? nil : allTypes!.toSwift(), + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject, type: "NativeInteropAllTypes") as! [NativeInteropAllTypes?], + nullableClassList: _PigeonFfiCodec.readValue( + value: nullableClassList as NSObject?, type: "NativeInteropAllNullableTypesWithoutRecursion" + ) as? [NativeInteropAllNullableTypesWithoutRecursion?], + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject, type: "int", type2: "NativeInteropAllTypes") + as! [Int64?: NativeInteropAllTypes?], + nullableClassMap: _PigeonFfiCodec.readValue( + value: nullableClassMap as NSObject?, type: "int", + type2: "NativeInteropAllNullableTypesWithoutRecursion") + as? [Int64?: NativeInteropAllNullableTypesWithoutRecursion?], + ) + } +} + +@objc class NativeInteropTestsPigeonInternalNull: NSObject {} + +class _PigeonFfiCodec { + static func readValue(value: NSObject?, type: String? = nil, type2: String? = nil) -> Any? { + if NativeInteropTestsPigeonInternal.isNullish(value) { + return nil + } + if let typedData = value as? NativeInteropTestsPigeonTypedData { + switch typedData.type { + case NativeInteropTestsPigeonInternalNumberType.uint8.rawValue: + return typedData.toUint8Array() + case NativeInteropTestsPigeonInternalNumberType.int32.rawValue: + return typedData.toInt32Array() + case NativeInteropTestsPigeonInternalNumberType.int64.rawValue: + return typedData.toInt64Array() + case NativeInteropTestsPigeonInternalNumberType.float32.rawValue: + return typedData.toFloat32Array() + case NativeInteropTestsPigeonInternalNumberType.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 == "NativeInteropAnEnum" { + return NativeInteropAnEnum.init(rawValue: number.intValue) + } else if type == "NativeInteropAnotherEnum" { + return NativeInteropAnotherEnum.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 NativeInteropTestsNumberWrapper { + return unwrapNumber(wrappedNumber: value as! NativeInteropTestsNumberWrapper) + } + if value is NSString { + return value as! NSString + } else if value is NativeInteropUnusedClassBridge { + return (value! as! NativeInteropUnusedClassBridge).toSwift() + } else if value is NativeInteropAllTypesBridge { + return (value! as! NativeInteropAllTypesBridge).toSwift() + } else if value is NativeInteropAllNullableTypesBridge { + return (value! as! NativeInteropAllNullableTypesBridge).toSwift() + } else if value is NativeInteropAllNullableTypesWithoutRecursionBridge { + return (value! as! NativeInteropAllNullableTypesWithoutRecursionBridge).toSwift() + } else if value is NativeInteropAllClassesWrapperBridge { + return (value! as! NativeInteropAllClassesWrapperBridge).toSwift() + + } + return value + } + + static func writeValue(value: Any?, isObject: Bool = false) -> Any? { + if NativeInteropTestsPigeonInternal.isNullish(value) { + return NativeInteropTestsPigeonInternalNull() + } + if let uint8Array = value as? [UInt8] { + return isObject ? NativeInteropTestsPigeonTypedData(uint8Array) : uint8Array as NSArray + } + if let int32Array = value as? [Int32] { + return isObject ? NativeInteropTestsPigeonTypedData(int32Array) : int32Array as NSArray + } + if let int64Array = value as? [Int64] { + return isObject ? NativeInteropTestsPigeonTypedData(int64Array) : int64Array as NSArray + } + if let float32Array = value as? [Float32] { + return isObject ? NativeInteropTestsPigeonTypedData(float32Array) : float32Array as NSArray + } + if let float64Array = value as? [Double] { + return isObject ? NativeInteropTestsPigeonTypedData(float64Array) : float64Array as NSArray + } + if value is Bool || value is Double || value is Int || value is Int64 + || value is NativeInteropAnEnum || value is NativeInteropAnotherEnum + { + 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 NativeInteropAnEnum { + return (value as! NativeInteropAnEnum).rawValue + } else if value is NativeInteropAnotherEnum { + return (value as! NativeInteropAnotherEnum).rawValue + } + } + if value is [Any] { + let list = value as! [Any] + let res: NSMutableArray = NSMutableArray(capacity: list.count) + for item in list { + res.add( + NativeInteropTestsPigeonInternal.isNullish(item) + ? NativeInteropTestsPigeonInternalNull() + : writeValue(value: item, isObject: true) as! NSObject) + } + return res + } + if value is [AnyHashable: Any] { + let dict = value as! [AnyHashable: Any] + let res: NSMutableDictionary = NSMutableDictionary(capacity: dict.count) + for (key, value) in dict { + res.setObject( + NativeInteropTestsPigeonInternal.isNullish(key) + ? NativeInteropTestsPigeonInternalNull() + : 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 NativeInteropUnusedClass { + return NativeInteropUnusedClassBridge.fromSwift(value as? NativeInteropUnusedClass) + } else if value is NativeInteropAllTypes { + return NativeInteropAllTypesBridge.fromSwift(value as? NativeInteropAllTypes) + } else if value is NativeInteropAllNullableTypes { + return NativeInteropAllNullableTypesBridge.fromSwift(value as? NativeInteropAllNullableTypes) + } else if value is NativeInteropAllNullableTypesWithoutRecursion { + return NativeInteropAllNullableTypesWithoutRecursionBridge.fromSwift( + value as? NativeInteropAllNullableTypesWithoutRecursion) + } else if value is NativeInteropAllClassesWrapper { + return NativeInteropAllClassesWrapperBridge.fromSwift( + value as? NativeInteropAllClassesWrapper) + + } + return value + } +} + +class NativeInteropHostIntegrationCoreApiInstanceTracker { + static var instancesOfNativeInteropHostIntegrationCoreApi = [ + String: NativeInteropHostIntegrationCoreApiSetup? + ]() +} + +/// 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. +protocol NativeInteropHostIntegrationCoreApi { + /// 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: NativeInteropAllTypes) throws -> NativeInteropAllTypes + /// 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: [NativeInteropAnEnum?]) throws -> [NativeInteropAnEnum?] + /// Returns the passed list, to test serialization and deserialization. + func echo(classList: [NativeInteropAllNullableTypes?]) throws -> [NativeInteropAllNullableTypes?] + /// Returns the passed list, to test serialization and deserialization. + func echoNonNull(enumList: [NativeInteropAnEnum]) throws -> [NativeInteropAnEnum] + /// Returns the passed list, to test serialization and deserialization. + func echoNonNull(classList: [NativeInteropAllNullableTypes]) throws + -> [NativeInteropAllNullableTypes] + /// 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: [NativeInteropAnEnum?: NativeInteropAnEnum?]) throws -> [NativeInteropAnEnum?: + NativeInteropAnEnum?] + /// Returns the passed map, to test serialization and deserialization. + func echo(classMap: [Int64?: NativeInteropAllNullableTypes?]) throws -> [Int64?: + NativeInteropAllNullableTypes?] + /// 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: [NativeInteropAnEnum: NativeInteropAnEnum]) throws + -> [NativeInteropAnEnum: NativeInteropAnEnum] + /// Returns the passed map, to test serialization and deserialization. + func echoNonNull(classMap: [Int64: NativeInteropAllNullableTypes]) throws -> [Int64: + NativeInteropAllNullableTypes] + /// Returns the passed class to test nested class serialization and deserialization. + func echo(_ wrapper: NativeInteropAllClassesWrapper) throws -> NativeInteropAllClassesWrapper + /// Returns the passed enum to test serialization and deserialization. + func echo(_ anEnum: NativeInteropAnEnum) throws -> NativeInteropAnEnum + /// Returns the passed enum to test serialization and deserialization. + func echo(_ anotherEnum: NativeInteropAnotherEnum) throws -> NativeInteropAnotherEnum + /// 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: NativeInteropAllNullableTypes?) throws + -> NativeInteropAllNullableTypes? + /// Returns the passed object, to test serialization and deserialization. + func echoNullable(_ everything: NativeInteropAllNullableTypesWithoutRecursion?) throws + -> NativeInteropAllNullableTypesWithoutRecursion? + /// Returns the inner `aString` value from the wrapped object, to test + /// sending of nested objects. + func extractNestedNullableString(from wrapper: NativeInteropAllClassesWrapper) throws -> String? + /// Returns the inner `aString` value from the wrapped object, to test + /// sending of nested objects. + func createNestedObject(with nullableString: String?) throws -> NativeInteropAllClassesWrapper + func sendMultipleNullableTypes( + aBool aNullableBool: Bool?, anInt aNullableInt: Int64?, aString aNullableString: String? + ) throws -> NativeInteropAllNullableTypes + /// Returns passed in arguments of multiple types. + func sendMultipleNullableTypesWithoutRecursion( + aBool aNullableBool: Bool?, anInt aNullableInt: Int64?, aString aNullableString: String? + ) throws -> NativeInteropAllNullableTypesWithoutRecursion + /// 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: [NativeInteropAnEnum?]?) throws -> [NativeInteropAnEnum?]? + /// Returns the passed list, to test serialization and deserialization. + func echoNullable(classList: [NativeInteropAllNullableTypes?]?) throws + -> [NativeInteropAllNullableTypes?]? + /// Returns the passed list, to test serialization and deserialization. + func echoNullableNonNull(enumList: [NativeInteropAnEnum]?) throws -> [NativeInteropAnEnum]? + /// Returns the passed list, to test serialization and deserialization. + func echoNullableNonNull(classList: [NativeInteropAllNullableTypes]?) throws + -> [NativeInteropAllNullableTypes]? + /// 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: [NativeInteropAnEnum?: NativeInteropAnEnum?]?) throws + -> [NativeInteropAnEnum?: NativeInteropAnEnum?]? + /// Returns the passed map, to test serialization and deserialization. + func echoNullable(classMap: [Int64?: NativeInteropAllNullableTypes?]?) throws -> [Int64?: + NativeInteropAllNullableTypes?]? + /// 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: [NativeInteropAnEnum: NativeInteropAnEnum]?) throws + -> [NativeInteropAnEnum: NativeInteropAnEnum]? + /// Returns the passed map, to test serialization and deserialization. + func echoNullableNonNull(classMap: [Int64: NativeInteropAllNullableTypes]?) throws -> [Int64: + NativeInteropAllNullableTypes]? + func echoNullable(_ anEnum: NativeInteropAnEnum?) throws -> NativeInteropAnEnum? + func echoNullable(_ anotherEnum: NativeInteropAnotherEnum?) throws -> NativeInteropAnotherEnum? + /// 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: [NativeInteropAnEnum?]) async throws -> [NativeInteropAnEnum?] + /// Returns the passed list, to test asynchronous serialization and deserialization. + func echoAsync(classList: [NativeInteropAllNullableTypes?]) async throws + -> [NativeInteropAllNullableTypes?] + /// 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: [NativeInteropAnEnum?: NativeInteropAnEnum?]) async throws + -> [NativeInteropAnEnum?: NativeInteropAnEnum?] + /// Returns the passed map, to test asynchronous serialization and deserialization. + func echoAsync(classMap: [Int64?: NativeInteropAllNullableTypes?]) async throws -> [Int64?: + NativeInteropAllNullableTypes?] + /// Returns the passed enum, to test asynchronous serialization and deserialization. + func echoAsync(_ anEnum: NativeInteropAnEnum) async throws -> NativeInteropAnEnum + /// Returns the passed enum, to test asynchronous serialization and deserialization. + func echoAsync(_ anotherEnum: NativeInteropAnotherEnum) async throws -> NativeInteropAnotherEnum + /// 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: NativeInteropAllTypes) async throws -> NativeInteropAllTypes + /// Returns the passed object, to test serialization and deserialization. + func echoAsync(_ everything: NativeInteropAllNullableTypes?) async throws + -> NativeInteropAllNullableTypes? + /// Returns the passed object, to test serialization and deserialization. + func echoAsync(_ everything: NativeInteropAllNullableTypesWithoutRecursion?) async throws + -> NativeInteropAllNullableTypesWithoutRecursion? + /// 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: [NativeInteropAnEnum?]?) async throws -> [NativeInteropAnEnum?]? + /// Returns the passed list, to test asynchronous serialization and deserialization. + func echoAsyncNullable(classList: [NativeInteropAllNullableTypes?]?) async throws + -> [NativeInteropAllNullableTypes?]? + /// 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: [NativeInteropAnEnum?: NativeInteropAnEnum?]?) async throws + -> [NativeInteropAnEnum?: NativeInteropAnEnum?]? + /// Returns the passed map, to test asynchronous serialization and deserialization. + func echoAsyncNullable(classMap: [Int64?: NativeInteropAllNullableTypes?]?) async throws + -> [Int64?: NativeInteropAllNullableTypes?]? + /// Returns the passed enum, to test asynchronous serialization and deserialization. + func echoAsyncNullable(_ anEnum: NativeInteropAnEnum?) async throws -> NativeInteropAnEnum? + /// Returns the passed enum, to test asynchronous serialization and deserialization. + func echoAsyncNullable(_ anotherEnum: NativeInteropAnotherEnum?) async throws + -> NativeInteropAnotherEnum? + func callFlutterNoop() throws + func callFlutterThrowError() throws -> Any? + func callFlutterThrowErrorFromVoid() throws + func callFlutterEcho(_ everything: NativeInteropAllTypes) throws -> NativeInteropAllTypes + func callFlutterEcho(_ everything: NativeInteropAllNullableTypes?) throws + -> NativeInteropAllNullableTypes? + func callFlutterSendMultipleNullableTypes( + aBool aNullableBool: Bool?, anInt aNullableInt: Int64?, aString aNullableString: String? + ) throws -> NativeInteropAllNullableTypes + func callFlutterEcho(_ everything: NativeInteropAllNullableTypesWithoutRecursion?) throws + -> NativeInteropAllNullableTypesWithoutRecursion? + func callFlutterSendMultipleNullableTypesWithoutRecursion( + aBool aNullableBool: Bool?, anInt aNullableInt: Int64?, aString aNullableString: String? + ) throws -> NativeInteropAllNullableTypesWithoutRecursion + 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: [NativeInteropAnEnum?]) throws -> [NativeInteropAnEnum?] + func callFlutterEcho(classList: [NativeInteropAllNullableTypes?]) throws + -> [NativeInteropAllNullableTypes?] + func callFlutterEchoNonNull(enumList: [NativeInteropAnEnum]) throws -> [NativeInteropAnEnum] + func callFlutterEchoNonNull(classList: [NativeInteropAllNullableTypes]) throws + -> [NativeInteropAllNullableTypes] + 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: [NativeInteropAnEnum?: NativeInteropAnEnum?]) throws + -> [NativeInteropAnEnum?: NativeInteropAnEnum?] + func callFlutterEcho(classMap: [Int64?: NativeInteropAllNullableTypes?]) throws -> [Int64?: + NativeInteropAllNullableTypes?] + func callFlutterEchoNonNull(stringMap: [String: String]) throws -> [String: String] + func callFlutterEchoNonNull(intMap: [Int64: Int64]) throws -> [Int64: Int64] + func callFlutterEchoNonNull(enumMap: [NativeInteropAnEnum: NativeInteropAnEnum]) throws + -> [NativeInteropAnEnum: NativeInteropAnEnum] + func callFlutterEchoNonNull(classMap: [Int64: NativeInteropAllNullableTypes]) throws -> [Int64: + NativeInteropAllNullableTypes] + func callFlutterEcho(_ anEnum: NativeInteropAnEnum) throws -> NativeInteropAnEnum + func callFlutterEcho(_ anotherEnum: NativeInteropAnotherEnum) throws -> NativeInteropAnotherEnum + 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: [NativeInteropAnEnum?]?) throws -> [NativeInteropAnEnum?]? + func callFlutterEchoNullable(classList: [NativeInteropAllNullableTypes?]?) throws + -> [NativeInteropAllNullableTypes?]? + func callFlutterEchoNullableNonNull(enumList: [NativeInteropAnEnum]?) throws + -> [NativeInteropAnEnum]? + func callFlutterEchoNullableNonNull(classList: [NativeInteropAllNullableTypes]?) throws + -> [NativeInteropAllNullableTypes]? + 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: [NativeInteropAnEnum?: NativeInteropAnEnum?]?) throws + -> [NativeInteropAnEnum?: NativeInteropAnEnum?]? + func callFlutterEchoNullable(classMap: [Int64?: NativeInteropAllNullableTypes?]?) throws + -> [Int64?: NativeInteropAllNullableTypes?]? + func callFlutterEchoNullableNonNull(stringMap: [String: String]?) throws -> [String: String]? + func callFlutterEchoNullableNonNull(intMap: [Int64: Int64]?) throws -> [Int64: Int64]? + func callFlutterEchoNullableNonNull(enumMap: [NativeInteropAnEnum: NativeInteropAnEnum]?) throws + -> [NativeInteropAnEnum: NativeInteropAnEnum]? + func callFlutterEchoNullableNonNull(classMap: [Int64: NativeInteropAllNullableTypes]?) throws + -> [Int64: NativeInteropAllNullableTypes]? + func callFlutterEchoNullable(_ anEnum: NativeInteropAnEnum?) throws -> NativeInteropAnEnum? + func callFlutterEchoNullable(_ anotherEnum: NativeInteropAnotherEnum?) throws + -> NativeInteropAnotherEnum? + func callFlutterNoopAsync() async throws + func callFlutterEchoAsyncNativeInteropAllTypes(everything: NativeInteropAllTypes) async throws + -> NativeInteropAllTypes + func callFlutterEchoAsyncNullableNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypes? + ) async throws -> NativeInteropAllNullableTypes? + func callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ) async throws -> NativeInteropAllNullableTypesWithoutRecursion? + 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: [NativeInteropAnEnum?]) async throws + -> [NativeInteropAnEnum?] + func callFlutterEchoAsyncClassList(classList: [NativeInteropAllNullableTypes?]) async throws + -> [NativeInteropAllNullableTypes?] + func callFlutterEchoAsyncNonNullEnumList(enumList: [NativeInteropAnEnum]) async throws + -> [NativeInteropAnEnum] + func callFlutterEchoAsyncNonNullClassList(classList: [NativeInteropAllNullableTypes]) async throws + -> [NativeInteropAllNullableTypes] + 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: [NativeInteropAnEnum?: NativeInteropAnEnum?]) + async throws -> [NativeInteropAnEnum?: NativeInteropAnEnum?] + func callFlutterEchoAsyncClassMap(classMap: [Int64?: NativeInteropAllNullableTypes?]) async throws + -> [Int64?: NativeInteropAllNullableTypes?] + func callFlutterEchoAsyncEnum(anEnum: NativeInteropAnEnum) async throws -> NativeInteropAnEnum + func callFlutterEchoAnotherAsyncEnum(anotherEnum: NativeInteropAnotherEnum) async throws + -> NativeInteropAnotherEnum + 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: [NativeInteropAnEnum?]?) async throws + -> [NativeInteropAnEnum?]? + func callFlutterEchoAsyncNullableClassList(classList: [NativeInteropAllNullableTypes?]?) + async throws -> [NativeInteropAllNullableTypes?]? + func callFlutterEchoAsyncNullableNonNullEnumList(enumList: [NativeInteropAnEnum]?) async throws + -> [NativeInteropAnEnum]? + func callFlutterEchoAsyncNullableNonNullClassList(classList: [NativeInteropAllNullableTypes]?) + async throws -> [NativeInteropAllNullableTypes]? + 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: [NativeInteropAnEnum?: NativeInteropAnEnum?]?) + async throws -> [NativeInteropAnEnum?: NativeInteropAnEnum?]? + func callFlutterEchoAsyncNullableClassMap(classMap: [Int64?: NativeInteropAllNullableTypes?]?) + async throws -> [Int64?: NativeInteropAllNullableTypes?]? + func callFlutterEchoAsyncNullableEnum(anEnum: NativeInteropAnEnum?) async throws + -> NativeInteropAnEnum? + func callFlutterEchoAnotherAsyncNullableEnum(anotherEnum: NativeInteropAnotherEnum?) async throws + -> NativeInteropAnotherEnum? + /// Returns true if the handler is run on a main thread. + func defaultIsMainThread() throws -> Bool + /// Spawns a background thread and calls `noop` on the [NativeInteropFlutterIntegrationCoreApi]. + /// + /// Returns the result of whether the flutter call was successful. + func callFlutterNoopOnBackgroundThread() async throws -> Bool + /// Tests deregistering a Host API natively. + func testDeregisterHostApi() throws -> Bool + /// Tests deregistering a Flutter API natively. + func testDeregisterFlutterApi() throws -> Bool + /// Registers and immediately deregisters a Host API under [name]. + func registerAndImmediatelyDeregisterHostApi(name: String) throws + /// Tests that calling a deregistered Flutter API under [name] fails / returns null. + func testCallDeregisteredFlutterApi(name: String) throws -> Bool +} + +/// Generated setup class from Pigeon to register implemented NativeInteropHostIntegrationCoreApi classes. +@objc class NativeInteropHostIntegrationCoreApiSetup: NSObject { + private var api: NativeInteropHostIntegrationCoreApi? + override init() {} + static func register( + api: NativeInteropHostIntegrationCoreApi?, + name: String = NativeInteropTestsPigeonInternal.defaultInstanceName + ) { + if let api = api { + let wrapper = NativeInteropHostIntegrationCoreApiSetup() + wrapper.api = api + NativeInteropHostIntegrationCoreApiInstanceTracker + .instancesOfNativeInteropHostIntegrationCoreApi[name] = wrapper + } else { + NativeInteropHostIntegrationCoreApiInstanceTracker + .instancesOfNativeInteropHostIntegrationCoreApi.removeValue(forKey: name) + } + } + @objc static func getInstance(name: String) -> NativeInteropHostIntegrationCoreApiSetup? { + return + NativeInteropHostIntegrationCoreApiInstanceTracker + .instancesOfNativeInteropHostIntegrationCoreApi[name] ?? nil + } + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic calling. + @objc func noop(wrappedError: NativeInteropTestsError) { + do { + return try api!.noop() + } catch let error as NativeInteropTestsError { + 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: NativeInteropAllTypesBridge, wrappedError: NativeInteropTestsError + ) -> NativeInteropAllTypesBridge? { + do { + return try NativeInteropAllTypesBridge.fromSwift(api!.echo(everything.toSwift()))! + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) -> NSObject? { + do { + return try _PigeonFfiCodec.writeValue(value: api!.throwError(), isObject: true) as? NSObject + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) { + do { + return try api!.throwErrorFromVoid() + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) -> NSObject? { + do { + return try _PigeonFfiCodec.writeValue(value: api!.throwFlutterError(), isObject: true) + as? NSObject + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.echo(anInt)) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.echo(aDouble)) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.echo(aBool)) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) -> NSString? { + do { + return try api!.echo(aString as String) as NSString? + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData, wrappedError: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? { + do { + let res = try api!.echo(aUint8List.toUint8Array()!) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData, wrappedError: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? { + do { + let res = try api!.echo(aInt32List.toInt32Array()!) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData, wrappedError: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? { + do { + let res = try api!.echo(aInt64List.toInt64Array()!) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData, wrappedError: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? { + do { + let res = try api!.echo(aFloat64List.toFloat64Array()!) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) -> NSObject? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo(_PigeonFfiCodec.readValue(value: anObject)!), isObject: true) as? NSObject + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError) -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo( + enumList: _PigeonFfiCodec.readValue( + value: enumList as NSObject, type: "NativeInteropAnEnum") as! [NativeInteropAnEnum?])) + as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject, type: "NativeInteropAllNullableTypes") + as! [NativeInteropAllNullableTypes?])) as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNonNull( + enumList: _PigeonFfiCodec.readValue( + value: enumList as NSObject, type: "NativeInteropAnEnum") as! [NativeInteropAnEnum])) + as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNonNull( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject, type: "NativeInteropAllNullableTypes") + as! [NativeInteropAllNullableTypes])) as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject, type: "NativeInteropAnEnum", type2: "NativeInteropAnEnum") + as! [NativeInteropAnEnum?: NativeInteropAnEnum?])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [NSObject: NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echo( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject, type: "int", type2: "NativeInteropAllNullableTypes") + as! [Int64?: NativeInteropAllNullableTypes?])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNonNull( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject, type: "NativeInteropAnEnum", type2: "NativeInteropAnEnum") + as! [NativeInteropAnEnum: NativeInteropAnEnum])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNonNull( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject, type: "int", type2: "NativeInteropAllNullableTypes") + as! [Int64: NativeInteropAllNullableTypes])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropAllClassesWrapperBridge, wrappedError: NativeInteropTestsError + ) -> NativeInteropAllClassesWrapperBridge? { + do { + return try NativeInteropAllClassesWrapperBridge.fromSwift(api!.echo(wrapper.toSwift()))! + } catch let error as NativeInteropTestsError { + 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: NativeInteropAnEnum, wrappedError: NativeInteropTestsError) + -> NSNumber? + { + do { + return try NSNumber(value: api!.echo(anEnum).rawValue) + } catch let error as NativeInteropTestsError { + 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: NativeInteropAnotherEnum, wrappedError: NativeInteropTestsError + ) -> NSNumber? { + do { + return try NSNumber(value: api!.echo(anotherEnum).rawValue) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> NSString? + { + do { + return try api!.echoNamedDefault(aString as String) as NSString? + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> NSNumber? + { + do { + return try NSNumber(value: api!.echoOptionalDefault(aDouble)) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.echoRequired(anInt)) + } catch let error as NativeInteropTestsError { + 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: NativeInteropAllNullableTypesBridge?, wrappedError: NativeInteropTestsError + ) -> NativeInteropAllNullableTypesBridge? { + do { + return try NativeInteropAllNullableTypesBridge.fromSwift( + api!.echoNullable( + NativeInteropTestsPigeonInternal.isNullish(everything) ? nil : everything!.toSwift())) + } catch let error as NativeInteropTestsError { + 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: NativeInteropAllNullableTypesWithoutRecursionBridge?, + wrappedError: NativeInteropTestsError + ) -> NativeInteropAllNullableTypesWithoutRecursionBridge? { + do { + return try NativeInteropAllNullableTypesWithoutRecursionBridge.fromSwift( + api!.echoNullable( + NativeInteropTestsPigeonInternal.isNullish(everything) ? nil : everything!.toSwift())) + } catch let error as NativeInteropTestsError { + 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: NativeInteropAllClassesWrapperBridge, wrappedError: NativeInteropTestsError + ) -> NSString? { + do { + return try api!.extractNestedNullableString(from: wrapper.toSwift()) as NSString? + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> NativeInteropAllClassesWrapperBridge? { + do { + return try NativeInteropAllClassesWrapperBridge.fromSwift( + api!.createNestedObject(with: nullableString as String?))! + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> NativeInteropAllNullableTypesBridge? { + do { + return try NativeInteropAllNullableTypesBridge.fromSwift( + api!.sendMultipleNullableTypes( + aBool: NativeInteropTestsPigeonInternal.isNullish(aNullableBool) + ? nil : aNullableBool!.boolValue, + anInt: NativeInteropTestsPigeonInternal.isNullish(aNullableInt) + ? nil : aNullableInt!.int64Value, aString: aNullableString as String?))! + } catch let error as NativeInteropTestsError { + 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 arguments of multiple types. + @objc func sendMultipleNullableTypesWithoutRecursion( + aNullableBool: NSNumber?, aNullableInt: NSNumber?, aNullableString: NSString?, + wrappedError: NativeInteropTestsError + ) -> NativeInteropAllNullableTypesWithoutRecursionBridge? { + do { + return try NativeInteropAllNullableTypesWithoutRecursionBridge.fromSwift( + api!.sendMultipleNullableTypesWithoutRecursion( + aBool: NativeInteropTestsPigeonInternal.isNullish(aNullableBool) + ? nil : aNullableBool!.boolValue, + anInt: NativeInteropTestsPigeonInternal.isNullish(aNullableInt) + ? nil : aNullableInt!.int64Value, aString: aNullableString as String?))! + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> NSNumber? + { + do { + return try NativeInteropTestsPigeonInternal.isNullish( + api!.echoNullable( + NativeInteropTestsPigeonInternal.isNullish(aNullableInt) ? nil : aNullableInt!.int64Value) + ) + ? nil + : NSNumber( + value: api!.echoNullable( + NativeInteropTestsPigeonInternal.isNullish(aNullableInt) + ? nil : aNullableInt!.int64Value)!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> NSNumber? + { + do { + return try NativeInteropTestsPigeonInternal.isNullish( + api!.echoNullable( + NativeInteropTestsPigeonInternal.isNullish(aNullableDouble) + ? nil : aNullableDouble!.doubleValue)) + ? nil + : NSNumber( + value: api!.echoNullable( + NativeInteropTestsPigeonInternal.isNullish(aNullableDouble) + ? nil : aNullableDouble!.doubleValue)!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> NSNumber? + { + do { + return try NativeInteropTestsPigeonInternal.isNullish( + api!.echoNullable( + NativeInteropTestsPigeonInternal.isNullish(aNullableBool) ? nil : aNullableBool!.boolValue + )) + ? nil + : NSNumber( + value: api!.echoNullable( + NativeInteropTestsPigeonInternal.isNullish(aNullableBool) + ? nil : aNullableBool!.boolValue)!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> NSString? + { + do { + return try api!.echoNullable(aNullableString as String?) as NSString? + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData?, wrappedError: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? { + do { + let res = try api!.echoNullable( + NativeInteropTestsPigeonInternal.isNullish(aNullableUint8List) + ? nil : aNullableUint8List!.toUint8Array()) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData?, wrappedError: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? { + do { + let res = try api!.echoNullable( + NativeInteropTestsPigeonInternal.isNullish(aNullableInt32List) + ? nil : aNullableInt32List!.toInt32Array()) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData?, wrappedError: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? { + do { + let res = try api!.echoNullable( + NativeInteropTestsPigeonInternal.isNullish(aNullableInt64List) + ? nil : aNullableInt64List!.toInt64Array()) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData?, wrappedError: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? { + do { + let res = try api!.echoNullable( + NativeInteropTestsPigeonInternal.isNullish(aNullableFloat64List) + ? nil : aNullableFloat64List!.toFloat64Array()) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> NSObject? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullable(_PigeonFfiCodec.readValue(value: aNullableObject)), isObject: true) + as? NSObject + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullable( + enumList: _PigeonFfiCodec.readValue( + value: enumList as NSObject?, type: "NativeInteropAnEnum") as? [NativeInteropAnEnum?])) + as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullable( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject?, type: "NativeInteropAllNullableTypes") + as? [NativeInteropAllNullableTypes?])) as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullableNonNull( + enumList: _PigeonFfiCodec.readValue( + value: enumList as NSObject?, type: "NativeInteropAnEnum") as? [NativeInteropAnEnum])) + as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullableNonNull( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject?, type: "NativeInteropAllNullableTypes") + as? [NativeInteropAllNullableTypes])) as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullable( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject?, type: "NativeInteropAnEnum", type2: "NativeInteropAnEnum") + as? [NativeInteropAnEnum?: NativeInteropAnEnum?])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullable( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject?, type: "int", type2: "NativeInteropAllNullableTypes") + as? [Int64?: NativeInteropAllNullableTypes?])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullableNonNull( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject?, type: "NativeInteropAnEnum", type2: "NativeInteropAnEnum") + as? [NativeInteropAnEnum: NativeInteropAnEnum])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.echoNullableNonNull( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject?, type: "int", type2: "NativeInteropAllNullableTypes") + as? [Int64: NativeInteropAllNullableTypes])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) -> NSNumber? + { + do { + let res = try api!.echoNullable( + NativeInteropTestsPigeonInternal.isNullish(anEnum) + ? nil : NativeInteropAnEnum.init(rawValue: anEnum!.intValue))?.rawValue + return NativeInteropTestsPigeonInternal.isNullish(res) ? nil : NSNumber(value: res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> NSNumber? + { + do { + let res = try api!.echoNullable( + NativeInteropTestsPigeonInternal.isNullish(anotherEnum) + ? nil : NativeInteropAnotherEnum.init(rawValue: anotherEnum!.intValue))?.rawValue + return NativeInteropTestsPigeonInternal.isNullish(res) ? nil : NSNumber(value: res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> NSNumber? + { + do { + return try NativeInteropTestsPigeonInternal.isNullish( + api!.echoOptional( + NativeInteropTestsPigeonInternal.isNullish(aNullableInt) ? nil : aNullableInt!.int64Value) + ) + ? nil + : NSNumber( + value: api!.echoOptional( + NativeInteropTestsPigeonInternal.isNullish(aNullableInt) + ? nil : aNullableInt!.int64Value)!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> NSString? { + do { + return try api!.echoNamed(aNullableString as String?) as NSString? + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) async { + do { + return try await api!.noopAsync() + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) async -> NSNumber? { + do { + return try await NSNumber(value: api!.echoAsync(anInt)) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) async + -> NSNumber? + { + do { + return try await NSNumber(value: api!.echoAsync(aDouble)) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) async -> NSNumber? { + do { + return try await NSNumber(value: api!.echoAsync(aBool)) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) async + -> NSString? + { + do { + return try await api!.echoAsync(aString as String) as NSString? + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData, wrappedError: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? { + do { + let res = try await api!.echoAsync(aUint8List.toUint8Array()!) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData, wrappedError: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? { + do { + let res = try await api!.echoAsync(aInt32List.toInt32Array()!) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData, wrappedError: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? { + do { + let res = try await api!.echoAsync(aInt64List.toInt64Array()!) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData, wrappedError: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? { + do { + let res = try await api!.echoAsync(aFloat64List.toFloat64Array()!) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) async + -> NSObject? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsync(_PigeonFfiCodec.readValue(value: anObject)!), isObject: true) + as? NSObject + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) 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 NativeInteropTestsError { + 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: NativeInteropTestsError) async + -> [NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsync( + enumList: _PigeonFfiCodec.readValue( + value: enumList as NSObject, type: "NativeInteropAnEnum") as! [NativeInteropAnEnum?])) + as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) async + -> [NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsync( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject, type: "NativeInteropAllNullableTypes") + as! [NativeInteropAllNullableTypes?])) as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) 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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) 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 NativeInteropTestsError { + 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: NativeInteropTestsError) + 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 NativeInteropTestsError { + 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: NativeInteropTestsError) + async -> [NSObject: NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsync( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject, type: "NativeInteropAnEnum", type2: "NativeInteropAnEnum") + as! [NativeInteropAnEnum?: NativeInteropAnEnum?])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> [NSObject: NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsync( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject, type: "int", type2: "NativeInteropAllNullableTypes") + as! [Int64?: NativeInteropAllNullableTypes?])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropAnEnum, wrappedError: NativeInteropTestsError) async + -> NSNumber? + { + do { + return try await NSNumber(value: api!.echoAsync(anEnum).rawValue) + } catch let error as NativeInteropTestsError { + 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: NativeInteropAnotherEnum, wrappedError: NativeInteropTestsError + ) async -> NSNumber? { + do { + return try await NSNumber(value: api!.echoAsync(anotherEnum).rawValue) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) async -> NSObject? { + do { + return try await _PigeonFfiCodec.writeValue(value: api!.throwAsyncError(), isObject: true) + as? NSObject + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) async { + do { + return try await api!.throwAsyncErrorFromVoid() + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) async -> NSObject? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.throwAsyncFlutterError(), isObject: true) as? NSObject + } catch let error as NativeInteropTestsError { + 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 echoAsyncNativeInteropAllTypes( + everything: NativeInteropAllTypesBridge, wrappedError: NativeInteropTestsError + ) async -> NativeInteropAllTypesBridge? { + do { + return try await NativeInteropAllTypesBridge.fromSwift(api!.echoAsync(everything.toSwift()))! + } catch let error as NativeInteropTestsError { + 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 echoAsyncNullableNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypesBridge?, wrappedError: NativeInteropTestsError + ) async -> NativeInteropAllNullableTypesBridge? { + do { + return try await NativeInteropAllNullableTypesBridge.fromSwift( + api!.echoAsync( + NativeInteropTestsPigeonInternal.isNullish(everything) ? nil : everything!.toSwift())) + } catch let error as NativeInteropTestsError { + 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 echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursionBridge?, + wrappedError: NativeInteropTestsError + ) async -> NativeInteropAllNullableTypesWithoutRecursionBridge? { + do { + return try await NativeInteropAllNullableTypesWithoutRecursionBridge.fromSwift( + api!.echoAsync( + NativeInteropTestsPigeonInternal.isNullish(everything) ? nil : everything!.toSwift())) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) async + -> NSNumber? + { + do { + return try await NativeInteropTestsPigeonInternal.isNullish( + api!.echoAsyncNullable( + NativeInteropTestsPigeonInternal.isNullish(anInt) ? nil : anInt!.int64Value)) + ? nil + : NSNumber( + value: api!.echoAsyncNullable( + NativeInteropTestsPigeonInternal.isNullish(anInt) ? nil : anInt!.int64Value)!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + async -> NSNumber? + { + do { + return try await NativeInteropTestsPigeonInternal.isNullish( + api!.echoAsyncNullable( + NativeInteropTestsPigeonInternal.isNullish(aDouble) ? nil : aDouble!.doubleValue)) + ? nil + : NSNumber( + value: api!.echoAsyncNullable( + NativeInteropTestsPigeonInternal.isNullish(aDouble) ? nil : aDouble!.doubleValue)!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) async + -> NSNumber? + { + do { + return try await NativeInteropTestsPigeonInternal.isNullish( + api!.echoAsyncNullable( + NativeInteropTestsPigeonInternal.isNullish(aBool) ? nil : aBool!.boolValue)) + ? nil + : NSNumber( + value: api!.echoAsyncNullable( + NativeInteropTestsPigeonInternal.isNullish(aBool) ? nil : aBool!.boolValue)!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + async -> NSString? + { + do { + return try await api!.echoAsyncNullable(aString as String?) as NSString? + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData?, wrappedError: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? { + do { + let res = try await api!.echoAsyncNullable( + NativeInteropTestsPigeonInternal.isNullish(aUint8List) ? nil : aUint8List!.toUint8Array()) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData?, wrappedError: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? { + do { + let res = try await api!.echoAsyncNullable( + NativeInteropTestsPigeonInternal.isNullish(aInt32List) ? nil : aInt32List!.toInt32Array()) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData?, wrappedError: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? { + do { + let res = try await api!.echoAsyncNullable( + NativeInteropTestsPigeonInternal.isNullish(aInt64List) ? nil : aInt64List!.toInt64Array()) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData?, wrappedError: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? { + do { + let res = try await api!.echoAsyncNullable( + NativeInteropTestsPigeonInternal.isNullish(aFloat64List) + ? nil : aFloat64List!.toFloat64Array()) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + async -> NSObject? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsyncNullable(_PigeonFfiCodec.readValue(value: anObject)), isObject: true) + as? NSObject + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) 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 NativeInteropTestsError { + 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: NativeInteropTestsError) + async -> [NSObject]? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsyncNullable( + enumList: _PigeonFfiCodec.readValue( + value: enumList as NSObject?, type: "NativeInteropAnEnum") as? [NativeInteropAnEnum?])) + as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> [NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsyncNullable( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject?, type: "NativeInteropAllNullableTypes") + as? [NativeInteropAllNullableTypes?])) as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + 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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) 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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) 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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> [NSObject: NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsyncNullable( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject?, type: "NativeInteropAnEnum", type2: "NativeInteropAnEnum") + as? [NativeInteropAnEnum?: NativeInteropAnEnum?])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> [NSObject: NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.echoAsyncNullable( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject?, type: "int", type2: "NativeInteropAllNullableTypes") + as? [Int64?: NativeInteropAllNullableTypes?])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) async + -> NSNumber? + { + do { + let res = try await api!.echoAsyncNullable( + NativeInteropTestsPigeonInternal.isNullish(anEnum) + ? nil : NativeInteropAnEnum.init(rawValue: anEnum!.intValue))?.rawValue + return NativeInteropTestsPigeonInternal.isNullish(res) ? nil : NSNumber(value: res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> NSNumber? { + do { + let res = try await api!.echoAsyncNullable( + NativeInteropTestsPigeonInternal.isNullish(anotherEnum) + ? nil : NativeInteropAnotherEnum.init(rawValue: anotherEnum!.intValue))?.rawValue + return NativeInteropTestsPigeonInternal.isNullish(res) ? nil : NSNumber(value: res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) { + do { + return try api!.callFlutterNoop() + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) -> NSObject? { + do { + return try _PigeonFfiCodec.writeValue(value: api!.callFlutterThrowError(), isObject: true) + as? NSObject + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) { + do { + return try api!.callFlutterThrowErrorFromVoid() + } catch let error as NativeInteropTestsError { + 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 callFlutterEchoNativeInteropAllTypes( + everything: NativeInteropAllTypesBridge, wrappedError: NativeInteropTestsError + ) -> NativeInteropAllTypesBridge? { + do { + return try NativeInteropAllTypesBridge.fromSwift(api!.callFlutterEcho(everything.toSwift()))! + } catch let error as NativeInteropTestsError { + 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 callFlutterEchoNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypesBridge?, wrappedError: NativeInteropTestsError + ) -> NativeInteropAllNullableTypesBridge? { + do { + return try NativeInteropAllNullableTypesBridge.fromSwift( + api!.callFlutterEcho( + NativeInteropTestsPigeonInternal.isNullish(everything) ? nil : everything!.toSwift())) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> NativeInteropAllNullableTypesBridge? { + do { + return try NativeInteropAllNullableTypesBridge.fromSwift( + api!.callFlutterSendMultipleNullableTypes( + aBool: NativeInteropTestsPigeonInternal.isNullish(aNullableBool) + ? nil : aNullableBool!.boolValue, + anInt: NativeInteropTestsPigeonInternal.isNullish(aNullableInt) + ? nil : aNullableInt!.int64Value, aString: aNullableString as String?))! + } catch let error as NativeInteropTestsError { + 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 callFlutterEchoNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursionBridge?, + wrappedError: NativeInteropTestsError + ) -> NativeInteropAllNullableTypesWithoutRecursionBridge? { + do { + return try NativeInteropAllNullableTypesWithoutRecursionBridge.fromSwift( + api!.callFlutterEcho( + NativeInteropTestsPigeonInternal.isNullish(everything) ? nil : everything!.toSwift())) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> NativeInteropAllNullableTypesWithoutRecursionBridge? { + do { + return try NativeInteropAllNullableTypesWithoutRecursionBridge.fromSwift( + api!.callFlutterSendMultipleNullableTypesWithoutRecursion( + aBool: NativeInteropTestsPigeonInternal.isNullish(aNullableBool) + ? nil : aNullableBool!.boolValue, + anInt: NativeInteropTestsPigeonInternal.isNullish(aNullableInt) + ? nil : aNullableInt!.int64Value, aString: aNullableString as String?))! + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.callFlutterEcho(aBool)) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.callFlutterEcho(anInt)) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> NSNumber? + { + do { + return try NSNumber(value: api!.callFlutterEcho(aDouble)) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> NSString? + { + do { + return try api!.callFlutterEcho(aString as String) as NSString? + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData, wrappedError: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? { + do { + let res = try api!.callFlutterEcho(list.toUint8Array()!) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData, wrappedError: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? { + do { + let res = try api!.callFlutterEcho(list.toInt32Array()!) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData, wrappedError: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? { + do { + let res = try api!.callFlutterEcho(list.toInt64Array()!) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData, wrappedError: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? { + do { + let res = try api!.callFlutterEcho(list.toFloat64Array()!) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEcho( + enumList: _PigeonFfiCodec.readValue( + value: enumList as NSObject, type: "NativeInteropAnEnum") as! [NativeInteropAnEnum?])) + as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [NSObject]? + { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEcho( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject, type: "NativeInteropAllNullableTypes") + as! [NativeInteropAllNullableTypes?])) as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNonNull( + enumList: _PigeonFfiCodec.readValue( + value: enumList as NSObject, type: "NativeInteropAnEnum") as! [NativeInteropAnEnum])) + as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNonNull( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject, type: "NativeInteropAllNullableTypes") + as! [NativeInteropAllNullableTypes])) as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEcho( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject, type: "NativeInteropAnEnum", type2: "NativeInteropAnEnum") + as! [NativeInteropAnEnum?: NativeInteropAnEnum?])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEcho( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject, type: "int", type2: "NativeInteropAllNullableTypes") + as! [Int64?: NativeInteropAllNullableTypes?])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNonNull( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject, type: "NativeInteropAnEnum", type2: "NativeInteropAnEnum") + as! [NativeInteropAnEnum: NativeInteropAnEnum])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNonNull( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject, type: "int", type2: "NativeInteropAllNullableTypes") + as! [Int64: NativeInteropAllNullableTypes])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropAnEnum, wrappedError: NativeInteropTestsError) + -> NSNumber? + { + do { + return try NSNumber(value: api!.callFlutterEcho(anEnum).rawValue) + } catch let error as NativeInteropTestsError { + 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 callFlutterEchoNativeInteropAnotherEnum( + anotherEnum: NativeInteropAnotherEnum, wrappedError: NativeInteropTestsError + ) -> NSNumber? { + do { + return try NSNumber(value: api!.callFlutterEcho(anotherEnum).rawValue) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> NSNumber? + { + do { + return try NativeInteropTestsPigeonInternal.isNullish( + api!.callFlutterEchoNullable( + NativeInteropTestsPigeonInternal.isNullish(aBool) ? nil : aBool!.boolValue)) + ? nil + : NSNumber( + value: api!.callFlutterEchoNullable( + NativeInteropTestsPigeonInternal.isNullish(aBool) ? nil : aBool!.boolValue)!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> NSNumber? + { + do { + return try NativeInteropTestsPigeonInternal.isNullish( + api!.callFlutterEchoNullable( + NativeInteropTestsPigeonInternal.isNullish(anInt) ? nil : anInt!.int64Value)) + ? nil + : NSNumber( + value: api!.callFlutterEchoNullable( + NativeInteropTestsPigeonInternal.isNullish(anInt) ? nil : anInt!.int64Value)!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> NSNumber? { + do { + return try NativeInteropTestsPigeonInternal.isNullish( + api!.callFlutterEchoNullable( + NativeInteropTestsPigeonInternal.isNullish(aDouble) ? nil : aDouble!.doubleValue)) + ? nil + : NSNumber( + value: api!.callFlutterEchoNullable( + NativeInteropTestsPigeonInternal.isNullish(aDouble) ? nil : aDouble!.doubleValue)!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> NSString? { + do { + return try api!.callFlutterEchoNullable(aString as String?) as NSString? + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData?, wrappedError: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? { + do { + let res = try api!.callFlutterEchoNullable( + NativeInteropTestsPigeonInternal.isNullish(list) ? nil : list!.toUint8Array()) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData?, wrappedError: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? { + do { + let res = try api!.callFlutterEchoNullable( + NativeInteropTestsPigeonInternal.isNullish(list) ? nil : list!.toInt32Array()) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData?, wrappedError: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? { + do { + let res = try api!.callFlutterEchoNullable( + NativeInteropTestsPigeonInternal.isNullish(list) ? nil : list!.toInt64Array()) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData?, wrappedError: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? { + do { + let res = try api!.callFlutterEchoNullable( + NativeInteropTestsPigeonInternal.isNullish(list) ? nil : list!.toFloat64Array()) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullable( + enumList: _PigeonFfiCodec.readValue( + value: enumList as NSObject?, type: "NativeInteropAnEnum") as? [NativeInteropAnEnum?])) + as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullable( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject?, type: "NativeInteropAllNullableTypes") + as? [NativeInteropAllNullableTypes?])) as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullableNonNull( + enumList: _PigeonFfiCodec.readValue( + value: enumList as NSObject?, type: "NativeInteropAnEnum") as? [NativeInteropAnEnum])) + as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullableNonNull( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject?, type: "NativeInteropAllNullableTypes") + as? [NativeInteropAllNullableTypes])) as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullable( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject?, type: "NativeInteropAnEnum", type2: "NativeInteropAnEnum") + as? [NativeInteropAnEnum?: NativeInteropAnEnum?])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullable( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject?, type: "int", type2: "NativeInteropAllNullableTypes") + as? [Int64?: NativeInteropAllNullableTypes?])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullableNonNull( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject?, type: "NativeInteropAnEnum", type2: "NativeInteropAnEnum") + as? [NativeInteropAnEnum: NativeInteropAnEnum])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> [NSObject: NSObject]? { + do { + return try _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoNullableNonNull( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject?, type: "int", type2: "NativeInteropAllNullableTypes") + as? [Int64: NativeInteropAllNullableTypes])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + -> NSNumber? + { + do { + let res = try api!.callFlutterEchoNullable( + NativeInteropTestsPigeonInternal.isNullish(anEnum) + ? nil : NativeInteropAnEnum.init(rawValue: anEnum!.intValue))?.rawValue + return NativeInteropTestsPigeonInternal.isNullish(res) ? nil : NSNumber(value: res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) -> NSNumber? { + do { + let res = try api!.callFlutterEchoNullable( + NativeInteropTestsPigeonInternal.isNullish(anotherEnum) + ? nil : NativeInteropAnotherEnum.init(rawValue: anotherEnum!.intValue))?.rawValue + return NativeInteropTestsPigeonInternal.isNullish(res) ? nil : NSNumber(value: res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) async { + do { + return try await api!.callFlutterNoopAsync() + } catch let error as NativeInteropTestsError { + 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 callFlutterEchoAsyncNativeInteropAllTypes( + everything: NativeInteropAllTypesBridge, wrappedError: NativeInteropTestsError + ) async -> NativeInteropAllTypesBridge? { + do { + return try await NativeInteropAllTypesBridge.fromSwift( + api!.callFlutterEchoAsyncNativeInteropAllTypes(everything: everything.toSwift()))! + } catch let error as NativeInteropTestsError { + 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 callFlutterEchoAsyncNullableNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypesBridge?, wrappedError: NativeInteropTestsError + ) async -> NativeInteropAllNullableTypesBridge? { + do { + return try await NativeInteropAllNullableTypesBridge.fromSwift( + api!.callFlutterEchoAsyncNullableNativeInteropAllNullableTypes( + everything: NativeInteropTestsPigeonInternal.isNullish(everything) + ? nil : everything!.toSwift())) + } catch let error as NativeInteropTestsError { + 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 callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursionBridge?, + wrappedError: NativeInteropTestsError + ) async -> NativeInteropAllNullableTypesWithoutRecursionBridge? { + do { + return try await NativeInteropAllNullableTypesWithoutRecursionBridge.fromSwift( + api!.callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropTestsPigeonInternal.isNullish(everything) + ? nil : everything!.toSwift())) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) async + -> NSNumber? + { + do { + return try await NSNumber(value: api!.callFlutterEchoAsyncBool(aBool: aBool)) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) async + -> NSNumber? + { + do { + return try await NSNumber(value: api!.callFlutterEchoAsyncInt(anInt: anInt)) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + async -> NSNumber? + { + do { + return try await NSNumber(value: api!.callFlutterEchoAsyncDouble(aDouble: aDouble)) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + async -> NSString? + { + do { + return try await api!.callFlutterEchoAsyncString(aString: aString as String) as NSString? + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData, wrappedError: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? { + do { + let res = try await api!.callFlutterEchoAsyncUint8List(list: list.toUint8Array()!) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData, wrappedError: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? { + do { + let res = try await api!.callFlutterEchoAsyncInt32List(list: list.toInt32Array()!) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData, wrappedError: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? { + do { + let res = try await api!.callFlutterEchoAsyncInt64List(list: list.toInt64Array()!) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData, wrappedError: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? { + do { + let res = try await api!.callFlutterEchoAsyncFloat64List(list: list.toFloat64Array()!) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) + async -> NSObject? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncObject( + anObject: _PigeonFfiCodec.readValue(value: anObject)!), isObject: true) as? NSObject + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) 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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> [NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncEnumList( + enumList: _PigeonFfiCodec.readValue( + value: enumList as NSObject, type: "NativeInteropAnEnum") as! [NativeInteropAnEnum?])) + as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> [NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncClassList( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject, type: "NativeInteropAllNullableTypes") + as! [NativeInteropAllNullableTypes?])) as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> [NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNonNullEnumList( + enumList: _PigeonFfiCodec.readValue( + value: enumList as NSObject, type: "NativeInteropAnEnum") as! [NativeInteropAnEnum])) + as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> [NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNonNullClassList( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject, type: "NativeInteropAllNullableTypes") + as! [NativeInteropAllNullableTypes])) as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) 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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) 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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) 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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> [NSObject: NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncEnumMap( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject, type: "NativeInteropAnEnum", type2: "NativeInteropAnEnum") + as! [NativeInteropAnEnum?: NativeInteropAnEnum?])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> [NSObject: NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncClassMap( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject, type: "int", type2: "NativeInteropAllNullableTypes") + as! [Int64?: NativeInteropAllNullableTypes?])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropAnEnum, wrappedError: NativeInteropTestsError + ) async -> NSNumber? { + do { + return try await NSNumber(value: api!.callFlutterEchoAsyncEnum(anEnum: anEnum).rawValue) + } catch let error as NativeInteropTestsError { + 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: NativeInteropAnotherEnum, wrappedError: NativeInteropTestsError + ) async -> NSNumber? { + do { + return try await NSNumber( + value: api!.callFlutterEchoAnotherAsyncEnum(anotherEnum: anotherEnum).rawValue) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> NSNumber? { + do { + return try await NativeInteropTestsPigeonInternal.isNullish( + api!.callFlutterEchoAsyncNullableBool( + aBool: NativeInteropTestsPigeonInternal.isNullish(aBool) ? nil : aBool!.boolValue)) + ? nil + : NSNumber( + value: api!.callFlutterEchoAsyncNullableBool( + aBool: NativeInteropTestsPigeonInternal.isNullish(aBool) ? nil : aBool!.boolValue)!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> NSNumber? { + do { + return try await NativeInteropTestsPigeonInternal.isNullish( + api!.callFlutterEchoAsyncNullableInt( + anInt: NativeInteropTestsPigeonInternal.isNullish(anInt) ? nil : anInt!.int64Value)) + ? nil + : NSNumber( + value: api!.callFlutterEchoAsyncNullableInt( + anInt: NativeInteropTestsPigeonInternal.isNullish(anInt) ? nil : anInt!.int64Value)!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> NSNumber? { + do { + return try await NativeInteropTestsPigeonInternal.isNullish( + api!.callFlutterEchoAsyncNullableDouble( + aDouble: NativeInteropTestsPigeonInternal.isNullish(aDouble) ? nil : aDouble!.doubleValue) + ) + ? nil + : NSNumber( + value: api!.callFlutterEchoAsyncNullableDouble( + aDouble: NativeInteropTestsPigeonInternal.isNullish(aDouble) + ? nil : aDouble!.doubleValue)!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> NSString? { + do { + return try await api!.callFlutterEchoAsyncNullableString(aString: aString as String?) + as NSString? + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData?, wrappedError: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? { + do { + let res = try await api!.callFlutterEchoAsyncNullableUint8List( + list: NativeInteropTestsPigeonInternal.isNullish(list) ? nil : list!.toUint8Array()) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData?, wrappedError: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? { + do { + let res = try await api!.callFlutterEchoAsyncNullableInt32List( + list: NativeInteropTestsPigeonInternal.isNullish(list) ? nil : list!.toInt32Array()) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData?, wrappedError: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? { + do { + let res = try await api!.callFlutterEchoAsyncNullableInt64List( + list: NativeInteropTestsPigeonInternal.isNullish(list) ? nil : list!.toInt64Array()) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsPigeonTypedData?, wrappedError: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? { + do { + let res = try await api!.callFlutterEchoAsyncNullableFloat64List( + list: NativeInteropTestsPigeonInternal.isNullish(list) ? nil : list!.toFloat64Array()) + return NativeInteropTestsPigeonInternal.isNullish(res) + ? nil : NativeInteropTestsPigeonTypedData(res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) async + -> NSObject? + { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterThrowFlutterErrorAsync(), isObject: true) as? NSObject + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> NSObject? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableObject( + anObject: _PigeonFfiCodec.readValue(value: anObject)), isObject: true) as? NSObject + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) 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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> [NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableEnumList( + enumList: _PigeonFfiCodec.readValue( + value: enumList as NSObject?, type: "NativeInteropAnEnum") as? [NativeInteropAnEnum?])) + as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> [NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableClassList( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject?, type: "NativeInteropAllNullableTypes") + as? [NativeInteropAllNullableTypes?])) as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> [NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableNonNullEnumList( + enumList: _PigeonFfiCodec.readValue( + value: enumList as NSObject?, type: "NativeInteropAnEnum") as? [NativeInteropAnEnum])) + as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> [NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableNonNullClassList( + classList: _PigeonFfiCodec.readValue( + value: classList as NSObject?, type: "NativeInteropAllNullableTypes") + as? [NativeInteropAllNullableTypes])) as? [NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) 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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) 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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) 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 NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> [NSObject: NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableEnumMap( + enumMap: _PigeonFfiCodec.readValue( + value: enumMap as NSObject?, type: "NativeInteropAnEnum", type2: "NativeInteropAnEnum") + as? [NativeInteropAnEnum?: NativeInteropAnEnum?])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> [NSObject: NSObject]? { + do { + return try await _PigeonFfiCodec.writeValue( + value: api!.callFlutterEchoAsyncNullableClassMap( + classMap: _PigeonFfiCodec.readValue( + value: classMap as NSObject?, type: "int", type2: "NativeInteropAllNullableTypes") + as? [Int64?: NativeInteropAllNullableTypes?])) as? [NSObject: NSObject] + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> NSNumber? { + do { + let res = try await api!.callFlutterEchoAsyncNullableEnum( + anEnum: NativeInteropTestsPigeonInternal.isNullish(anEnum) + ? nil : NativeInteropAnEnum.init(rawValue: anEnum!.intValue))?.rawValue + return NativeInteropTestsPigeonInternal.isNullish(res) ? nil : NSNumber(value: res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError + ) async -> NSNumber? { + do { + let res = try await api!.callFlutterEchoAnotherAsyncNullableEnum( + anotherEnum: NativeInteropTestsPigeonInternal.isNullish(anotherEnum) + ? nil : NativeInteropAnotherEnum.init(rawValue: anotherEnum!.intValue))?.rawValue + return NativeInteropTestsPigeonInternal.isNullish(res) ? nil : NSNumber(value: res!) + } catch let error as NativeInteropTestsError { + 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: NativeInteropTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.defaultIsMainThread()) + } catch let error as NativeInteropTestsError { + 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 [NativeInteropFlutterIntegrationCoreApi]. + /// + /// Returns the result of whether the flutter call was successful. + @objc func callFlutterNoopOnBackgroundThread(wrappedError: NativeInteropTestsError) async + -> NSNumber? + { + do { + return try await NSNumber(value: api!.callFlutterNoopOnBackgroundThread()) + } catch let error as NativeInteropTestsError { + 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 + } + /// Tests deregistering a Host API natively. + @objc func testDeregisterHostApi(wrappedError: NativeInteropTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.testDeregisterHostApi()) + } catch let error as NativeInteropTestsError { + 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 + } + /// Tests deregistering a Flutter API natively. + @objc func testDeregisterFlutterApi(wrappedError: NativeInteropTestsError) -> NSNumber? { + do { + return try NSNumber(value: api!.testDeregisterFlutterApi()) + } catch let error as NativeInteropTestsError { + 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 + } + /// Registers and immediately deregisters a Host API under [name]. + @objc func registerAndImmediatelyDeregisterHostApi( + name: NSString, wrappedError: NativeInteropTestsError + ) { + do { + return try api!.registerAndImmediatelyDeregisterHostApi(name: name as String) + } catch let error as NativeInteropTestsError { + 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 + } + /// Tests that calling a deregistered Flutter API under [name] fails / returns null. + @objc func testCallDeregisteredFlutterApi(name: NSString, wrappedError: NativeInteropTestsError) + -> NSNumber? + { + do { + return try NSNumber(value: api!.testCallDeregisteredFlutterApi(name: name as String)) + } catch let error as NativeInteropTestsError { + 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. +@objc protocol NativeInteropFlutterIntegrationCoreApiBridge { + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic calling. + @objc func noop(error: NativeInteropTestsError) + /// Returns a Flutter error, to test error handling. + @objc func throwFlutterError(error: NativeInteropTestsError) -> NSObject? + /// Responds with an error from an async function returning a value. + @objc func throwError(error: NativeInteropTestsError) -> NSObject? + /// Responds with an error from an async void function. + @objc func throwErrorFromVoid(error: NativeInteropTestsError) + /// Returns the passed object, to test serialization and deserialization. + @objc func echoNativeInteropAllTypes( + everything: NativeInteropAllTypesBridge?, error: NativeInteropTestsError + ) -> NativeInteropAllTypesBridge? + /// Returns the passed object, to test serialization and deserialization. + @objc func echoNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypesBridge?, error: NativeInteropTestsError + ) -> NativeInteropAllNullableTypesBridge? + /// Returns passed in arguments of multiple types. + /// + /// Tests multiple-arity FlutterApi handling. + @objc func sendMultipleNullableTypes( + aNullableBool: NSNumber?, aNullableInt: NSNumber?, aNullableString: NSString?, + error: NativeInteropTestsError + ) -> NativeInteropAllNullableTypesBridge? + /// Returns the passed object, to test serialization and deserialization. + @objc func echoNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursionBridge?, error: NativeInteropTestsError + ) -> NativeInteropAllNullableTypesWithoutRecursionBridge? + /// Returns passed in arguments of multiple types. + /// + /// Tests multiple-arity FlutterApi handling. + @objc func sendMultipleNullableTypesWithoutRecursion( + aNullableBool: NSNumber?, aNullableInt: NSNumber?, aNullableString: NSString?, + error: NativeInteropTestsError + ) -> NativeInteropAllNullableTypesWithoutRecursionBridge? + /// Returns the passed boolean, to test serialization and deserialization. + @objc func echoBool(aBool: NSNumber?, error: NativeInteropTestsError) -> NSNumber? + /// Returns the passed int, to test serialization and deserialization. + @objc func echoInt(anInt: NSNumber?, error: NativeInteropTestsError) -> NSNumber? + /// Returns the passed double, to test serialization and deserialization. + @objc func echoDouble(aDouble: NSNumber?, error: NativeInteropTestsError) -> NSNumber? + /// Returns the passed string, to test serialization and deserialization. + @objc func echoString(aString: NSString?, error: NativeInteropTestsError) -> NSString? + /// Returns the passed byte list, to test serialization and deserialization. + @objc func echoUint8List(list: NativeInteropTestsPigeonTypedData?, error: NativeInteropTestsError) + -> NativeInteropTestsPigeonTypedData? + /// Returns the passed int32 list, to test serialization and deserialization. + @objc func echoInt32List(list: NativeInteropTestsPigeonTypedData?, error: NativeInteropTestsError) + -> NativeInteropTestsPigeonTypedData? + /// Returns the passed int64 list, to test serialization and deserialization. + @objc func echoInt64List(list: NativeInteropTestsPigeonTypedData?, error: NativeInteropTestsError) + -> NativeInteropTestsPigeonTypedData? + /// Returns the passed float64 list, to test serialization and deserialization. + @objc func echoFloat64List( + list: NativeInteropTestsPigeonTypedData?, error: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoList(list: [NSObject]?, error: NativeInteropTestsError) -> [NSObject]? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoEnumList(enumList: [NSObject]?, error: NativeInteropTestsError) -> [NSObject]? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoClassList(classList: [NSObject]?, error: NativeInteropTestsError) -> [NSObject]? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNonNullEnumList(enumList: [NSObject]?, error: NativeInteropTestsError) + -> [NSObject]? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNonNullClassList(classList: [NSObject]?, error: NativeInteropTestsError) + -> [NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoMap(map: [NSObject: NSObject]?, error: NativeInteropTestsError) -> [NSObject: + NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoStringMap(stringMap: [NSObject: NSObject]?, error: NativeInteropTestsError) + -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoIntMap(intMap: [NSObject: NSObject]?, error: NativeInteropTestsError) -> [NSObject: + NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoEnumMap(enumMap: [NSObject: NSObject]?, error: NativeInteropTestsError) + -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoClassMap(classMap: [NSObject: NSObject]?, error: NativeInteropTestsError) + -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNonNullStringMap(stringMap: [NSObject: NSObject]?, error: NativeInteropTestsError) + -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNonNullIntMap(intMap: [NSObject: NSObject]?, error: NativeInteropTestsError) + -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNonNullEnumMap(enumMap: [NSObject: NSObject]?, error: NativeInteropTestsError) + -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNonNullClassMap(classMap: [NSObject: NSObject]?, error: NativeInteropTestsError) + -> [NSObject: NSObject]? + /// Returns the passed enum to test serialization and deserialization. + @objc func echoEnum(anEnum: NSNumber?, error: NativeInteropTestsError) -> NSNumber? + /// Returns the passed enum to test serialization and deserialization. + @objc func echoNativeInteropAnotherEnum(anotherEnum: NSNumber?, error: NativeInteropTestsError) + -> NSNumber? + /// Returns the passed boolean, to test serialization and deserialization. + @objc func echoNullableBool(aBool: NSNumber?, error: NativeInteropTestsError) -> NSNumber? + /// Returns the passed int, to test serialization and deserialization. + @objc func echoNullableInt(anInt: NSNumber?, error: NativeInteropTestsError) -> NSNumber? + /// Returns the passed double, to test serialization and deserialization. + @objc func echoNullableDouble(aDouble: NSNumber?, error: NativeInteropTestsError) -> NSNumber? + /// Returns the passed string, to test serialization and deserialization. + @objc func echoNullableString(aString: NSString?, error: NativeInteropTestsError) -> NSString? + /// Returns the passed byte list, to test serialization and deserialization. + @objc func echoNullableUint8List( + list: NativeInteropTestsPigeonTypedData?, error: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? + /// Returns the passed int32 list, to test serialization and deserialization. + @objc func echoNullableInt32List( + list: NativeInteropTestsPigeonTypedData?, error: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? + /// Returns the passed int64 list, to test serialization and deserialization. + @objc func echoNullableInt64List( + list: NativeInteropTestsPigeonTypedData?, error: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? + /// Returns the passed float64 list, to test serialization and deserialization. + @objc func echoNullableFloat64List( + list: NativeInteropTestsPigeonTypedData?, error: NativeInteropTestsError + ) -> NativeInteropTestsPigeonTypedData? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNullableList(list: [NSObject]?, error: NativeInteropTestsError) -> [NSObject]? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNullableEnumList(enumList: [NSObject]?, error: NativeInteropTestsError) + -> [NSObject]? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNullableClassList(classList: [NSObject]?, error: NativeInteropTestsError) + -> [NSObject]? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNullableNonNullEnumList(enumList: [NSObject]?, error: NativeInteropTestsError) + -> [NSObject]? + /// Returns the passed list, to test serialization and deserialization. + @objc func echoNullableNonNullClassList(classList: [NSObject]?, error: NativeInteropTestsError) + -> [NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableMap(map: [NSObject: NSObject]?, error: NativeInteropTestsError) + -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableStringMap(stringMap: [NSObject: NSObject]?, error: NativeInteropTestsError) + -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableIntMap(intMap: [NSObject: NSObject]?, error: NativeInteropTestsError) + -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableEnumMap(enumMap: [NSObject: NSObject]?, error: NativeInteropTestsError) + -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableClassMap(classMap: [NSObject: NSObject]?, error: NativeInteropTestsError) + -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableNonNullStringMap( + stringMap: [NSObject: NSObject]?, error: NativeInteropTestsError + ) -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableNonNullIntMap( + intMap: [NSObject: NSObject]?, error: NativeInteropTestsError + ) -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableNonNullEnumMap( + enumMap: [NSObject: NSObject]?, error: NativeInteropTestsError + ) -> [NSObject: NSObject]? + /// Returns the passed map, to test serialization and deserialization. + @objc func echoNullableNonNullClassMap( + classMap: [NSObject: NSObject]?, error: NativeInteropTestsError + ) -> [NSObject: NSObject]? + /// Returns the passed enum to test serialization and deserialization. + @objc func echoNullableEnum(anEnum: NSNumber?, error: NativeInteropTestsError) -> NSNumber? + /// Returns the passed enum to test serialization and deserialization. + @objc func echoAnotherNullableEnum(anotherEnum: NSNumber?, error: NativeInteropTestsError) + -> NSNumber? + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + @objc func noopAsync(error: NativeInteropTestsError) async + @objc func throwFlutterErrorAsync(error: NativeInteropTestsError) async -> NSObject? + @objc func echoAsyncNativeInteropAllTypes( + everything: NativeInteropAllTypesBridge?, error: NativeInteropTestsError + ) async -> NativeInteropAllTypesBridge? + @objc func echoAsyncNullableNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypesBridge?, error: NativeInteropTestsError + ) async -> NativeInteropAllNullableTypesBridge? + @objc func echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursionBridge?, error: NativeInteropTestsError + ) async -> NativeInteropAllNullableTypesWithoutRecursionBridge? + @objc func echoAsyncBool(aBool: NSNumber?, error: NativeInteropTestsError) async -> NSNumber? + @objc func echoAsyncInt(anInt: NSNumber?, error: NativeInteropTestsError) async -> NSNumber? + @objc func echoAsyncDouble(aDouble: NSNumber?, error: NativeInteropTestsError) async -> NSNumber? + @objc func echoAsyncString(aString: NSString?, error: NativeInteropTestsError) async -> NSString? + @objc func echoAsyncUint8List( + list: NativeInteropTestsPigeonTypedData?, error: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? + @objc func echoAsyncInt32List( + list: NativeInteropTestsPigeonTypedData?, error: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? + @objc func echoAsyncInt64List( + list: NativeInteropTestsPigeonTypedData?, error: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? + @objc func echoAsyncFloat64List( + list: NativeInteropTestsPigeonTypedData?, error: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? + @objc func echoAsyncObject(anObject: NSObject?, error: NativeInteropTestsError) async -> NSObject? + @objc func echoAsyncList(list: [NSObject]?, error: NativeInteropTestsError) async -> [NSObject]? + @objc func echoAsyncEnumList(enumList: [NSObject]?, error: NativeInteropTestsError) async + -> [NSObject]? + @objc func echoAsyncClassList(classList: [NSObject]?, error: NativeInteropTestsError) async + -> [NSObject]? + @objc func echoAsyncNonNullEnumList(enumList: [NSObject]?, error: NativeInteropTestsError) async + -> [NSObject]? + @objc func echoAsyncNonNullClassList(classList: [NSObject]?, error: NativeInteropTestsError) async + -> [NSObject]? + @objc func echoAsyncMap(map: [NSObject: NSObject]?, error: NativeInteropTestsError) async + -> [NSObject: NSObject]? + @objc func echoAsyncStringMap(stringMap: [NSObject: NSObject]?, error: NativeInteropTestsError) + async -> [NSObject: NSObject]? + @objc func echoAsyncIntMap(intMap: [NSObject: NSObject]?, error: NativeInteropTestsError) async + -> [NSObject: NSObject]? + @objc func echoAsyncEnumMap(enumMap: [NSObject: NSObject]?, error: NativeInteropTestsError) async + -> [NSObject: NSObject]? + @objc func echoAsyncClassMap(classMap: [NSObject: NSObject]?, error: NativeInteropTestsError) + async -> [NSObject: NSObject]? + @objc func echoAsyncEnum(anEnum: NSNumber?, error: NativeInteropTestsError) async -> NSNumber? + @objc func echoAnotherAsyncEnum(anotherEnum: NSNumber?, error: NativeInteropTestsError) async + -> NSNumber? + @objc func echoAsyncNullableBool(aBool: NSNumber?, error: NativeInteropTestsError) async + -> NSNumber? + @objc func echoAsyncNullableInt(anInt: NSNumber?, error: NativeInteropTestsError) async + -> NSNumber? + @objc func echoAsyncNullableDouble(aDouble: NSNumber?, error: NativeInteropTestsError) async + -> NSNumber? + @objc func echoAsyncNullableString(aString: NSString?, error: NativeInteropTestsError) async + -> NSString? + @objc func echoAsyncNullableUint8List( + list: NativeInteropTestsPigeonTypedData?, error: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? + @objc func echoAsyncNullableInt32List( + list: NativeInteropTestsPigeonTypedData?, error: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? + @objc func echoAsyncNullableInt64List( + list: NativeInteropTestsPigeonTypedData?, error: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? + @objc func echoAsyncNullableFloat64List( + list: NativeInteropTestsPigeonTypedData?, error: NativeInteropTestsError + ) async -> NativeInteropTestsPigeonTypedData? + @objc func echoAsyncNullableObject(anObject: NSObject?, error: NativeInteropTestsError) async + -> NSObject? + @objc func echoAsyncNullableList(list: [NSObject]?, error: NativeInteropTestsError) async + -> [NSObject]? + @objc func echoAsyncNullableEnumList(enumList: [NSObject]?, error: NativeInteropTestsError) async + -> [NSObject]? + @objc func echoAsyncNullableClassList(classList: [NSObject]?, error: NativeInteropTestsError) + async -> [NSObject]? + @objc func echoAsyncNullableNonNullEnumList(enumList: [NSObject]?, error: NativeInteropTestsError) + async -> [NSObject]? + @objc func echoAsyncNullableNonNullClassList( + classList: [NSObject]?, error: NativeInteropTestsError + ) async -> [NSObject]? + @objc func echoAsyncNullableMap(map: [NSObject: NSObject]?, error: NativeInteropTestsError) async + -> [NSObject: NSObject]? + @objc func echoAsyncNullableStringMap( + stringMap: [NSObject: NSObject]?, error: NativeInteropTestsError + ) async -> [NSObject: NSObject]? + @objc func echoAsyncNullableIntMap(intMap: [NSObject: NSObject]?, error: NativeInteropTestsError) + async -> [NSObject: NSObject]? + @objc func echoAsyncNullableEnumMap( + enumMap: [NSObject: NSObject]?, error: NativeInteropTestsError + ) async -> [NSObject: NSObject]? + @objc func echoAsyncNullableClassMap( + classMap: [NSObject: NSObject]?, error: NativeInteropTestsError + ) async -> [NSObject: NSObject]? + @objc func echoAsyncNullableEnum(anEnum: NSNumber?, error: NativeInteropTestsError) async + -> NSNumber? + @objc func echoAnotherAsyncNullableEnum(anotherEnum: NSNumber?, error: NativeInteropTestsError) + async -> NSNumber? +} + +@objc class NativeInteropFlutterIntegrationCoreApiRegistrar: NSObject { + static var registeredNativeInteropFlutterIntegrationCoreApi = [ + String: NativeInteropFlutterIntegrationCoreApi + ]() + + @objc static func registerInstance( + api: NativeInteropFlutterIntegrationCoreApiBridge?, + name: String = NativeInteropTestsPigeonInternal.defaultInstanceName + ) { + if let api = api { + NativeInteropFlutterIntegrationCoreApiRegistrar + .registeredNativeInteropFlutterIntegrationCoreApi[name] = + NativeInteropFlutterIntegrationCoreApi(api: api) + } else { + NativeInteropFlutterIntegrationCoreApiRegistrar + .registeredNativeInteropFlutterIntegrationCoreApi.removeValue(forKey: name) + } + } + + static func getInstance(name: String = NativeInteropTestsPigeonInternal.defaultInstanceName) + -> NativeInteropFlutterIntegrationCoreApi? + { + return + NativeInteropFlutterIntegrationCoreApiRegistrar + .registeredNativeInteropFlutterIntegrationCoreApi[name] + } +} + +class NativeInteropFlutterIntegrationCoreApi { + private let api: NativeInteropFlutterIntegrationCoreApiBridge + + fileprivate init(api: NativeInteropFlutterIntegrationCoreApiBridge) { + self.api = api + } + + static func getInstance(name: String = NativeInteropTestsPigeonInternal.defaultInstanceName) + -> NativeInteropFlutterIntegrationCoreApi? + { + return NativeInteropFlutterIntegrationCoreApiRegistrar.getInstance(name: name) + } + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic calling. + func noop() throws { + let error = NativeInteropTestsError() + api.noop(error: error) + if error.code != nil { + throw error + } + } + + /// Returns a Flutter error, to test error handling. + func throwFlutterError() throws -> Any? { + let error = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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 = NativeInteropTestsError() + api.throwErrorFromVoid(error: error) + if error.code != nil { + throw error + } + } + + /// Returns the passed object, to test serialization and deserialization. + func echoNativeInteropAllTypes(everything: NativeInteropAllTypes) throws -> NativeInteropAllTypes + { + let error = NativeInteropTestsError() + let res = api.echoNativeInteropAllTypes( + everything: NativeInteropAllTypesBridge.fromSwift(everything)!, error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NativeInteropAllTypes") + as! NativeInteropAllTypes + } + + /// Returns the passed object, to test serialization and deserialization. + func echoNativeInteropAllNullableTypes(everything: NativeInteropAllNullableTypes?) throws + -> NativeInteropAllNullableTypes? + { + let error = NativeInteropTestsError() + let res = api.echoNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypesBridge.fromSwift(everything), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NativeInteropAllNullableTypes") + as! NativeInteropAllNullableTypes? + } + + /// Returns passed in arguments of multiple types. + /// + /// Tests multiple-arity FlutterApi handling. + func sendMultipleNullableTypes( + aNullableBool: Bool?, aNullableInt: Int64?, aNullableString: String? + ) throws -> NativeInteropAllNullableTypes { + let error = NativeInteropTestsError() + let res = api.sendMultipleNullableTypes( + aNullableBool: NativeInteropTestsPigeonInternal.isNullish(aNullableBool) + ? nil : NSNumber(value: aNullableBool!), + aNullableInt: NativeInteropTestsPigeonInternal.isNullish(aNullableInt) + ? nil : NSNumber(value: aNullableInt!), aNullableString: aNullableString as NSString?, + error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NativeInteropAllNullableTypes") + as! NativeInteropAllNullableTypes + } + + /// Returns the passed object, to test serialization and deserialization. + func echoNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ) throws -> NativeInteropAllNullableTypesWithoutRecursion? { + let error = NativeInteropTestsError() + let res = api.echoNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursionBridge.fromSwift(everything), + error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue( + value: (res), type: "NativeInteropAllNullableTypesWithoutRecursion") + as! NativeInteropAllNullableTypesWithoutRecursion? + } + + /// Returns passed in arguments of multiple types. + /// + /// Tests multiple-arity FlutterApi handling. + func sendMultipleNullableTypesWithoutRecursion( + aNullableBool: Bool?, aNullableInt: Int64?, aNullableString: String? + ) throws -> NativeInteropAllNullableTypesWithoutRecursion { + let error = NativeInteropTestsError() + let res = api.sendMultipleNullableTypesWithoutRecursion( + aNullableBool: NativeInteropTestsPigeonInternal.isNullish(aNullableBool) + ? nil : NSNumber(value: aNullableBool!), + aNullableInt: NativeInteropTestsPigeonInternal.isNullish(aNullableInt) + ? nil : NSNumber(value: aNullableInt!), aNullableString: aNullableString as NSString?, + error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue( + value: (res), type: "NativeInteropAllNullableTypesWithoutRecursion") + as! NativeInteropAllNullableTypesWithoutRecursion + } + + /// Returns the passed boolean, to test serialization and deserialization. + func echoBool(aBool: Bool) throws -> Bool { + let error = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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 = NativeInteropTestsError() + let res = api.echoUint8List( + list: NativeInteropTestsPigeonInternal.isNullish(list) + ? nil : NativeInteropTestsPigeonTypedData(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 = NativeInteropTestsError() + let res = api.echoInt32List( + list: NativeInteropTestsPigeonInternal.isNullish(list) + ? nil : NativeInteropTestsPigeonTypedData(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 = NativeInteropTestsError() + let res = api.echoInt64List( + list: NativeInteropTestsPigeonInternal.isNullish(list) + ? nil : NativeInteropTestsPigeonTypedData(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 = NativeInteropTestsError() + let res = api.echoFloat64List( + list: NativeInteropTestsPigeonInternal.isNullish(list) + ? nil : NativeInteropTestsPigeonTypedData(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 = NativeInteropTestsError() + 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: [NativeInteropAnEnum?]) throws -> [NativeInteropAnEnum?] { + let error = NativeInteropTestsError() + 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! [NativeInteropAnEnum?] + } + + /// Returns the passed list, to test serialization and deserialization. + func echoClassList(classList: [NativeInteropAllNullableTypes?]) throws + -> [NativeInteropAllNullableTypes?] + { + let error = NativeInteropTestsError() + 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! [NativeInteropAllNullableTypes?] + } + + /// Returns the passed list, to test serialization and deserialization. + func echoNonNullEnumList(enumList: [NativeInteropAnEnum]) throws -> [NativeInteropAnEnum] { + let error = NativeInteropTestsError() + 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! [NativeInteropAnEnum] + } + + /// Returns the passed list, to test serialization and deserialization. + func echoNonNullClassList(classList: [NativeInteropAllNullableTypes]) throws + -> [NativeInteropAllNullableTypes] + { + let error = NativeInteropTestsError() + 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! [NativeInteropAllNullableTypes] + } + + /// Returns the passed map, to test serialization and deserialization. + func echoMap(map: [AnyHashable?: Any?]) throws -> [AnyHashable?: Any?] { + let error = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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: [NativeInteropAnEnum?: NativeInteropAnEnum?]) throws + -> [NativeInteropAnEnum?: NativeInteropAnEnum?] + { + let error = NativeInteropTestsError() + 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! [NativeInteropAnEnum?: NativeInteropAnEnum?] + } + + /// Returns the passed map, to test serialization and deserialization. + func echoClassMap(classMap: [Int64?: NativeInteropAllNullableTypes?]) throws -> [Int64?: + NativeInteropAllNullableTypes?] + { + let error = NativeInteropTestsError() + 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?: NativeInteropAllNullableTypes?] + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNonNullStringMap(stringMap: [String: String]) throws -> [String: String] { + let error = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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: [NativeInteropAnEnum: NativeInteropAnEnum]) throws + -> [NativeInteropAnEnum: NativeInteropAnEnum] + { + let error = NativeInteropTestsError() + 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! [NativeInteropAnEnum: NativeInteropAnEnum] + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNonNullClassMap(classMap: [Int64: NativeInteropAllNullableTypes]) throws -> [Int64: + NativeInteropAllNullableTypes] + { + let error = NativeInteropTestsError() + 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: NativeInteropAllNullableTypes] + } + + /// Returns the passed enum to test serialization and deserialization. + func echoEnum(anEnum: NativeInteropAnEnum) throws -> NativeInteropAnEnum { + let error = NativeInteropTestsError() + let res = api.echoEnum(anEnum: NSNumber(value: anEnum.rawValue), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NativeInteropAnEnum") + as! NativeInteropAnEnum + } + + /// Returns the passed enum to test serialization and deserialization. + func echoNativeInteropAnotherEnum(anotherEnum: NativeInteropAnotherEnum) throws + -> NativeInteropAnotherEnum + { + let error = NativeInteropTestsError() + let res = api.echoNativeInteropAnotherEnum( + anotherEnum: NSNumber(value: anotherEnum.rawValue), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NativeInteropAnotherEnum") + as! NativeInteropAnotherEnum + } + + /// Returns the passed boolean, to test serialization and deserialization. + func echoNullableBool(aBool: Bool?) throws -> Bool? { + let error = NativeInteropTestsError() + let res = api.echoNullableBool( + aBool: NativeInteropTestsPigeonInternal.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 = NativeInteropTestsError() + let res = api.echoNullableInt( + anInt: NativeInteropTestsPigeonInternal.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 = NativeInteropTestsError() + let res = api.echoNullableDouble( + aDouble: NativeInteropTestsPigeonInternal.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 = NativeInteropTestsError() + 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 = NativeInteropTestsError() + let res = api.echoNullableUint8List( + list: NativeInteropTestsPigeonInternal.isNullish(list) + ? nil : NativeInteropTestsPigeonTypedData(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 = NativeInteropTestsError() + let res = api.echoNullableInt32List( + list: NativeInteropTestsPigeonInternal.isNullish(list) + ? nil : NativeInteropTestsPigeonTypedData(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 = NativeInteropTestsError() + let res = api.echoNullableInt64List( + list: NativeInteropTestsPigeonInternal.isNullish(list) + ? nil : NativeInteropTestsPigeonTypedData(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 = NativeInteropTestsError() + let res = api.echoNullableFloat64List( + list: NativeInteropTestsPigeonInternal.isNullish(list) + ? nil : NativeInteropTestsPigeonTypedData(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 = NativeInteropTestsError() + 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: [NativeInteropAnEnum?]?) throws -> [NativeInteropAnEnum?]? { + let error = NativeInteropTestsError() + 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! [NativeInteropAnEnum?]? + } + + /// Returns the passed list, to test serialization and deserialization. + func echoNullableClassList(classList: [NativeInteropAllNullableTypes?]?) throws + -> [NativeInteropAllNullableTypes?]? + { + let error = NativeInteropTestsError() + 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! [NativeInteropAllNullableTypes?]? + } + + /// Returns the passed list, to test serialization and deserialization. + func echoNullableNonNullEnumList(enumList: [NativeInteropAnEnum]?) throws + -> [NativeInteropAnEnum]? + { + let error = NativeInteropTestsError() + 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! [NativeInteropAnEnum]? + } + + /// Returns the passed list, to test serialization and deserialization. + func echoNullableNonNullClassList(classList: [NativeInteropAllNullableTypes]?) throws + -> [NativeInteropAllNullableTypes]? + { + let error = NativeInteropTestsError() + 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! [NativeInteropAllNullableTypes]? + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNullableMap(map: [AnyHashable?: Any?]?) throws -> [AnyHashable?: Any?]? { + let error = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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: [NativeInteropAnEnum?: NativeInteropAnEnum?]?) throws + -> [NativeInteropAnEnum?: NativeInteropAnEnum?]? + { + let error = NativeInteropTestsError() + 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! [NativeInteropAnEnum?: NativeInteropAnEnum?]? + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNullableClassMap(classMap: [Int64?: NativeInteropAllNullableTypes?]?) throws -> [Int64?: + NativeInteropAllNullableTypes?]? + { + let error = NativeInteropTestsError() + 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?: NativeInteropAllNullableTypes?]? + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNullableNonNullStringMap(stringMap: [String: String]?) throws -> [String: String]? { + let error = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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: [NativeInteropAnEnum: NativeInteropAnEnum]?) throws + -> [NativeInteropAnEnum: NativeInteropAnEnum]? + { + let error = NativeInteropTestsError() + 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! [NativeInteropAnEnum: NativeInteropAnEnum]? + } + + /// Returns the passed map, to test serialization and deserialization. + func echoNullableNonNullClassMap(classMap: [Int64: NativeInteropAllNullableTypes]?) throws + -> [Int64: NativeInteropAllNullableTypes]? + { + let error = NativeInteropTestsError() + 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: NativeInteropAllNullableTypes]? + } + + /// Returns the passed enum to test serialization and deserialization. + func echoNullableEnum(anEnum: NativeInteropAnEnum?) throws -> NativeInteropAnEnum? { + let error = NativeInteropTestsError() + let res = api.echoNullableEnum( + anEnum: NativeInteropTestsPigeonInternal.isNullish(anEnum) + ? nil : NSNumber(value: anEnum!.rawValue), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NativeInteropAnEnum") + as! NativeInteropAnEnum? + } + + /// Returns the passed enum to test serialization and deserialization. + func echoAnotherNullableEnum(anotherEnum: NativeInteropAnotherEnum?) throws + -> NativeInteropAnotherEnum? + { + let error = NativeInteropTestsError() + let res = api.echoAnotherNullableEnum( + anotherEnum: NativeInteropTestsPigeonInternal.isNullish(anotherEnum) + ? nil : NSNumber(value: anotherEnum!.rawValue), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NativeInteropAnotherEnum") + as! NativeInteropAnotherEnum? + } + + /// A no-op function taking no arguments and returning no value, to sanity + /// test basic asynchronous calling. + func noopAsync() async throws { + let error = NativeInteropTestsError() + await api.noopAsync(error: error) + if error.code != nil { + throw error + } + } + + func throwFlutterErrorAsync() async throws -> Any? { + let error = NativeInteropTestsError() + let res = await api.throwFlutterErrorAsync(error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "Object") + } + + func echoAsyncNativeInteropAllTypes(everything: NativeInteropAllTypes) async throws + -> NativeInteropAllTypes + { + let error = NativeInteropTestsError() + let res = await api.echoAsyncNativeInteropAllTypes( + everything: NativeInteropAllTypesBridge.fromSwift(everything)!, error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NativeInteropAllTypes") + as! NativeInteropAllTypes + } + + func echoAsyncNullableNativeInteropAllNullableTypes(everything: NativeInteropAllNullableTypes?) + async throws -> NativeInteropAllNullableTypes? + { + let error = NativeInteropTestsError() + let res = await api.echoAsyncNullableNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypesBridge.fromSwift(everything), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NativeInteropAllNullableTypes") + as! NativeInteropAllNullableTypes? + } + + func echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ) async throws -> NativeInteropAllNullableTypesWithoutRecursion? { + let error = NativeInteropTestsError() + let res = await api.echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursionBridge.fromSwift(everything), + error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue( + value: (res), type: "NativeInteropAllNullableTypesWithoutRecursion") + as! NativeInteropAllNullableTypesWithoutRecursion? + } + + func echoAsyncBool(aBool: Bool) async throws -> Bool { + let error = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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 = NativeInteropTestsError() + let res = await api.echoAsyncUint8List( + list: NativeInteropTestsPigeonInternal.isNullish(list) + ? nil : NativeInteropTestsPigeonTypedData(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 = NativeInteropTestsError() + let res = await api.echoAsyncInt32List( + list: NativeInteropTestsPigeonInternal.isNullish(list) + ? nil : NativeInteropTestsPigeonTypedData(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 = NativeInteropTestsError() + let res = await api.echoAsyncInt64List( + list: NativeInteropTestsPigeonInternal.isNullish(list) + ? nil : NativeInteropTestsPigeonTypedData(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 = NativeInteropTestsError() + let res = await api.echoAsyncFloat64List( + list: NativeInteropTestsPigeonInternal.isNullish(list) + ? nil : NativeInteropTestsPigeonTypedData(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 = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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: [NativeInteropAnEnum?]) async throws -> [NativeInteropAnEnum?] { + let error = NativeInteropTestsError() + 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! [NativeInteropAnEnum?] + } + + func echoAsyncClassList(classList: [NativeInteropAllNullableTypes?]) async throws + -> [NativeInteropAllNullableTypes?] + { + let error = NativeInteropTestsError() + 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! [NativeInteropAllNullableTypes?] + } + + func echoAsyncNonNullEnumList(enumList: [NativeInteropAnEnum]) async throws + -> [NativeInteropAnEnum] + { + let error = NativeInteropTestsError() + 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! [NativeInteropAnEnum] + } + + func echoAsyncNonNullClassList(classList: [NativeInteropAllNullableTypes]) async throws + -> [NativeInteropAllNullableTypes] + { + let error = NativeInteropTestsError() + 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! [NativeInteropAllNullableTypes] + } + + func echoAsyncMap(map: [AnyHashable?: Any?]) async throws -> [AnyHashable?: Any?] { + let error = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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: [NativeInteropAnEnum?: NativeInteropAnEnum?]) async throws + -> [NativeInteropAnEnum?: NativeInteropAnEnum?] + { + let error = NativeInteropTestsError() + 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! [NativeInteropAnEnum?: NativeInteropAnEnum?] + } + + func echoAsyncClassMap(classMap: [Int64?: NativeInteropAllNullableTypes?]) async throws + -> [Int64?: NativeInteropAllNullableTypes?] + { + let error = NativeInteropTestsError() + 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?: NativeInteropAllNullableTypes?] + } + + func echoAsyncEnum(anEnum: NativeInteropAnEnum) async throws -> NativeInteropAnEnum { + let error = NativeInteropTestsError() + let res = await api.echoAsyncEnum(anEnum: NSNumber(value: anEnum.rawValue), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NativeInteropAnEnum") + as! NativeInteropAnEnum + } + + func echoAnotherAsyncEnum(anotherEnum: NativeInteropAnotherEnum) async throws + -> NativeInteropAnotherEnum + { + let error = NativeInteropTestsError() + let res = await api.echoAnotherAsyncEnum( + anotherEnum: NSNumber(value: anotherEnum.rawValue), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NativeInteropAnotherEnum") + as! NativeInteropAnotherEnum + } + + func echoAsyncNullableBool(aBool: Bool?) async throws -> Bool? { + let error = NativeInteropTestsError() + let res = await api.echoAsyncNullableBool( + aBool: NativeInteropTestsPigeonInternal.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 = NativeInteropTestsError() + let res = await api.echoAsyncNullableInt( + anInt: NativeInteropTestsPigeonInternal.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 = NativeInteropTestsError() + let res = await api.echoAsyncNullableDouble( + aDouble: NativeInteropTestsPigeonInternal.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 = NativeInteropTestsError() + 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 = NativeInteropTestsError() + let res = await api.echoAsyncNullableUint8List( + list: NativeInteropTestsPigeonInternal.isNullish(list) + ? nil : NativeInteropTestsPigeonTypedData(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 = NativeInteropTestsError() + let res = await api.echoAsyncNullableInt32List( + list: NativeInteropTestsPigeonInternal.isNullish(list) + ? nil : NativeInteropTestsPigeonTypedData(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 = NativeInteropTestsError() + let res = await api.echoAsyncNullableInt64List( + list: NativeInteropTestsPigeonInternal.isNullish(list) + ? nil : NativeInteropTestsPigeonTypedData(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 = NativeInteropTestsError() + let res = await api.echoAsyncNullableFloat64List( + list: NativeInteropTestsPigeonInternal.isNullish(list) + ? nil : NativeInteropTestsPigeonTypedData(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 = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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: [NativeInteropAnEnum?]?) async throws + -> [NativeInteropAnEnum?]? + { + let error = NativeInteropTestsError() + 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! [NativeInteropAnEnum?]? + } + + func echoAsyncNullableClassList(classList: [NativeInteropAllNullableTypes?]?) async throws + -> [NativeInteropAllNullableTypes?]? + { + let error = NativeInteropTestsError() + 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! [NativeInteropAllNullableTypes?]? + } + + func echoAsyncNullableNonNullEnumList(enumList: [NativeInteropAnEnum]?) async throws + -> [NativeInteropAnEnum]? + { + let error = NativeInteropTestsError() + 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! [NativeInteropAnEnum]? + } + + func echoAsyncNullableNonNullClassList(classList: [NativeInteropAllNullableTypes]?) async throws + -> [NativeInteropAllNullableTypes]? + { + let error = NativeInteropTestsError() + 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! [NativeInteropAllNullableTypes]? + } + + func echoAsyncNullableMap(map: [AnyHashable?: Any?]?) async throws -> [AnyHashable?: Any?]? { + let error = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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 = NativeInteropTestsError() + 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: [NativeInteropAnEnum?: NativeInteropAnEnum?]?) async throws + -> [NativeInteropAnEnum?: NativeInteropAnEnum?]? + { + let error = NativeInteropTestsError() + 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! [NativeInteropAnEnum?: NativeInteropAnEnum?]? + } + + func echoAsyncNullableClassMap(classMap: [Int64?: NativeInteropAllNullableTypes?]?) async throws + -> [Int64?: NativeInteropAllNullableTypes?]? + { + let error = NativeInteropTestsError() + 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?: NativeInteropAllNullableTypes?]? + } + + func echoAsyncNullableEnum(anEnum: NativeInteropAnEnum?) async throws -> NativeInteropAnEnum? { + let error = NativeInteropTestsError() + let res = await api.echoAsyncNullableEnum( + anEnum: NativeInteropTestsPigeonInternal.isNullish(anEnum) + ? nil : NSNumber(value: anEnum!.rawValue), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NativeInteropAnEnum") + as! NativeInteropAnEnum? + } + + func echoAnotherAsyncNullableEnum(anotherEnum: NativeInteropAnotherEnum?) async throws + -> NativeInteropAnotherEnum? + { + let error = NativeInteropTestsError() + let res = await api.echoAnotherAsyncNullableEnum( + anotherEnum: NativeInteropTestsPigeonInternal.isNullish(anotherEnum) + ? nil : NSNumber(value: anotherEnum!.rawValue), error: error) + if error.code != nil { + throw error + } + return _PigeonFfiCodec.readValue(value: (res), type: "NativeInteropAnotherEnum") + as! NativeInteropAnotherEnum? + } +} 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 cdcddc324439..f8272f67352b 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 @@ -29,7 +29,7 @@ final class ProxyApiTestsError: Error { var localizedDescription: String { return - "ProxyApiTestsError(code: \(code), message: \(message ?? ""), details: \(details ?? "")" + "ProxyApiTestsError(code: \(code), message: \(message ?? ""), details: \(details ?? ""))" } } diff --git a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/ProxyApiTests.swift b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/ProxyApiTests.swift new file mode 100644 index 000000000000..499d989d216a --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/ProxyApiTests.swift @@ -0,0 +1,1569 @@ +// Manual Proxy API Tests + +import Foundation + +#if os(iOS) + import Flutter +#elseif os(macOS) + import FlutterMacOS +#endif + +extension TestPlugin { + + 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()) + } + + func pigeonApiProxyApiSuperClass(_ registrar: ProxyApiTestsPigeonProxyApiRegistrar) + -> PigeonApiProxyApiSuperClass + { + class ProxyApiSuperClassDelegate: PigeonApiDelegateProxyApiSuperClass { + func pigeonDefaultConstructor(pigeonApi: PigeonApiProxyApiSuperClass) throws + -> ProxyApiSuperClass + { + return ProxyApiSuperClass() + } + + func aSuperMethod(pigeonApi: PigeonApiProxyApiSuperClass, pigeonInstance: ProxyApiSuperClass) + throws + {} + } + return PigeonApiProxyApiSuperClass( + pigeonRegistrar: registrar, delegate: ProxyApiSuperClassDelegate()) + } + + func pigeonApiProxyApiInterface(_ registrar: ProxyApiTestsPigeonProxyApiRegistrar) + -> PigeonApiProxyApiInterface + { + class ProxyApiInterfaceDelegate: PigeonApiDelegateProxyApiInterface {} + return PigeonApiProxyApiInterface( + pigeonRegistrar: registrar, delegate: ProxyApiInterfaceDelegate()) + } + + func pigeonApiClassWithApiRequirement(_ registrar: ProxyApiTestsPigeonProxyApiRegistrar) + -> PigeonApiClassWithApiRequirement + { + class ClassWithApiRequirementDelegate: PigeonApiDelegateClassWithApiRequirement { + @available(iOS 15, macOS 10, *) + func pigeonDefaultConstructor(pigeonApi: PigeonApiClassWithApiRequirement) throws + -> ClassWithApiRequirement + { + return ClassWithApiRequirement() + } + + @available(iOS 15, macOS 10, *) + func aMethod( + pigeonApi: PigeonApiClassWithApiRequirement, pigeonInstance: ClassWithApiRequirement + ) throws { + + } + } + + return PigeonApiClassWithApiRequirement( + pigeonRegistrar: registrar, delegate: ClassWithApiRequirementDelegate()) + } +} 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 c74c5c2d224f..33a73c38e7b3 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() + NativeInteropHostIntegrationCoreApiSetup.register(api: NativeInteropTestsClass()) } public func detachFromEngine(for registrar: FlutterPluginRegistrar) { @@ -340,30 +341,6 @@ public class TestPlugin: NSObject, FlutterPlugin, HostIntegrationCoreApi { return anotherEnum } - func echoOptional(_ aNullableInt: Int64?) throws -> Int64? { - return aNullableInt - } - - func echoNamed(_ aNullableString: String?) throws -> String? { - return aNullableString - } - - func noopAsync(completion: @escaping (Result) -> Void) { - completion(.success(Void())) - } - - func throwAsyncError(completion: @escaping (Result) -> Void) { - completion(.failure(PigeonError(code: "code", message: "message", details: "details"))) - } - - func throwAsyncErrorFromVoid(completion: @escaping (Result) -> Void) { - completion(.failure(PigeonError(code: "code", message: "message", details: "details"))) - } - - func throwAsyncFlutterError(completion: @escaping (Result) -> Void) { - completion(.failure(PigeonError(code: "code", message: "message", details: "details"))) - } - func echoAsync(_ everything: AllTypes, completion: @escaping (Result) -> Void) { completion(.success(everything)) } @@ -382,22 +359,6 @@ public class TestPlugin: NSObject, FlutterPlugin, HostIntegrationCoreApi { completion(.success(everything)) } - func echoAsync(_ anInt: Int64, completion: @escaping (Result) -> Void) { - completion(.success(anInt)) - } - - func echoAsync(_ aDouble: Double, completion: @escaping (Result) -> Void) { - completion(.success(aDouble)) - } - - func echoAsync(_ aBool: Bool, completion: @escaping (Result) -> Void) { - completion(.success(aBool)) - } - - func echoAsync(_ aString: String, completion: @escaping (Result) -> Void) { - completion(.success(aString)) - } - func echoAsync( _ aUint8List: FlutterStandardTypedData, completion: @escaping (Result) -> Void @@ -1251,1032 +1212,1761 @@ public class TestPlugin: NSObject, FlutterPlugin, HostIntegrationCoreApi { } } - func testUnusedClassesGenerate() -> UnusedClass { - return UnusedClass() + func noopAsync(completion: @escaping (Result) -> Void) { + completion(.success(Void())) } -} -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 echoAsync(_ anInt: Int64, completion: @escaping (Result) -> Void) { + completion(.success(anInt)) } - func echo(aString: String, completion: @escaping (Result) -> Void) { - completion(.success(aString)) + func echoAsync(_ aDouble: Double, completion: @escaping (Result) -> Void) { + completion(.success(aDouble)) } - func voidVoid(completion: @escaping (Result) -> Void) { - completion(.success(Void())) + func echoAsync(_ aBool: Bool, completion: @escaping (Result) -> Void) { + completion(.success(aBool)) } -} + func echoAsync(_ aString: String, completion: @escaping (Result) -> Void) { + completion(.success(aString)) + } -class SendInts: StreamIntsStreamHandler { - var timerActive = false - var timer: Timer? + func throwAsyncError(completion: @escaping (Result) -> Void) { + completion(.failure(PigeonError(code: "code", message: "message", details: "details"))) + } - 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 throwAsyncErrorFromVoid(completion: @escaping (Result) -> Void) { + completion(.failure(PigeonError(code: "code", message: "message", details: "details"))) } -} -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)), - EmptyEvent(), - ] + func throwAsyncFlutterError(completion: @escaping (Result) -> Void) { + completion(.failure(PigeonError(code: "code", message: "message", details: "details"))) + } - 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 echoOptional(_ aNullableInt: Int64?) throws -> Int64? { + return aNullableInt } -} -class SendConsistentNumbers: StreamConsistentNumbersStreamHandler { - let numberToSend: Int64 - init(numberToSend: Int64) { - self.numberToSend = numberToSend + func echoNamed(_ aNullableString: String?) throws -> String? { + return aNullableString } - 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 testUnusedClassesGenerate() -> UnusedClass { + return UnusedClass() } } -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() +class NativeInteropTestsClass: NSObject, NativeInteropHostIntegrationCoreApi { + func noop() throws { + return } - 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 echo(_ everything: NativeInteropAllTypes) throws -> NativeInteropAllTypes { + return everything } - func attachedField(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> ProxyApiSuperClass - { - return ProxyApiSuperClass() + func throwError() throws -> Any? { + throw NativeInteropTestsError(code: "code", message: "message", details: "details") } - func staticAttachedField(pigeonApi: PigeonApiProxyApiTestClass) throws -> ProxyApiSuperClass { - return ProxyApiSuperClass() + func throwErrorFromVoid() throws { + throw NativeInteropTestsError(code: "code", message: "message", details: "details") } - func aBool(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws - -> Bool - { - return true + func throwFlutterError() throws -> Any? { + throw NativeInteropTestsError(code: "code", message: "message", details: "details") } - func anInt(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws - -> Int64 - { - return 0 + func echo(_ anInt: Int64) throws -> Int64 { + return anInt } - func aDouble(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws - -> Double - { - return 0.0 + func echo(_ aDouble: Double) throws -> Double { + return aDouble } - func aString(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws - -> String - { - return "" + func echo(_ aBool: Bool) throws -> Bool { + return aBool } - func aUint8List(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> FlutterStandardTypedData - { - return FlutterStandardTypedData(bytes: Data()) + func echo(_ aString: String) throws -> String { + return aString } - func aList(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws - -> [Any?] - { - return [] + func echo(_ aUint8List: [UInt8]) throws -> [UInt8] { + return aUint8List } - func aMap(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws - -> [String?: Any?] - { - return [:] + func echo(_ aInt32List: [Int32]) throws -> [Int32] { + return aInt32List } - func anEnum(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws - -> ProxyApiTestEnum - { - return ProxyApiTestEnum.one + func echo(_ aInt64List: [Int64]) throws -> [Int64] { + return aInt64List } - func aProxyApi(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> ProxyApiSuperClass - { - return ProxyApiSuperClass() + func echo(_ aFloat64List: [Float64]) throws -> [Float64] { + return aFloat64List } - func aNullableBool(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> Bool? - { - return nil + func echo(_ anObject: Any) throws -> Any { + return anObject } - func aNullableInt(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> Int64? - { - return nil + func echo(_ list: [Any?]) throws -> [Any?] { + return list } - func aNullableDouble(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> Double? - { - return nil + func echo(_ map: [AnyHashable?: Any?]) throws -> [AnyHashable?: Any?] { + return map } - func aNullableString(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> String? - { - return nil + func echo(stringMap: [String?: String?]) throws -> [String?: String?] { + return stringMap } - func aNullableUint8List( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass - ) throws -> FlutterStandardTypedData? { - return nil + func echo(intMap: [Int64?: Int64?]) throws -> [Int64?: Int64?] { + return intMap } - func aNullableList(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> [Any?]? + func echo(enumMap: [NativeInteropAnEnum?: NativeInteropAnEnum?]) throws -> [NativeInteropAnEnum?: + NativeInteropAnEnum?] { - return nil + return enumMap } - func aNullableMap(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> [String?: Any?]? + func echo(classMap: [Int64?: NativeInteropAllNullableTypes?]) throws -> [Int64?: + NativeInteropAllNullableTypes?] { - return nil + return classMap } - func aNullableEnum(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> ProxyApiTestEnum? - { - return nil + func echo(_ anEnum: NativeInteropAnEnum) throws -> NativeInteropAnEnum { + return anEnum } - func aNullableProxyApi( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass - ) throws -> ProxyApiSuperClass? { - return nil + func echo(_ anotherEnum: NativeInteropAnotherEnum) throws -> NativeInteropAnotherEnum { + return anotherEnum } - func noop(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) throws { + func echoNamedDefault(_ aString: String) throws -> String { + return aString } - func throwError(pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass) - throws -> Any? - { - throw ProxyApiTestsError(code: "code", message: "message", details: "details") + func echoOptionalDefault(_ aDouble: Double) throws -> Double { + return aDouble } - func throwErrorFromVoid( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass - ) throws { - throw ProxyApiTestsError(code: "code", message: "message", details: "details") + func echoRequired(_ anInt: Int64) throws -> Int64 { + return anInt } - func throwFlutterError( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass - ) throws -> Any? { - throw ProxyApiTestsError(code: "code", message: "message", details: "details") + func echoOptional(_ aNullableInt: Int64?) throws -> Int64? { + return aNullableInt } - func echoInt( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64 - ) throws -> Int64 { - return anInt + func echoNamed(_ aNullableString: String?) throws -> String? { + return aNullableString } - func echoDouble( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aDouble: Double - ) throws -> Double { - return aDouble + func echoNonNull(enumList: [NativeInteropAnEnum]) throws -> [NativeInteropAnEnum] { + return enumList } - func echoBool( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool - ) throws -> Bool { - return aBool + func echoNonNull(classList: [NativeInteropAllNullableTypes]) throws + -> [NativeInteropAllNullableTypes] + { + return classList } - func echoString( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aString: String - ) throws -> String { - return aString + func echoNonNull(stringMap: [String: String]) throws -> [String: String] { + return stringMap } - func echoUint8List( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aUint8List: FlutterStandardTypedData - ) throws -> FlutterStandardTypedData { - return aUint8List + func echoNonNull(intMap: [Int64: Int64]) throws -> [Int64: Int64] { + return intMap } - func echoObject( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anObject: Any - ) throws -> Any { - return anObject + func echoNonNull(enumMap: [NativeInteropAnEnum: NativeInteropAnEnum]) throws + -> [NativeInteropAnEnum: NativeInteropAnEnum] + { + return enumMap } - func echoList( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aList: [Any?] - ) throws -> [Any?] { - return aList + func echoNonNull(classMap: [Int64: NativeInteropAllNullableTypes]) throws -> [Int64: + NativeInteropAllNullableTypes] + { + return classMap } - func echoProxyApiList( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aList: [ProxyApiTestClass] - ) throws -> [ProxyApiTestClass] { - return aList + func echoNullable(_ everything: NativeInteropAllNullableTypes?) throws + -> NativeInteropAllNullableTypes? + { + return everything } - func echoMap( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aMap: [String?: Any?] - ) throws -> [String?: Any?] { - return aMap + func echoNullable(_ aNullableUint8List: [UInt8]?) throws -> [UInt8]? { + return aNullableUint8List } - func echoProxyApiMap( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aMap: [String: ProxyApiTestClass] - ) throws -> [String: ProxyApiTestClass] { - return aMap + func echoNullable(_ aNullableInt32List: [Int32]?) throws -> [Int32]? { + return aNullableInt32List } - func echoEnum( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - anEnum: ProxyApiTestEnum - ) throws -> ProxyApiTestEnum { - return anEnum + func echoNullable(_ aNullableInt64List: [Int64]?) throws -> [Int64]? { + return aNullableInt64List } - func echoProxyApi( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aProxyApi: ProxyApiSuperClass - ) throws -> ProxyApiSuperClass { - return aProxyApi + func echoNullable(_ aNullableFloat64List: [Float64]?) throws -> [Float64]? { + return aNullableFloat64List } - func echoNullableInt( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableInt: Int64? - ) throws -> Int64? { - return aNullableInt + func echoNullable(_ aNullableObject: Any?) throws -> Any? { + return aNullableObject } - func echoNullableDouble( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableDouble: Double? - ) throws -> Double? { - return aNullableDouble + func echoNullable(_ aNullableList: [Any?]?) throws -> [Any?]? { + return aNullableList } - func echoNullableBool( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableBool: Bool? - ) throws -> Bool? { - return aNullableBool + func echoNullable(enumList: [NativeInteropAnEnum?]?) throws -> [NativeInteropAnEnum?]? { + return enumList } - func echoNullableString( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableString: String? - ) throws -> String? { - return aNullableString + func echoNullable(classList: [NativeInteropAllNullableTypes?]?) throws + -> [NativeInteropAllNullableTypes?]? + { + return classList } - func echoNullableUint8List( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableUint8List: FlutterStandardTypedData? - ) throws -> FlutterStandardTypedData? { - return aNullableUint8List + func echoNullable(stringMap: [String?: String?]?) throws -> [String?: String?]? { + return stringMap } - func echoNullableObject( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableObject: Any? - ) throws -> Any? { - return aNullableObject + func echoNullable(intMap: [Int64?: Int64?]?) throws -> [Int64?: Int64?]? { + return intMap } - func echoNullableList( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableList: [Any?]? - ) throws -> [Any?]? { - return aNullableList + func echoNullable(enumMap: [NativeInteropAnEnum?: NativeInteropAnEnum?]?) throws + -> [NativeInteropAnEnum?: NativeInteropAnEnum?]? + { + return enumMap } - func echoNullableMap( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableMap: [String?: Any?]? - ) throws -> [String?: Any?]? { - return aNullableMap + func echoNullable(classMap: [Int64?: NativeInteropAllNullableTypes?]?) throws -> [Int64?: + NativeInteropAllNullableTypes?]? + { + return classMap } - func echoNullableEnum( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableEnum: ProxyApiTestEnum? - ) throws -> ProxyApiTestEnum? { - return aNullableEnum + func echoNullable(_ anEnum: NativeInteropAnEnum?) throws -> NativeInteropAnEnum? { + return anEnum } - func echoNullableProxyApi( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aNullableProxyApi: ProxyApiSuperClass? - ) throws -> ProxyApiSuperClass? { - return aNullableProxyApi + func echoNullable(_ anotherEnum: NativeInteropAnotherEnum?) throws -> NativeInteropAnotherEnum? { + return anotherEnum } - func noopAsync( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - completion: @escaping (Result) -> Void - ) { - completion(.success(Void())) + func echoNullableNonNull(enumList: [NativeInteropAnEnum]?) throws -> [NativeInteropAnEnum]? { + return enumList } - func echoAsyncInt( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64, - completion: @escaping (Result) -> Void - ) { - completion(.success(anInt)) + func echoNullableNonNull(classList: [NativeInteropAllNullableTypes]?) throws + -> [NativeInteropAllNullableTypes]? + { + return classList } - func echoAsyncDouble( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aDouble: Double, - completion: @escaping (Result) -> Void - ) { - completion(.success(aDouble)) + func echoNullable(_ map: [AnyHashable?: Any?]?) throws -> [AnyHashable?: Any?]? { + return map } - func echoAsyncBool( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool, - completion: @escaping (Result) -> Void - ) { - completion(.success(aBool)) + func echoNullableNonNull(stringMap: [String: String]?) throws -> [String: String]? { + return stringMap } - func echoAsyncString( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aString: String, - completion: @escaping (Result) -> Void - ) { - completion(.success(aString)) + func echoNullableNonNull(intMap: [Int64: Int64]?) throws -> [Int64: Int64]? { + return intMap } - func echoAsyncUint8List( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aUint8List: FlutterStandardTypedData, - completion: @escaping (Result) -> Void - ) { - completion(.success(aUint8List)) + func echoNullableNonNull(enumMap: [NativeInteropAnEnum: NativeInteropAnEnum]?) throws + -> [NativeInteropAnEnum: NativeInteropAnEnum]? + { + return enumMap } - func echoAsyncObject( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anObject: Any, - completion: @escaping (Result) -> Void - ) { - completion(.success(anObject)) + func echoNullableNonNull(classMap: [Int64: NativeInteropAllNullableTypes]?) throws -> [Int64: + NativeInteropAllNullableTypes]? + { + return classMap } - func echoAsyncList( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aList: [Any?], - completion: @escaping (Result<[Any?], Error>) -> Void - ) { - completion(.success(aList)) + func extractNestedNullableString(from wrapper: NativeInteropAllClassesWrapper) throws -> String? { + return wrapper.allNullableTypes.aNullableString } - func echoAsyncMap( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aMap: [String?: Any?], completion: @escaping (Result<[String?: Any?], Error>) -> Void - ) { - completion(.success(aMap)) + func createNestedObject(with nullableString: String?) throws -> NativeInteropAllClassesWrapper { + return NativeInteropAllClassesWrapper( + allNullableTypes: .init(aNullableString: nullableString), classList: [], + classMap: [:]) } - func echoAsyncEnum( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - anEnum: ProxyApiTestEnum, completion: @escaping (Result) -> Void - ) { - completion(.success(anEnum)) + func sendMultipleNullableTypes( + aBool aNullableBool: Bool?, anInt aNullableInt: Int64?, aString aNullableString: String? + ) throws -> NativeInteropAllNullableTypes { + return NativeInteropAllNullableTypes( + aNullableBool: aNullableBool, aNullableInt: aNullableInt, aNullableString: aNullableString) } - func throwAsyncError( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - completion: @escaping (Result) -> Void - ) { - completion( - .failure(ProxyApiTestsError(code: "code", message: "message", details: "details"))) + func sendMultipleNullableTypesWithoutRecursion( + aBool aNullableBool: Bool?, anInt aNullableInt: Int64?, aString aNullableString: String? + ) throws -> NativeInteropAllNullableTypesWithoutRecursion { + return NativeInteropAllNullableTypesWithoutRecursion( + aNullableBool: aNullableBool, aNullableInt: aNullableInt, aNullableString: aNullableString) } - func throwAsyncErrorFromVoid( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - completion: @escaping (Result) -> Void - ) { - completion( - .failure(ProxyApiTestsError(code: "code", message: "message", details: "details"))) + func echoAsync(_ aUint8List: [UInt8]) async throws -> [UInt8] { + return aUint8List } - func throwAsyncFlutterError( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - completion: @escaping (Result) -> Void - ) { - completion( - .failure(ProxyApiTestsError(code: "code", message: "message", details: "details"))) + func echoAsync(_ aInt32List: [Int32]) async throws -> [Int32] { + return aInt32List } - func echoAsyncNullableInt( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anInt: Int64?, - completion: @escaping (Result) -> Void - ) { - completion(.success(anInt)) + func echoAsync(_ aInt64List: [Int64]) async throws -> [Int64] { + return aInt64List } - func echoAsyncNullableDouble( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aDouble: Double?, - completion: @escaping (Result) -> Void - ) { - completion(.success(aDouble)) + func echoAsync(_ aFloat64List: [Float64]) async throws -> [Float64] { + return aFloat64List } - func echoAsyncNullableBool( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aBool: Bool?, - completion: @escaping (Result) -> Void - ) { - completion(.success(aBool)) + func echoAsync(_ anObject: Any) async throws -> Any { + return anObject } - func echoAsyncNullableString( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aString: String?, - completion: @escaping (Result) -> Void - ) { - completion(.success(aString)) + func echoAsync(_ list: [Any?]) async throws -> [Any?] { + return list } - func echoAsyncNullableUint8List( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aUint8List: FlutterStandardTypedData?, - completion: @escaping (Result) -> Void - ) { - completion(.success(aUint8List)) + func echoAsync(enumList: [NativeInteropAnEnum?]) async throws -> [NativeInteropAnEnum?] { + return enumList } - func echoAsyncNullableObject( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, anObject: Any?, - completion: @escaping (Result) -> Void - ) { - completion(.success(anObject)) + func echoAsync(classList: [NativeInteropAllNullableTypes?]) async throws + -> [NativeInteropAllNullableTypes?] + { + return classList } - func echoAsyncNullableList( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, aList: [Any?]?, - completion: @escaping (Result<[Any?]?, Error>) -> Void - ) { - completion(.success(aList)) + func echoAsync(_ map: [AnyHashable?: Any?]) async throws -> [AnyHashable?: Any?] { + return map } - func echoAsyncNullableMap( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - aMap: [String?: Any?]?, completion: @escaping (Result<[String?: Any?]?, Error>) -> Void - ) { - completion(.success(aMap)) + func echoAsync(stringMap: [String?: String?]) async throws -> [String?: String?] { + return stringMap } - func echoAsyncNullableEnum( - pigeonApi: PigeonApiProxyApiTestClass, pigeonInstance: ProxyApiTestClass, - anEnum: ProxyApiTestEnum?, completion: @escaping (Result) -> Void - ) { - completion(.success(anEnum)) + func echoAsync(intMap: [Int64?: Int64?]) async throws -> [Int64?: Int64?] { + return intMap + } + + func echoAsync(enumMap: [NativeInteropAnEnum?: NativeInteropAnEnum?]) async throws + -> [NativeInteropAnEnum?: NativeInteropAnEnum?] + { + return enumMap + } + + func echoAsync(classMap: [Int64?: NativeInteropAllNullableTypes?]) async throws -> [Int64?: + NativeInteropAllNullableTypes?] + { + return classMap + } + + func echoAsync(_ anEnum: NativeInteropAnEnum) async throws -> NativeInteropAnEnum { + return anEnum + } + + func echoAsync(_ anotherEnum: NativeInteropAnotherEnum) async throws -> NativeInteropAnotherEnum { + return anotherEnum + } + + func throwAsyncError() async throws -> Any? { + throw NativeInteropTestsError(code: "code", message: "message", details: "details") + } + + func throwAsyncErrorFromVoid() async throws { + throw NativeInteropTestsError(code: "code", message: "message", details: "details") + } + + func throwAsyncFlutterError() async throws -> Any? { + throw NativeInteropTestsError(code: "code", message: "message", details: "details") + } + + func echoAsync(_ everything: NativeInteropAllTypes) async throws -> NativeInteropAllTypes { + return everything + } + + func echoAsync(_ everything: NativeInteropAllNullableTypes?) async throws + -> NativeInteropAllNullableTypes? + { + return everything } - func staticNoop(pigeonApi: PigeonApiProxyApiTestClass) throws { + func echoAsync(_ everything: NativeInteropAllNullableTypesWithoutRecursion?) async throws + -> NativeInteropAllNullableTypesWithoutRecursion? + { + return everything + } + + func echoAsyncNullable(_ anInt: Int64?) async throws -> Int64? { + return anInt + } + + 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 echoAsyncNullable(_ aFloat64List: [Float64]?) async throws -> [Float64]? { + return aFloat64List + } + + func echoAsyncNullable(_ anObject: Any?) async throws -> Any? { + return anObject + } + + func echoAsyncNullable(_ list: [Any?]?) async throws -> [Any?]? { + return list + } + + func echoAsyncNullable(enumList: [NativeInteropAnEnum?]?) async throws -> [NativeInteropAnEnum?]? + { + return enumList + } + + func echoAsyncNullable(classList: [NativeInteropAllNullableTypes?]?) async throws + -> [NativeInteropAllNullableTypes?]? + { + return classList + } + + func echoAsyncNullable(_ map: [AnyHashable?: Any?]?) async throws -> [AnyHashable?: Any?]? { + return map + } + + func echoAsyncNullable(stringMap: [String?: String?]?) async throws -> [String?: String?]? { + return stringMap + } + + func echoAsyncNullable(intMap: [Int64?: Int64?]?) async throws -> [Int64?: Int64?]? { + return intMap + } + + func echoAsyncNullable(enumMap: [NativeInteropAnEnum?: NativeInteropAnEnum?]?) async throws + -> [NativeInteropAnEnum?: NativeInteropAnEnum?]? + { + return enumMap + } + + func echoAsyncNullable(classMap: [Int64?: NativeInteropAllNullableTypes?]?) async throws + -> [Int64?: + NativeInteropAllNullableTypes?]? + { + return classMap + } + + func echoAsyncNullable(_ anEnum: NativeInteropAnEnum?) async throws -> NativeInteropAnEnum? { + return anEnum + } + + func echoAsyncNullable(_ anotherEnum: NativeInteropAnotherEnum?) async throws + -> NativeInteropAnotherEnum? + { + return anotherEnum + } + + func callFlutterNoop() throws { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + try flutterApi.noop() } - 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 callFlutterThrowError() throws -> Any? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try flutterApi.throwError() } - 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 callFlutterThrowErrorFromVoid() throws { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + try flutterApi.throwErrorFromVoid() } - 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 callFlutterEcho(_ everything: NativeInteropAllTypes) throws -> NativeInteropAllTypes { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try flutterApi.echoNativeInteropAllTypes(everything: everything) } - 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 callFlutterEcho(_ aBool: Bool) throws -> Bool { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try flutterApi.echoBool(aBool: aBool) } - 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 callFlutterEcho(_ anInt: Int64) throws -> Int64 { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try flutterApi.echoInt(anInt: anInt) } - 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 callFlutterEcho(_ aDouble: Double) throws -> Double { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try flutterApi.echoDouble(aDouble: aDouble) } - 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 callFlutterEcho(_ aString: String) throws -> String { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try flutterApi.echoString(aString: aString) } - 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 callFlutterEcho(_ list: [UInt8]) throws -> [UInt8] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try flutterApi.echoUint8List(list: list) } - 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 callFlutterEcho(_ list: [Int32]) throws -> [Int32] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try flutterApi.echoInt32List(list: list) } - 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 callFlutterEcho(_ list: [Int64]) throws -> [Int64] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try flutterApi.echoInt64List(list: list) } - 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 callFlutterEcho(_ list: [Float64]) throws -> [Float64] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try flutterApi.echoFloat64List(list: list) } - 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 callFlutterEcho(_ list: [Any?]) throws -> [Any?] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try flutterApi.echoList(list: list) } - 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 callFlutterEcho(enumList: [NativeInteropAnEnum?]) throws -> [NativeInteropAnEnum?] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try flutterApi.echoEnumList(enumList: enumList) } - 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 callFlutterEcho(classList: [NativeInteropAllNullableTypes?]) throws + -> [NativeInteropAllNullableTypes?] + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoClassList(classList: classList) + } + + func callFlutterEchoNonNull(enumList: [NativeInteropAnEnum]) throws -> [NativeInteropAnEnum] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNonNullEnumList(enumList: enumList) + } + + func callFlutterEchoNonNull(classList: [NativeInteropAllNullableTypes]) throws + -> [NativeInteropAllNullableTypes] + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNonNullClassList(classList: classList) + } + + func callFlutterEcho(_ map: [AnyHashable?: Any?]) throws -> [AnyHashable?: Any?] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoMap(map: map) + } + + func callFlutterEcho(stringMap: [String?: String?]) throws -> [String?: String?] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoStringMap(stringMap: stringMap) + } + + func callFlutterEcho(intMap: [Int64?: Int64?]) throws -> [Int64?: Int64?] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoIntMap(intMap: intMap) + } + + func callFlutterEcho(enumMap: [NativeInteropAnEnum?: NativeInteropAnEnum?]) throws + -> [NativeInteropAnEnum?: NativeInteropAnEnum?] + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoEnumMap(enumMap: enumMap) + } + + func callFlutterEcho(classMap: [Int64?: NativeInteropAllNullableTypes?]) throws -> [Int64?: + NativeInteropAllNullableTypes?] + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoClassMap(classMap: classMap) + } + + func callFlutterEchoNonNull(stringMap: [String: String]) throws -> [String: String] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNonNullStringMap(stringMap: stringMap) + } + + func callFlutterEchoNonNull(intMap: [Int64: Int64]) throws -> [Int64: Int64] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNonNullIntMap(intMap: intMap) + } + + func callFlutterEchoNonNull(enumMap: [NativeInteropAnEnum: NativeInteropAnEnum]) throws + -> [NativeInteropAnEnum: NativeInteropAnEnum] + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNonNullEnumMap(enumMap: enumMap) + } + + func callFlutterEchoNonNull(classMap: [Int64: NativeInteropAllNullableTypes]) throws -> [Int64: + NativeInteropAllNullableTypes] + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNonNullClassMap(classMap: classMap) + } + + func callFlutterEchoNullable(_ anEnum: NativeInteropAnEnum?) throws -> NativeInteropAnEnum? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableEnum(anEnum: anEnum) + } + + func callFlutterEchoNullable(_ anotherEnum: NativeInteropAnotherEnum?) throws + -> NativeInteropAnotherEnum? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoAnotherNullableEnum(anotherEnum: anotherEnum) + } + + func callFlutterEchoNullable(_ aBool: Bool?) throws -> Bool? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableBool(aBool: aBool) + } + + func callFlutterEchoNullable(_ anInt: Int64?) throws -> Int64? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableInt(anInt: anInt) + } + + func callFlutterEchoNullable(_ aDouble: Double?) throws -> Double? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableDouble(aDouble: aDouble) + } + + func callFlutterEchoNullable(_ aString: String?) throws -> String? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableString(aString: aString) + } + + func callFlutterEchoNullable(_ list: [UInt8]?) throws -> [UInt8]? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableUint8List(list: list) + } + + func callFlutterEchoNullable(_ list: [Int32]?) throws -> [Int32]? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableInt32List(list: list) + } + + func callFlutterEchoNullable(_ list: [Int64]?) throws -> [Int64]? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableInt64List(list: list) + } + + func callFlutterEchoNullable(_ list: [Float64]?) throws -> [Float64]? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableFloat64List(list: list) + } + + func callFlutterEchoNullable(_ list: [Any?]?) throws -> [Any?]? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableList(list: list) + } + + func callFlutterEchoNullable(enumList: [NativeInteropAnEnum?]?) throws -> [NativeInteropAnEnum?]? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableEnumList(enumList: enumList) + } + + func callFlutterEchoNullable(classList: [NativeInteropAllNullableTypes?]?) throws + -> [NativeInteropAllNullableTypes?]? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableClassList(classList: classList) + } + + func callFlutterEchoNullableNonNull(enumList: [NativeInteropAnEnum]?) throws + -> [NativeInteropAnEnum]? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableNonNullEnumList(enumList: enumList) + } + + func callFlutterEchoNullableNonNull(classList: [NativeInteropAllNullableTypes]?) throws + -> [NativeInteropAllNullableTypes]? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableNonNullClassList(classList: classList) + } + + func callFlutterEchoNullable(_ map: [AnyHashable?: Any?]?) throws -> [AnyHashable?: Any?]? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableMap(map: map) + } + + func callFlutterEchoNullable(stringMap: [String?: String?]?) throws -> [String?: + String?]? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableStringMap(stringMap: stringMap) + } + + func callFlutterEchoNullable(intMap: [Int64?: Int64?]?) throws -> [Int64?: Int64?]? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableIntMap(intMap: intMap) + } + + func callFlutterEchoNullable(enumMap: [NativeInteropAnEnum?: NativeInteropAnEnum?]?) throws + -> [NativeInteropAnEnum?: + NativeInteropAnEnum?]? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableEnumMap(enumMap: enumMap) + } + + func callFlutterEchoNullable(classMap: [Int64?: NativeInteropAllNullableTypes?]?) throws + -> [Int64?: + NativeInteropAllNullableTypes?]? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableClassMap(classMap: classMap) + } + + func callFlutterEchoNullableNonNull(stringMap: [String: String]?) throws -> [String: + String]? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableNonNullStringMap(stringMap: stringMap) + } + + func callFlutterEchoNullableNonNull(intMap: [Int64: Int64]?) throws -> [Int64: Int64]? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableNonNullIntMap(intMap: intMap) + } + + func callFlutterEchoNullableNonNull(enumMap: [NativeInteropAnEnum: NativeInteropAnEnum]?) throws + -> [NativeInteropAnEnum: + NativeInteropAnEnum]? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableNonNullEnumMap(enumMap: enumMap) + } + + func callFlutterEchoNullableNonNull(classMap: [Int64: NativeInteropAllNullableTypes]?) throws + -> [Int64: NativeInteropAllNullableTypes]? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNullableNonNullClassMap(classMap: classMap) + } + + func callFlutterNoopAsync() async throws { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + try await flutterApi.noopAsync() + } + + func callFlutterEchoAsyncNativeInteropAllTypes(everything: NativeInteropAllTypes) async throws + -> NativeInteropAllTypes + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNativeInteropAllTypes(everything: everything) + } + + func callFlutterEchoAsyncNullableNativeInteropAllNullableTypes( + everything: NativeInteropAllNullableTypes? + ) async throws + -> NativeInteropAllNullableTypes? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNullableNativeInteropAllNullableTypes( + everything: everything) + } + + func callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything: NativeInteropAllNullableTypesWithoutRecursion? + ) async throws -> NativeInteropAllNullableTypesWithoutRecursion? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursion( + everything: everything) + } + + func callFlutterEchoAsyncBool(aBool: Bool) async throws -> Bool { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncBool(aBool: aBool) + } + + func callFlutterEchoAsyncInt(anInt: Int64) async throws -> Int64 { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncInt(anInt: anInt) + } + + func callFlutterEchoAsyncDouble(aDouble: Double) async throws -> Double { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncDouble(aDouble: aDouble) + } + + func callFlutterEchoAsyncString(aString: String) async throws -> String { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncString(aString: aString) + } + + func callFlutterEchoAsyncUint8List(list: [UInt8]) async throws -> [UInt8] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncUint8List(list: list) + } + + func callFlutterEchoAsyncInt32List(list: [Int32]) async throws -> [Int32] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncInt32List(list: list) + } + + func callFlutterEchoAsyncInt64List(list: [Int64]) async throws -> [Int64] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncInt64List(list: list) + } + + func callFlutterEchoAsyncFloat64List(list: [Float64]) async throws -> [Float64] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncFloat64List(list: list) + } + + func callFlutterEchoAsyncObject(anObject: Any) async throws -> Any { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncObject(anObject: anObject) + } + + func callFlutterEchoAsyncList(list: [Any?]) async throws -> [Any?] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncList(list: list) + } + + func callFlutterEchoAsyncEnumList(enumList: [NativeInteropAnEnum?]) async throws + -> [NativeInteropAnEnum?] + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncEnumList(enumList: enumList) + } + + func callFlutterEchoAsyncClassList(classList: [NativeInteropAllNullableTypes?]) async throws + -> [NativeInteropAllNullableTypes?] + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncClassList(classList: classList) + } + + func callFlutterEchoAsyncNonNullEnumList(enumList: [NativeInteropAnEnum]) async throws + -> [NativeInteropAnEnum] + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNonNullEnumList(enumList: enumList) + } + + func callFlutterEchoAsyncNonNullClassList(classList: [NativeInteropAllNullableTypes]) async throws + -> [NativeInteropAllNullableTypes] + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNonNullClassList(classList: classList) + } + + func callFlutterEchoAsyncMap(map: [AnyHashable?: Any?]) async throws -> [AnyHashable?: Any?] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncMap(map: map) + } + + func callFlutterEchoAsyncStringMap(stringMap: [String?: String?]) async throws -> [String?: + String?] + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncStringMap(stringMap: stringMap) + } + + func callFlutterEchoAsyncIntMap(intMap: [Int64?: Int64?]) async throws -> [Int64?: Int64?] { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncIntMap(intMap: intMap) + } + + func callFlutterEchoAsyncEnumMap(enumMap: [NativeInteropAnEnum?: NativeInteropAnEnum?]) + async throws -> [NativeInteropAnEnum?: + NativeInteropAnEnum?] + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncEnumMap(enumMap: enumMap) + } + + func callFlutterThrowFlutterErrorAsync() async throws -> Any? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.throwFlutterErrorAsync() + } + + func callFlutterEchoAsyncNullableFloat64List(list: [Float64]?) async throws -> [Float64]? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNullableFloat64List(list: list) + } + + func callFlutterThrowFlutterError() throws -> Any? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.throwFlutterError() + } + + func callFlutterEcho(_ everything: NativeInteropAllNullableTypes?) throws + -> NativeInteropAllNullableTypes? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNativeInteropAllNullableTypes(everything: everything) + } + + func callFlutterSendMultipleNullableTypes( + aBool aNullableBool: Bool?, anInt aNullableInt: Int64?, aString aNullableString: String? + ) throws -> NativeInteropAllNullableTypes { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.sendMultipleNullableTypes( + aNullableBool: aNullableBool, aNullableInt: aNullableInt, aNullableString: aNullableString) + } + + func callFlutterEcho(_ everything: NativeInteropAllNullableTypesWithoutRecursion?) + throws -> NativeInteropAllNullableTypesWithoutRecursion? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNativeInteropAllNullableTypesWithoutRecursion(everything: everything) + } + + func callFlutterSendMultipleNullableTypesWithoutRecursion( + aBool aNullableBool: Bool?, anInt aNullableInt: Int64?, aString aNullableString: String? + ) throws -> NativeInteropAllNullableTypesWithoutRecursion { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.sendMultipleNullableTypesWithoutRecursion( + aNullableBool: aNullableBool, aNullableInt: aNullableInt, aNullableString: aNullableString) + } + + func callFlutterEcho(_ anEnum: NativeInteropAnEnum) throws -> NativeInteropAnEnum { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoEnum(anEnum: anEnum) + } + + func callFlutterEcho(_ anotherEnum: NativeInteropAnotherEnum) throws -> NativeInteropAnotherEnum { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try flutterApi.echoNativeInteropAnotherEnum(anotherEnum: anotherEnum) + } + + func echoAsync(_ aDouble: Double) async throws -> Double { + return aDouble + } + + func echoAsync(_ aBool: Bool) async throws -> Bool { + return aBool + } + + func echoAsync(_ aString: String) async throws -> String { + return aString + } + + func noopAsync() async throws { + return + } + + func echoAsync(_ anInt: Int64) async throws -> Int64 { + return anInt + } + + func echo(enumList: [NativeInteropAnEnum?]) throws -> [NativeInteropAnEnum?] { + return enumList + } + + func echo(classList: [NativeInteropAllNullableTypes?]) throws + -> [NativeInteropAllNullableTypes?] + { + return classList + } + + 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 echo(_ wrapper: NativeInteropAllClassesWrapper) throws -> NativeInteropAllClassesWrapper { + return wrapper + } + + func echoNullable(_ everything: NativeInteropAllNullableTypesWithoutRecursion?) throws + -> NativeInteropAllNullableTypesWithoutRecursion? + { + 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 callFlutterEchoAsyncNullableEnumMap(enumMap: [NativeInteropAnEnum?: NativeInteropAnEnum?]?) + async throws + -> [NativeInteropAnEnum?: NativeInteropAnEnum?]? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try await flutterApi.echoAsyncNullableEnumMap(enumMap: enumMap) } - 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 callFlutterEchoAsyncNullableClassMap(classMap: [Int64?: NativeInteropAllNullableTypes?]?) + async throws + -> [Int64?: NativeInteropAllNullableTypes?]? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try await flutterApi.echoAsyncNullableClassMap(classMap: classMap) } - 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 callFlutterEchoAsyncNullableEnum(anEnum: NativeInteropAnEnum?) async throws + -> NativeInteropAnEnum? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try await flutterApi.echoAsyncNullableEnum(anEnum: anEnum) } - 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 callFlutterEchoAnotherAsyncNullableEnum(anotherEnum: NativeInteropAnotherEnum?) async throws + -> NativeInteropAnotherEnum? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try await flutterApi.echoAnotherAsyncNullableEnum(anotherEnum: anotherEnum) } - 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 callFlutterEchoAsyncClassMap(classMap: [Int64?: NativeInteropAllNullableTypes?]) async throws + -> [Int64?: + NativeInteropAllNullableTypes?] + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try await flutterApi.echoAsyncClassMap(classMap: classMap) } - 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 callFlutterEchoAsyncEnum(anEnum: NativeInteropAnEnum) async throws -> NativeInteropAnEnum { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try await flutterApi.echoAsyncEnum(anEnum: anEnum) } - 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 callFlutterEchoAnotherAsyncEnum(anotherEnum: NativeInteropAnotherEnum) async throws + -> NativeInteropAnotherEnum + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try await flutterApi.echoAnotherAsyncEnum(anotherEnum: anotherEnum) } - 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 callFlutterEchoAsyncNullableBool(aBool: Bool?) async throws -> Bool? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try await flutterApi.echoAsyncNullableBool(aBool: aBool) } - 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 callFlutterEchoAsyncNullableInt(anInt: Int64?) async throws -> Int64? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } + return try await flutterApi.echoAsyncNullableInt(anInt: anInt) } -} + func callFlutterEchoAsyncNullableDouble(aDouble: Double?) async throws -> Double? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNullableDouble(aDouble: aDouble) + } + + func callFlutterEchoAsyncNullableString(aString: String?) async throws -> String? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNullableString(aString: aString) + } + + func callFlutterEchoAsyncNullableUint8List(list: [UInt8]?) async throws -> [UInt8]? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNullableUint8List(list: list) + } + + func callFlutterEchoAsyncNullableInt32List(list: [Int32]?) async throws -> [Int32]? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNullableInt32List(list: list) + } + + func callFlutterEchoAsyncNullableInt64List(list: [Int64]?) async throws -> [Int64]? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNullableInt64List(list: list) + } + + func callFlutterEchoAsyncNullableObject(anObject: Any?) async throws -> Any? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNullableObject(anObject: anObject) + } + + func callFlutterEchoAsyncNullableList(list: [Any?]?) async throws -> [Any?]? { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNullableList(list: list) + } -class ProxyApiDelegate: ProxyApiTestsPigeonProxyApiDelegate { - func pigeonApiProxyApiTestClass(_ registrar: ProxyApiTestsPigeonProxyApiRegistrar) - -> PigeonApiProxyApiTestClass + func callFlutterEchoAsyncNullableEnumList(enumList: [NativeInteropAnEnum?]?) async throws + -> [NativeInteropAnEnum?]? { - return PigeonApiProxyApiTestClass( - pigeonRegistrar: registrar, delegate: ProxyApiTestClassDelegate()) + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNullableEnumList(enumList: enumList) } - func pigeonApiProxyApiSuperClass(_ registrar: ProxyApiTestsPigeonProxyApiRegistrar) - -> PigeonApiProxyApiSuperClass + func callFlutterEchoAsyncNullableClassList(classList: [NativeInteropAllNullableTypes?]?) + async throws + -> [NativeInteropAllNullableTypes?]? { - class ProxyApiSuperClassDelegate: PigeonApiDelegateProxyApiSuperClass { - func pigeonDefaultConstructor(pigeonApi: PigeonApiProxyApiSuperClass) throws - -> ProxyApiSuperClass - { - return ProxyApiSuperClass() - } + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNullableClassList(classList: classList) + } + + func callFlutterEchoAsyncNullableNonNullEnumList(enumList: [NativeInteropAnEnum]?) async throws + -> [NativeInteropAnEnum]? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNullableNonNullEnumList(enumList: enumList) + } + + func callFlutterEchoAsyncNullableNonNullClassList(classList: [NativeInteropAllNullableTypes]?) + async throws + -> [NativeInteropAllNullableTypes]? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNullableNonNullClassList(classList: classList) + } - func aSuperMethod(pigeonApi: PigeonApiProxyApiSuperClass, pigeonInstance: ProxyApiSuperClass) - throws - {} + func callFlutterEchoAsyncNullableMap(map: [AnyHashable?: Any?]?) async throws -> [AnyHashable?: + Any?]? + { + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) } - return PigeonApiProxyApiSuperClass( - pigeonRegistrar: registrar, delegate: ProxyApiSuperClassDelegate()) + return try await flutterApi.echoAsyncNullableMap(map: map) } - func pigeonApiProxyApiInterface(_ registrar: ProxyApiTestsPigeonProxyApiRegistrar) - -> PigeonApiProxyApiInterface + func callFlutterEchoAsyncNullableStringMap(stringMap: [String?: String?]?) async throws + -> [String?: + String?]? { - class ProxyApiInterfaceDelegate: PigeonApiDelegateProxyApiInterface {} - return PigeonApiProxyApiInterface( - pigeonRegistrar: registrar, delegate: ProxyApiInterfaceDelegate()) + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi not registered", + details: nil) + } + return try await flutterApi.echoAsyncNullableStringMap(stringMap: stringMap) } - func pigeonApiClassWithApiRequirement(_ registrar: ProxyApiTestsPigeonProxyApiRegistrar) - -> PigeonApiClassWithApiRequirement + func callFlutterEchoAsyncNullableIntMap(intMap: [Int64?: Int64?]?) async throws -> [Int64?: + Int64?]? { - class ClassWithApiRequirementDelegate: PigeonApiDelegateClassWithApiRequirement { - @available(iOS 15, macOS 10, *) - func pigeonDefaultConstructor(pigeonApi: PigeonApiClassWithApiRequirement) throws - -> ClassWithApiRequirement - { - return ClassWithApiRequirement() + guard let flutterApi = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + throw NativeInteropTestsError( + code: "not_registered", message: "NativeInteropFlutterIntegrationCoreApi 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 = NativeInteropFlutterIntegrationCoreApi.getInstance() else { + continuation.resume(returning: false) + return + } + try await flutterApi.noopAsync() + continuation.resume(returning: true) + } catch { + continuation.resume(returning: false) + } + } + } + } + } + + func testDeregisterHostApi() throws -> Bool { + let name = "testDeregisterHostInstance" + NativeInteropHostIntegrationCoreApiSetup.register(api: NativeInteropTestsClass(), name: name) + guard NativeInteropHostIntegrationCoreApiSetup.getInstance(name: name) != nil else { + return false + } + NativeInteropHostIntegrationCoreApiSetup.register(api: nil, name: name) + return NativeInteropHostIntegrationCoreApiSetup.getInstance(name: name) == nil + } + + func testDeregisterFlutterApi() throws -> Bool { + let name = "testDeregisterFlutterInstance" + NativeInteropFlutterIntegrationCoreApiRegistrar.registerInstance(api: nil, name: name) + return NativeInteropFlutterIntegrationCoreApiRegistrar.getInstance(name: name) == nil + } + + func registerAndImmediatelyDeregisterHostApi(name: String) throws { + NativeInteropHostIntegrationCoreApiSetup.register(api: NativeInteropTestsClass(), name: name) + NativeInteropHostIntegrationCoreApiSetup.register(api: nil, name: name) + } + + func testCallDeregisteredFlutterApi(name: String) throws -> Bool { + NativeInteropFlutterIntegrationCoreApiRegistrar.registerInstance(api: nil, name: name) + return NativeInteropFlutterIntegrationCoreApi.getInstance(name: name) == nil + } +} + +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() + } + } } + } + } +} - @available(iOS 15, macOS 10, *) - func aMethod( - pigeonApi: PigeonApiClassWithApiRequirement, pigeonInstance: ClassWithApiRequirement - ) throws { +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)), + EmptyEvent(), + ] + 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? - return PigeonApiClassWithApiRequirement( - pigeonRegistrar: registrar, delegate: ClassWithApiRequirementDelegate()) + 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() + } + } + } + } } } diff --git a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin_objc_gen/NativeInteropTests.gen.m b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin_objc_gen/NativeInteropTests.gen.m new file mode 100644 index 000000000000..d52a218b8785 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin_objc_gen/NativeInteropTests.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 *_julz8q_NativeInteropFlutterIntegrationCoreApiBridge(void) { + return @protocol(NativeInteropFlutterIntegrationCoreApiBridge); +} + +typedef id (^_ProtocolTrampoline)(void *sel, id arg1, id arg2); +__attribute__((visibility("default"))) __attribute__((used)) id +_julz8q_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); +__attribute__((visibility("default"))) __attribute__((used)) id +_julz8q_protocolTrampoline_xr62hr(id target, void *sel, id arg1) { + return ((_ProtocolTrampoline_1)((id(*)(id, SEL, SEL))objc_msgSend)( + target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1); +} + +typedef id (^_ProtocolTrampoline_2)(void *sel, id arg1, id arg2, id arg3, id arg4); +__attribute__((visibility("default"))) __attribute__((used)) id +_julz8q_protocolTrampoline_qfyidt(id target, void *sel, id arg1, id arg2, id arg3, id arg4) { + return ((_ProtocolTrampoline_2)((id(*)(id, SEL, SEL))objc_msgSend)( + target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2, arg3, arg4); +} + +typedef void (^_ListenerTrampoline)(void); +__attribute__((visibility("default"))) __attribute__((used)) _ListenerTrampoline +_julz8q_wrapListenerBlock_1pl9qdv(_ListenerTrampoline block) NS_RETURNS_RETAINED { + return ^void() { + objc_retainBlock(block); + block(); + }; +} + +typedef void (^_BlockingTrampoline)(void *waiter); +__attribute__((visibility("default"))) __attribute__((used)) _ListenerTrampoline +_julz8q_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 +_julz8q_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 +_julz8q_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 +_julz8q_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 +_julz8q_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 _julz8q_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 +_julz8q_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 +_julz8q_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 +_julz8q_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 +_julz8q_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 +_julz8q_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 _julz8q_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_gen/test_plugin.h b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin_objc_gen/test_plugin.h new file mode 100644 index 000000000000..f5d332ee62a8 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin_objc_gen/test_plugin.h @@ -0,0 +1,2986 @@ +// 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 NativeInteropAllNullableTypesBridge; +@class NativeInteropAllNullableTypesWithoutRecursionBridge; +@class NativeInteropAllTypesBridge; +/// A class for testing nested class handling. +/// This is needed to test nested nullable and non-nullable classes, +/// NativeInteropAllNullableTypes is non-nullable here as it is +/// easier to instantiate than NativeInteropAllTypes 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_plugin36NativeInteropAllClassesWrapperBridge") +@interface NativeInteropAllClassesWrapperBridge : NSObject +- (nonnull instancetype) + initWithAllNullableTypes: + (NativeInteropAllNullableTypesBridge* _Nonnull)allNullableTypes + allNullableTypesWithoutRecursion: + (NativeInteropAllNullableTypesWithoutRecursionBridge* _Nullable) + allNullableTypesWithoutRecursion + allTypes: + (NativeInteropAllTypesBridge* _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) + NativeInteropAllNullableTypesBridge* _Nonnull allNullableTypes; +@property(nonatomic, strong) + NativeInteropAllNullableTypesWithoutRecursionBridge* _Nullable allNullableTypesWithoutRecursion; +@property(nonatomic, strong) NativeInteropAllTypesBridge* _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 NativeInteropTestsPigeonTypedData; +@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_plugin35NativeInteropAllNullableTypesBridge") +@interface NativeInteropAllNullableTypesBridge : NSObject +- (nonnull instancetype) + initWithANullableBool:(NSNumber* _Nullable)aNullableBool + aNullableInt:(NSNumber* _Nullable)aNullableInt + aNullableInt64:(NSNumber* _Nullable)aNullableInt64 + aNullableDouble:(NSNumber* _Nullable)aNullableDouble + aNullableByteArray: + (NativeInteropTestsPigeonTypedData* _Nullable)aNullableByteArray + aNullable4ByteArray: + (NativeInteropTestsPigeonTypedData* _Nullable)aNullable4ByteArray + aNullable8ByteArray: + (NativeInteropTestsPigeonTypedData* _Nullable)aNullable8ByteArray + aNullableFloatArray: + (NativeInteropTestsPigeonTypedData* _Nullable)aNullableFloatArray + aNullableEnum:(NSNumber* _Nullable)aNullableEnum + anotherNullableEnum:(NSNumber* _Nullable)anotherNullableEnum + aNullableString:(NSString* _Nullable)aNullableString + aNullableObject:(NSObject* _Nullable)aNullableObject + allNullableTypes: + (NativeInteropAllNullableTypesBridge* _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) + NativeInteropTestsPigeonTypedData* _Nullable aNullableByteArray; +@property(nonatomic, strong) + NativeInteropTestsPigeonTypedData* _Nullable aNullable4ByteArray; +@property(nonatomic, strong) + NativeInteropTestsPigeonTypedData* _Nullable aNullable8ByteArray; +@property(nonatomic, strong) + NativeInteropTestsPigeonTypedData* _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) + NativeInteropAllNullableTypesBridge* _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 [NativeInteropAllNullableTypes] class is +/// being used to test Swift classes. Generated bridge class from Pigeon that +/// moves data from Swift to Objective-C. +SWIFT_CLASS( + "_TtC11test_plugin51NativeInteropAllNullableTypesWithoutRecursionBridge") +@interface NativeInteropAllNullableTypesWithoutRecursionBridge : NSObject +- (nonnull instancetype) + initWithANullableBool:(NSNumber* _Nullable)aNullableBool + aNullableInt:(NSNumber* _Nullable)aNullableInt + aNullableInt64:(NSNumber* _Nullable)aNullableInt64 + aNullableDouble:(NSNumber* _Nullable)aNullableDouble + aNullableByteArray: + (NativeInteropTestsPigeonTypedData* _Nullable)aNullableByteArray + aNullable4ByteArray: + (NativeInteropTestsPigeonTypedData* _Nullable)aNullable4ByteArray + aNullable8ByteArray: + (NativeInteropTestsPigeonTypedData* _Nullable)aNullable8ByteArray + aNullableFloatArray: + (NativeInteropTestsPigeonTypedData* _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) + NativeInteropTestsPigeonTypedData* _Nullable aNullableByteArray; +@property(nonatomic, strong) + NativeInteropTestsPigeonTypedData* _Nullable aNullable4ByteArray; +@property(nonatomic, strong) + NativeInteropTestsPigeonTypedData* _Nullable aNullable8ByteArray; +@property(nonatomic, strong) + NativeInteropTestsPigeonTypedData* _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 NativeInteropAnEnum : NSInteger; +enum NativeInteropAnotherEnum : NSInteger; +/// A class containing all supported types. +/// Generated bridge class from Pigeon that moves data from Swift to +/// Objective-C. +SWIFT_CLASS("_TtC11test_plugin27NativeInteropAllTypesBridge") +@interface NativeInteropAllTypesBridge : NSObject +- (nonnull instancetype) + initWithABool:(BOOL)aBool + anInt:(int64_t)anInt + anInt64:(int64_t)anInt64 + aDouble:(double)aDouble + aByteArray:(NativeInteropTestsPigeonTypedData* _Nonnull)aByteArray + a4ByteArray:(NativeInteropTestsPigeonTypedData* _Nonnull)a4ByteArray + a8ByteArray:(NativeInteropTestsPigeonTypedData* _Nonnull)a8ByteArray + aFloatArray:(NativeInteropTestsPigeonTypedData* _Nonnull)aFloatArray + anEnum:(enum NativeInteropAnEnum)anEnum + anotherEnum:(enum NativeInteropAnotherEnum)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) + NativeInteropTestsPigeonTypedData* _Nonnull aByteArray; +@property(nonatomic, strong) + NativeInteropTestsPigeonTypedData* _Nonnull a4ByteArray; +@property(nonatomic, strong) + NativeInteropTestsPigeonTypedData* _Nonnull a8ByteArray; +@property(nonatomic, strong) + NativeInteropTestsPigeonTypedData* _Nonnull aFloatArray; +@property(nonatomic) enum NativeInteropAnEnum anEnum; +@property(nonatomic) enum NativeInteropAnotherEnum 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, NativeInteropAnEnum, closed){ + NativeInteropAnEnumOne = 0, + NativeInteropAnEnumTwo = 1, + NativeInteropAnEnumThree = 2, + NativeInteropAnEnumFortyTwo = 3, + NativeInteropAnEnumFourHundredTwentyTwo = 4, +}; + +typedef SWIFT_ENUM(NSInteger, NativeInteropAnotherEnum, closed){ + NativeInteropAnotherEnumJustInCase = 0, +}; + +@class NativeInteropTestsError; +/// 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_plugin44NativeInteropFlutterIntegrationCoreApiBridge_") +@protocol NativeInteropFlutterIntegrationCoreApiBridge +/// A no-op function taking no arguments and returning no value, to sanity +/// test basic calling. +- (void)noopWithError:(NativeInteropTestsError* _Nonnull)error; +/// Returns a Flutter error, to test error handling. +- (NSObject* _Nullable)throwFlutterErrorWithError: + (NativeInteropTestsError* _Nonnull)error SWIFT_WARN_UNUSED_RESULT; +/// Responds with an error from an async function returning a value. +- (NSObject* _Nullable)throwErrorWithError: + (NativeInteropTestsError* _Nonnull)error SWIFT_WARN_UNUSED_RESULT; +/// Responds with an error from an async void function. +- (void)throwErrorFromVoidWithError:(NativeInteropTestsError* _Nonnull)error; +/// Returns the passed object, to test serialization and deserialization. +- (NativeInteropAllTypesBridge* _Nullable) + echoNativeInteropAllTypesWithEverything: + (NativeInteropAllTypesBridge* _Nullable)everything + error:(NativeInteropTestsError* _Nonnull) + error SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed object, to test serialization and deserialization. +- (NativeInteropAllNullableTypesBridge* _Nullable) + echoNativeInteropAllNullableTypesWithEverything: + (NativeInteropAllNullableTypesBridge* _Nullable)everything + error: + (NativeInteropTestsError* _Nonnull) + error + SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in arguments of multiple types. +/// Tests multiple-arity FlutterApi handling. +- (NativeInteropAllNullableTypesBridge* _Nullable) + sendMultipleNullableTypesWithANullableBool: + (NSNumber* _Nullable)aNullableBool + aNullableInt:(NSNumber* _Nullable)aNullableInt + aNullableString: + (NSString* _Nullable)aNullableString + error: + (NativeInteropTestsError* _Nonnull) + error SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed object, to test serialization and deserialization. +- (NativeInteropAllNullableTypesWithoutRecursionBridge* _Nullable) + echoNativeInteropAllNullableTypesWithoutRecursionWithEverything: + (NativeInteropAllNullableTypesWithoutRecursionBridge* _Nullable) + everything + error: + (NativeInteropTestsError* _Nonnull) + error + SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in arguments of multiple types. +/// Tests multiple-arity FlutterApi handling. +- (NativeInteropAllNullableTypesWithoutRecursionBridge* _Nullable) + sendMultipleNullableTypesWithoutRecursionWithANullableBool: + (NSNumber* _Nullable)aNullableBool + aNullableInt: + (NSNumber* _Nullable) + aNullableInt + aNullableString: + (NSString* _Nullable) + aNullableString + error: + (NativeInteropTestsError* _Nonnull) + error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed boolean, to test serialization and deserialization. +- (NSNumber* _Nullable)echoBoolWithABool:(NSNumber* _Nullable)aBool + error: + (NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed int, to test serialization and deserialization. +- (NSNumber* _Nullable)echoIntWithAnInt:(NSNumber* _Nullable)anInt + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed double, to test serialization and deserialization. +- (NSNumber* _Nullable)echoDoubleWithADouble:(NSNumber* _Nullable)aDouble + error:(NativeInteropTestsError* _Nonnull) + error SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed string, to test serialization and deserialization. +- (NSString* _Nullable)echoStringWithAString:(NSString* _Nullable)aString + error:(NativeInteropTestsError* _Nonnull) + error SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed byte list, to test serialization and deserialization. +- (NativeInteropTestsPigeonTypedData* _Nullable) + echoUint8ListWithList:(NativeInteropTestsPigeonTypedData* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed int32 list, to test serialization and deserialization. +- (NativeInteropTestsPigeonTypedData* _Nullable) + echoInt32ListWithList:(NativeInteropTestsPigeonTypedData* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed int64 list, to test serialization and deserialization. +- (NativeInteropTestsPigeonTypedData* _Nullable) + echoInt64ListWithList:(NativeInteropTestsPigeonTypedData* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed float64 list, to test serialization and deserialization. +- (NativeInteropTestsPigeonTypedData* _Nullable) + echoFloat64ListWithList:(NativeInteropTestsPigeonTypedData* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoListWithList:(NSArray* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoEnumListWithEnumList:(NSArray* _Nullable)enumList + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoClassListWithClassList:(NSArray* _Nullable)classList + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNonNullEnumListWithEnumList:(NSArray* _Nullable)enumList + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNonNullClassListWithClassList:(NSArray* _Nullable)classList + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoMapWithMap:(NSDictionary, NSObject*>* _Nullable)map + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNonNullStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNonNullIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNonNullEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNonNullClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed enum to test serialization and deserialization. +- (NSNumber* _Nullable)echoEnumWithAnEnum:(NSNumber* _Nullable)anEnum + error: + (NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed enum to test serialization and deserialization. +- (NSNumber* _Nullable) + echoNativeInteropAnotherEnumWithAnotherEnum:(NSNumber* _Nullable)anotherEnum + error: + (NativeInteropTestsError* _Nonnull) + error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed boolean, to test serialization and deserialization. +- (NSNumber* _Nullable) + echoNullableBoolWithABool:(NSNumber* _Nullable)aBool + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed int, to test serialization and deserialization. +- (NSNumber* _Nullable) + echoNullableIntWithAnInt:(NSNumber* _Nullable)anInt + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed double, to test serialization and deserialization. +- (NSNumber* _Nullable) + echoNullableDoubleWithADouble:(NSNumber* _Nullable)aDouble + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed string, to test serialization and deserialization. +- (NSString* _Nullable) + echoNullableStringWithAString:(NSString* _Nullable)aString + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed byte list, to test serialization and deserialization. +- (NativeInteropTestsPigeonTypedData* _Nullable) + echoNullableUint8ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed int32 list, to test serialization and deserialization. +- (NativeInteropTestsPigeonTypedData* _Nullable) + echoNullableInt32ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed int64 list, to test serialization and deserialization. +- (NativeInteropTestsPigeonTypedData* _Nullable) + echoNullableInt64ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed float64 list, to test serialization and deserialization. +- (NativeInteropTestsPigeonTypedData* _Nullable) + echoNullableFloat64ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableListWithList:(NSArray* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableEnumListWithEnumList:(NSArray* _Nullable)enumList + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableClassListWithClassList:(NSArray* _Nullable)classList + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableNonNullEnumListWithEnumList: + (NSArray* _Nullable)enumList + error:(NativeInteropTestsError* _Nonnull) + error SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableNonNullClassListWithClassList: + (NSArray* _Nullable)classList + error: + (NativeInteropTestsError* _Nonnull) + error SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableMapWithMap: + (NSDictionary, NSObject*>* _Nullable)map + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableNonNullStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + error: + (NativeInteropTestsError* _Nonnull) + error SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableNonNullIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableNonNullEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + error: + (NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableNonNullClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + error:(NativeInteropTestsError* _Nonnull) + error SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed enum to test serialization and deserialization. +- (NSNumber* _Nullable) + echoNullableEnumWithAnEnum:(NSNumber* _Nullable)anEnum + error:(NativeInteropTestsError* _Nonnull)error + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed enum to test serialization and deserialization. +- (NSNumber* _Nullable) + echoAnotherNullableEnumWithAnotherEnum:(NSNumber* _Nullable)anotherEnum + error:(NativeInteropTestsError* _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:(NativeInteropTestsError* _Nonnull)error + completionHandler:(void (^_Nonnull)(void))completionHandler; +- (void)throwFlutterErrorAsyncWithError:(NativeInteropTestsError* _Nonnull)error + completionHandler:(void (^_Nonnull)(NSObject* _Nullable)) + completionHandler; +- (void) + echoAsyncNativeInteropAllTypesWithEverything: + (NativeInteropAllTypesBridge* _Nullable)everything + error: + (NativeInteropTestsError* _Nonnull) + error + completionHandler: + (void (^_Nonnull)( + NativeInteropAllTypesBridge* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableNativeInteropAllNullableTypesWithEverything: + (NativeInteropAllNullableTypesBridge* _Nullable)everything + error: + (NativeInteropTestsError* _Nonnull) + error + completionHandler: + (void (^_Nonnull)( + NativeInteropAllNullableTypesBridge* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything: + (NativeInteropAllNullableTypesWithoutRecursionBridge* _Nullable) + everything + error: + (NativeInteropTestsError* _Nonnull) + error + completionHandler: + (void ( + ^_Nonnull)( + NativeInteropAllNullableTypesWithoutRecursionBridge* _Nullable)) + completionHandler; +- (void)echoAsyncBoolWithABool:(NSNumber* _Nullable)aBool + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable))completionHandler; +- (void)echoAsyncIntWithAnInt:(NSNumber* _Nullable)anInt + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable))completionHandler; +- (void)echoAsyncDoubleWithADouble:(NSNumber* _Nullable)aDouble + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable))completionHandler; +- (void)echoAsyncStringWithAString:(NSString* _Nullable)aString + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSString* _Nullable))completionHandler; +- (void)echoAsyncUint8ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void)echoAsyncInt32ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void)echoAsyncInt64ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void)echoAsyncFloat64ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void)echoAsyncObjectWithAnObject:(NSObject* _Nullable)anObject + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSObject* _Nullable))completionHandler; +- (void)echoAsyncListWithList:(NSArray* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + completionHandler:(void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void)echoAsyncEnumListWithEnumList:(NSArray* _Nullable)enumList + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void)echoAsyncClassListWithClassList:(NSArray* _Nullable)classList + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void) + echoAsyncNonNullEnumListWithEnumList:(NSArray* _Nullable)enumList + error: + (NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void) + echoAsyncNonNullClassListWithClassList: + (NSArray* _Nullable)classList + error:(NativeInteropTestsError* _Nonnull) + error + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void) + echoAsyncMapWithMap:(NSDictionary, NSObject*>* _Nullable)map + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSDictionary, NSObject*>* _Nullable)) + completionHandler; +- (void) + echoAsyncStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +- (void)echoAsyncIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +- (void)echoAsyncEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +- (void)echoAsyncClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +- (void)echoAsyncEnumWithAnEnum:(NSNumber* _Nullable)anEnum + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable))completionHandler; +- (void) + echoAnotherAsyncEnumWithAnotherEnum:(NSNumber* _Nullable)anotherEnum + error:(NativeInteropTestsError* _Nonnull)error + completionHandler:(void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)echoAsyncNullableBoolWithABool:(NSNumber* _Nullable)aBool + error:(NativeInteropTestsError* _Nonnull)error + completionHandler:(void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)echoAsyncNullableIntWithAnInt:(NSNumber* _Nullable)anInt + error:(NativeInteropTestsError* _Nonnull)error + completionHandler:(void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableDoubleWithADouble:(NSNumber* _Nullable)aDouble + error:(NativeInteropTestsError* _Nonnull)error + completionHandler:(void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableStringWithAString:(NSString* _Nullable)aString + error:(NativeInteropTestsError* _Nonnull)error + completionHandler:(void (^_Nonnull)(NSString* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableUint8ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableInt32ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableInt64ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableFloat64ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + error: + (NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableObjectWithAnObject:(NSObject* _Nullable)anObject + error:(NativeInteropTestsError* _Nonnull)error + completionHandler:(void (^_Nonnull)(NSObject* _Nullable)) + completionHandler; +- (void)echoAsyncNullableListWithList:(NSArray* _Nullable)list + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableEnumListWithEnumList: + (NSArray* _Nullable)enumList + error: + (NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableClassListWithClassList: + (NSArray* _Nullable)classList + error:(NativeInteropTestsError* _Nonnull) + error + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableNonNullEnumListWithEnumList: + (NSArray* _Nullable)enumList + error: + (NativeInteropTestsError* _Nonnull) + error + completionHandler: + (void (^_Nonnull)( + NSArray* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableNonNullClassListWithClassList: + (NSArray* _Nullable)classList + error: + (NativeInteropTestsError* _Nonnull) + error + completionHandler: + (void (^_Nonnull)( + NSArray* _Nullable)) + completionHandler; +- (void)echoAsyncNullableMapWithMap: + (NSDictionary, NSObject*>* _Nullable)map + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + error:(NativeInteropTestsError* _Nonnull) + error + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +- (void) + echoAsyncNullableEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + error:(NativeInteropTestsError* _Nonnull)error + completionHandler: + (void (^_Nonnull)(NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void)echoAsyncNullableClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + error: + (NativeInteropTestsError* _Nonnull) + error + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void)echoAsyncNullableEnumWithAnEnum:(NSNumber* _Nullable)anEnum + error:(NativeInteropTestsError* _Nonnull)error + completionHandler:(void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void) + echoAnotherAsyncNullableEnumWithAnotherEnum:(NSNumber* _Nullable)anotherEnum + error: + (NativeInteropTestsError* _Nonnull) + error + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +@end + +SWIFT_CLASS( + "_TtC11test_plugin47NativeInteropFlutterIntegrationCoreApiRegistrar") +@interface NativeInteropFlutterIntegrationCoreApiRegistrar : NSObject ++ (void)registerInstanceWithApi: + (id _Nullable)api + name:(NSString* _Nonnull)name; +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +/// Generated setup class from Pigeon to register implemented +/// NativeInteropHostIntegrationCoreApi classes. +SWIFT_CLASS("_TtC11test_plugin40NativeInteropHostIntegrationCoreApiSetup") +@interface NativeInteropHostIntegrationCoreApiSetup : NSObject +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; ++ (NativeInteropHostIntegrationCoreApiSetup* _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:(NativeInteropTestsError* _Nonnull)wrappedError; +/// Returns the passed object, to test serialization and deserialization. +- (NativeInteropAllTypesBridge* _Nullable) + echoAllTypesWithEverything:(NativeInteropAllTypesBridge* _Nonnull)everything + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns an error, to test error handling. +- (NSObject* _Nullable)throwErrorWithWrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError SWIFT_WARN_UNUSED_RESULT; +/// Returns an error from a void function, to test error handling. +- (void)throwErrorFromVoidWithWrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError; +/// Returns a Flutter error, to test error handling. +- (NSObject* _Nullable)throwFlutterErrorWithWrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in int. +- (NSNumber* _Nullable)echoIntWithAnInt:(int64_t)anInt + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in double. +- (NSNumber* _Nullable)echoDoubleWithADouble:(double)aDouble + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in boolean. +- (NSNumber* _Nullable)echoBoolWithABool:(BOOL)aBool + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in string. +- (NSString* _Nullable)echoStringWithAString:(NSString* _Nonnull)aString + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in Uint8List. +- (NativeInteropTestsPigeonTypedData* _Nullable) + echoUint8ListWithAUint8List: + (NativeInteropTestsPigeonTypedData* _Nonnull)aUint8List + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in Int32List. +- (NativeInteropTestsPigeonTypedData* _Nullable) + echoInt32ListWithAInt32List: + (NativeInteropTestsPigeonTypedData* _Nonnull)aInt32List + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in Int64List. +- (NativeInteropTestsPigeonTypedData* _Nullable) + echoInt64ListWithAInt64List: + (NativeInteropTestsPigeonTypedData* _Nonnull)aInt64List + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in Float64List. +- (NativeInteropTestsPigeonTypedData* _Nullable) + echoFloat64ListWithAFloat64List: + (NativeInteropTestsPigeonTypedData* _Nonnull)aFloat64List + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in generic Object. +- (NSObject* _Nullable) + echoObjectWithAnObject:(NSObject* _Nonnull)anObject + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoListWithList:(NSArray* _Nonnull)list + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoStringListWithStringList:(NSArray* _Nonnull)stringList + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoIntListWithIntList:(NSArray* _Nonnull)intList + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoDoubleListWithDoubleList:(NSArray* _Nonnull)doubleList + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoBoolListWithBoolList:(NSArray* _Nonnull)boolList + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoEnumListWithEnumList:(NSArray* _Nonnull)enumList + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoClassListWithClassList:(NSArray* _Nonnull)classList + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNonNullEnumListWithEnumList:(NSArray* _Nonnull)enumList + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNonNullClassListWithClassList:(NSArray* _Nonnull)classList + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoMapWithMap:(NSDictionary, NSObject*>* _Nonnull)map + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nonnull)stringMap + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nonnull)intMap + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nonnull)enumMap + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nonnull)classMap + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNonNullStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nonnull)stringMap + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNonNullIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nonnull)intMap + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNonNullEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nonnull)enumMap + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNonNullClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nonnull)classMap + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed class to test nested class serialization and +/// deserialization. +- (NativeInteropAllClassesWrapperBridge* _Nullable) + echoClassWrapperWithWrapper: + (NativeInteropAllClassesWrapperBridge* _Nonnull)wrapper + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed enum to test serialization and deserialization. +- (NSNumber* _Nullable)echoEnumWithAnEnum:(enum NativeInteropAnEnum)anEnum + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed enum to test serialization and deserialization. +- (NSNumber* _Nullable) + echoAnotherEnumWithAnotherEnum:(enum NativeInteropAnotherEnum)anotherEnum + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the default string. +- (NSString* _Nullable) + echoNamedDefaultStringWithAString:(NSString* _Nonnull)aString + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in double. +- (NSNumber* _Nullable) + echoOptionalDefaultDoubleWithADouble:(double)aDouble + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in int. +- (NSNumber* _Nullable) + echoRequiredIntWithAnInt:(int64_t)anInt + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed object, to test serialization and deserialization. +- (NativeInteropAllNullableTypesBridge* _Nullable) + echoAllNullableTypesWithEverything: + (NativeInteropAllNullableTypesBridge* _Nullable)everything + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed object, to test serialization and deserialization. +- (NativeInteropAllNullableTypesWithoutRecursionBridge* _Nullable) + echoAllNullableTypesWithoutRecursionWithEverything: + (NativeInteropAllNullableTypesWithoutRecursionBridge* _Nullable) + everything + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the inner aString value from the wrapped object, to +/// test sending of nested objects. +- (NSString* _Nullable) + extractNestedNullableStringWithWrapper: + (NativeInteropAllClassesWrapperBridge* _Nonnull)wrapper + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the inner aString value from the wrapped object, to +/// test sending of nested objects. +- (NativeInteropAllClassesWrapperBridge* _Nullable) + createNestedNullableStringWithNullableString: + (NSString* _Nullable)nullableString + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NativeInteropAllNullableTypesBridge* _Nullable) + sendMultipleNullableTypesWithANullableBool: + (NSNumber* _Nullable)aNullableBool + aNullableInt:(NSNumber* _Nullable)aNullableInt + aNullableString: + (NSString* _Nullable)aNullableString + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in arguments of multiple types. +- (NativeInteropAllNullableTypesWithoutRecursionBridge* _Nullable) + sendMultipleNullableTypesWithoutRecursionWithANullableBool: + (NSNumber* _Nullable)aNullableBool + aNullableInt: + (NSNumber* _Nullable) + aNullableInt + aNullableString: + (NSString* _Nullable) + aNullableString + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in int. +- (NSNumber* _Nullable) + echoNullableIntWithANullableInt:(NSNumber* _Nullable)aNullableInt + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in double. +- (NSNumber* _Nullable) + echoNullableDoubleWithANullableDouble:(NSNumber* _Nullable)aNullableDouble + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in boolean. +- (NSNumber* _Nullable) + echoNullableBoolWithANullableBool:(NSNumber* _Nullable)aNullableBool + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in string. +- (NSString* _Nullable) + echoNullableStringWithANullableString:(NSString* _Nullable)aNullableString + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in Uint8List. +- (NativeInteropTestsPigeonTypedData* _Nullable) + echoNullableUint8ListWithANullableUint8List: + (NativeInteropTestsPigeonTypedData* _Nullable)aNullableUint8List + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in Int32List. +- (NativeInteropTestsPigeonTypedData* _Nullable) + echoNullableInt32ListWithANullableInt32List: + (NativeInteropTestsPigeonTypedData* _Nullable)aNullableInt32List + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in Int64List. +- (NativeInteropTestsPigeonTypedData* _Nullable) + echoNullableInt64ListWithANullableInt64List: + (NativeInteropTestsPigeonTypedData* _Nullable)aNullableInt64List + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in Float64List. +- (NativeInteropTestsPigeonTypedData* _Nullable) + echoNullableFloat64ListWithANullableFloat64List: + (NativeInteropTestsPigeonTypedData* _Nullable)aNullableFloat64List + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in generic Object. +- (NSObject* _Nullable) + echoNullableObjectWithANullableObject:(NSObject* _Nonnull)aNullableObject + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableListWithANullableList: + (NSArray* _Nullable)aNullableList + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableEnumListWithEnumList:(NSArray* _Nullable)enumList + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableClassListWithClassList:(NSArray* _Nullable)classList + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableNonNullEnumListWithEnumList: + (NSArray* _Nullable)enumList + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed list, to test serialization and deserialization. +- (NSArray* _Nullable) + echoNullableNonNullClassListWithClassList: + (NSArray* _Nullable)classList + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableMapWithMap: + (NSDictionary, NSObject*>* _Nullable)map + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableNonNullStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableNonNullIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableNonNullEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed map, to test serialization and deserialization. +- (NSDictionary, NSObject*>* _Nullable) + echoNullableNonNullClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + echoNullableEnumWithAnEnum:(NSNumber* _Nullable)anEnum + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + echoAnotherNullableEnumWithAnotherEnum:(NSNumber* _Nullable)anotherEnum + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns passed in int. +- (NSNumber* _Nullable) + echoOptionalNullableIntWithANullableInt:(NSNumber* _Nullable)aNullableInt + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +/// Returns the passed in string. +- (NSString* _Nullable) + echoNamedNullableStringWithANullableString: + (NSString* _Nullable)aNullableString + wrappedError: + (NativeInteropTestsError* _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: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler:(void (^_Nonnull)(void))completionHandler; +/// Returns passed in int asynchronously. +- (void)echoAsyncIntWithAnInt:(int64_t)anInt + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable))completionHandler; +/// Returns passed in double asynchronously. +- (void)echoAsyncDoubleWithADouble:(double)aDouble + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable))completionHandler; +/// Returns the passed in boolean asynchronously. +- (void)echoAsyncBoolWithABool:(BOOL)aBool + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable))completionHandler; +/// Returns the passed string asynchronously. +- (void)echoAsyncStringWithAString:(NSString* _Nonnull)aString + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSString* _Nullable))completionHandler; +/// Returns the passed in Uint8List asynchronously. +- (void)echoAsyncUint8ListWithAUint8List: + (NativeInteropTestsPigeonTypedData* _Nonnull)aUint8List + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +/// Returns the passed in Int32List asynchronously. +- (void)echoAsyncInt32ListWithAInt32List: + (NativeInteropTestsPigeonTypedData* _Nonnull)aInt32List + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +/// Returns the passed in Int64List asynchronously. +- (void)echoAsyncInt64ListWithAInt64List: + (NativeInteropTestsPigeonTypedData* _Nonnull)aInt64List + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +/// Returns the passed in Float64List asynchronously. +- (void) + echoAsyncFloat64ListWithAFloat64List: + (NativeInteropTestsPigeonTypedData* _Nonnull)aFloat64List + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +/// Returns the passed in generic Object asynchronously. +- (void)echoAsyncObjectWithAnObject:(NSObject* _Nonnull)anObject + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSObject* _Nullable))completionHandler; +/// Returns the passed list, to test asynchronous serialization and +/// deserialization. +- (void)echoAsyncListWithList:(NSArray* _Nonnull)list + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + completionHandler:(void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +/// Returns the passed list, to test asynchronous serialization and +/// deserialization. +- (void)echoAsyncEnumListWithEnumList:(NSArray* _Nonnull)enumList + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +/// Returns the passed list, to test asynchronous serialization and +/// deserialization. +- (void)echoAsyncClassListWithClassList:(NSArray* _Nonnull)classList + wrappedError: + (NativeInteropTestsError* _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:(NativeInteropTestsError* _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: + (NativeInteropTestsError* _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: + (NativeInteropTestsError* _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: + (NativeInteropTestsError* _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: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +/// Returns the passed enum, to test asynchronous serialization and +/// deserialization. +- (void)echoAsyncEnumWithAnEnum:(enum NativeInteropAnEnum)anEnum + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable))completionHandler; +/// Returns the passed enum, to test asynchronous serialization and +/// deserialization. +- (void)echoAnotherAsyncEnumWithAnotherEnum: + (enum NativeInteropAnotherEnum)anotherEnum + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +/// Responds with an error from an async function returning a value. +- (void)throwAsyncErrorWithWrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler:(void (^_Nonnull)(NSObject* _Nullable)) + completionHandler; +/// Responds with an error from an async void function. +- (void)throwAsyncErrorFromVoidWithWrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(void))completionHandler; +/// Responds with a Flutter error from an async function returning a value. +- (void)throwAsyncFlutterErrorWithWrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSObject* _Nullable)) + completionHandler; +/// Returns the passed object, to test async serialization and deserialization. +- (void) + echoAsyncNativeInteropAllTypesWithEverything: + (NativeInteropAllTypesBridge* _Nonnull)everything + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropAllTypesBridge* _Nullable)) + completionHandler; +/// Returns the passed object, to test serialization and deserialization. +- (void) + echoAsyncNullableNativeInteropAllNullableTypesWithEverything: + (NativeInteropAllNullableTypesBridge* _Nullable)everything + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropAllNullableTypesBridge* _Nullable)) + completionHandler; +/// Returns the passed object, to test serialization and deserialization. +- (void) + echoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything: + (NativeInteropAllNullableTypesWithoutRecursionBridge* _Nullable) + everything + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void ( + ^_Nonnull)( + NativeInteropAllNullableTypesWithoutRecursionBridge* _Nullable)) + completionHandler; +/// Returns passed in int asynchronously. +- (void)echoAsyncNullableIntWithAnInt:(NSNumber* _Nullable)anInt + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler:(void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +/// Returns passed in double asynchronously. +- (void)echoAsyncNullableDoubleWithADouble:(NSNumber* _Nullable)aDouble + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +/// Returns the passed in boolean asynchronously. +- (void)echoAsyncNullableBoolWithABool:(NSNumber* _Nullable)aBool + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler:(void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +/// Returns the passed string asynchronously. +- (void)echoAsyncNullableStringWithAString:(NSString* _Nullable)aString + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSString* _Nullable)) + completionHandler; +/// Returns the passed in Uint8List asynchronously. +- (void) + echoAsyncNullableUint8ListWithAUint8List: + (NativeInteropTestsPigeonTypedData* _Nullable)aUint8List + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +/// Returns the passed in Int32List asynchronously. +- (void) + echoAsyncNullableInt32ListWithAInt32List: + (NativeInteropTestsPigeonTypedData* _Nullable)aInt32List + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +/// Returns the passed in Int64List asynchronously. +- (void) + echoAsyncNullableInt64ListWithAInt64List: + (NativeInteropTestsPigeonTypedData* _Nullable)aInt64List + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +/// Returns the passed in Float64List asynchronously. +- (void) + echoAsyncNullableFloat64ListWithAFloat64List: + (NativeInteropTestsPigeonTypedData* _Nullable)aFloat64List + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +/// Returns the passed in generic Object asynchronously. +- (void)echoAsyncNullableObjectWithAnObject:(NSObject* _Nonnull)anObject + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSObject* _Nullable)) + completionHandler; +/// Returns the passed list, to test asynchronous serialization and +/// deserialization. +- (void)echoAsyncNullableListWithList:(NSArray* _Nullable)list + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +/// Returns the passed list, to test asynchronous serialization and +/// deserialization. +- (void) + echoAsyncNullableEnumListWithEnumList: + (NSArray* _Nullable)enumList + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +/// Returns the passed list, to test asynchronous serialization and +/// deserialization. +- (void) + echoAsyncNullableClassListWithClassList: + (NSArray* _Nullable)classList + wrappedError:(NativeInteropTestsError* _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: + (NativeInteropTestsError* _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: + (NativeInteropTestsError* _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: + (NativeInteropTestsError* _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: + (NativeInteropTestsError* _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: + (NativeInteropTestsError* _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: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler:(void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +/// Returns the passed enum, to test asynchronous serialization and +/// deserialization. +- (void)echoAnotherAsyncNullableEnumWithAnotherEnum: + (NSNumber* _Nullable)anotherEnum + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)callFlutterNoopWithWrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError; +- (NSObject* _Nullable)callFlutterThrowErrorWithWrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError SWIFT_WARN_UNUSED_RESULT; +- (void)callFlutterThrowErrorFromVoidWithWrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError; +- (NativeInteropAllTypesBridge* _Nullable) + callFlutterEchoNativeInteropAllTypesWithEverything: + (NativeInteropAllTypesBridge* _Nonnull)everything + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NativeInteropAllNullableTypesBridge* _Nullable) + callFlutterEchoNativeInteropAllNullableTypesWithEverything: + (NativeInteropAllNullableTypesBridge* _Nullable)everything + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NativeInteropAllNullableTypesBridge* _Nullable) + callFlutterSendMultipleNullableTypesWithANullableBool: + (NSNumber* _Nullable)aNullableBool + aNullableInt:(NSNumber* _Nullable) + aNullableInt + aNullableString:(NSString* _Nullable) + aNullableString + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NativeInteropAllNullableTypesWithoutRecursionBridge* _Nullable) + callFlutterEchoNativeInteropAllNullableTypesWithoutRecursionWithEverything: + (NativeInteropAllNullableTypesWithoutRecursionBridge* _Nullable) + everything + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NativeInteropAllNullableTypesWithoutRecursionBridge* _Nullable) + callFlutterSendMultipleNullableTypesWithoutRecursionWithANullableBool: + (NSNumber* _Nullable)aNullableBool + aNullableInt: + (NSNumber* _Nullable) + aNullableInt + aNullableString: + (NSString* _Nullable) + aNullableString + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + callFlutterEchoBoolWithABool:(BOOL)aBool + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + callFlutterEchoIntWithAnInt:(int64_t)anInt + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + callFlutterEchoDoubleWithADouble:(double)aDouble + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSString* _Nullable) + callFlutterEchoStringWithAString:(NSString* _Nonnull)aString + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NativeInteropTestsPigeonTypedData* _Nullable) + callFlutterEchoUint8ListWithList: + (NativeInteropTestsPigeonTypedData* _Nonnull)list + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NativeInteropTestsPigeonTypedData* _Nullable) + callFlutterEchoInt32ListWithList: + (NativeInteropTestsPigeonTypedData* _Nonnull)list + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NativeInteropTestsPigeonTypedData* _Nullable) + callFlutterEchoInt64ListWithList: + (NativeInteropTestsPigeonTypedData* _Nonnull)list + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NativeInteropTestsPigeonTypedData* _Nullable) + callFlutterEchoFloat64ListWithList: + (NativeInteropTestsPigeonTypedData* _Nonnull)list + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoListWithList:(NSArray* _Nonnull)list + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoEnumListWithEnumList:(NSArray* _Nonnull)enumList + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoClassListWithClassList: + (NSArray* _Nonnull)classList + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoNonNullEnumListWithEnumList: + (NSArray* _Nonnull)enumList + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoNonNullClassListWithClassList: + (NSArray* _Nonnull)classList + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoMapWithMap: + (NSDictionary, NSObject*>* _Nonnull)map + wrappedError:(NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nonnull)stringMap + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nonnull)intMap + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nonnull)enumMap + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nonnull)classMap + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNonNullStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nonnull)stringMap + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNonNullIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nonnull)intMap + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNonNullEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nonnull)enumMap + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNonNullClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nonnull)classMap + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + callFlutterEchoEnumWithAnEnum:(enum NativeInteropAnEnum)anEnum + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + callFlutterEchoNativeInteropAnotherEnumWithAnotherEnum: + (enum NativeInteropAnotherEnum)anotherEnum + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + callFlutterEchoNullableBoolWithABool:(NSNumber* _Nullable)aBool + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + callFlutterEchoNullableIntWithAnInt:(NSNumber* _Nullable)anInt + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + callFlutterEchoNullableDoubleWithADouble:(NSNumber* _Nullable)aDouble + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSString* _Nullable) + callFlutterEchoNullableStringWithAString:(NSString* _Nullable)aString + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NativeInteropTestsPigeonTypedData* _Nullable) + callFlutterEchoNullableUint8ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NativeInteropTestsPigeonTypedData* _Nullable) + callFlutterEchoNullableInt32ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NativeInteropTestsPigeonTypedData* _Nullable) + callFlutterEchoNullableInt64ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NativeInteropTestsPigeonTypedData* _Nullable) + callFlutterEchoNullableFloat64ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoNullableListWithList:(NSArray* _Nullable)list + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoNullableEnumListWithEnumList: + (NSArray* _Nullable)enumList + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoNullableClassListWithClassList: + (NSArray* _Nullable)classList + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoNullableNonNullEnumListWithEnumList: + (NSArray* _Nullable)enumList + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSArray* _Nullable) + callFlutterEchoNullableNonNullClassListWithClassList: + (NSArray* _Nullable)classList + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableMapWithMap: + (NSDictionary, NSObject*>* _Nullable)map + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableNonNullStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableNonNullIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableNonNullEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSDictionary, NSObject*>* _Nullable) + callFlutterEchoNullableNonNullClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + callFlutterEchoNullableEnumWithAnEnum:(NSNumber* _Nullable)anEnum + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (NSNumber* _Nullable) + callFlutterEchoAnotherNullableEnumWithAnotherEnum: + (NSNumber* _Nullable)anotherEnum + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +- (void)callFlutterNoopAsyncWithWrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(void))completionHandler; +- (void) + callFlutterEchoAsyncNativeInteropAllTypesWithEverything: + (NativeInteropAllTypesBridge* _Nonnull)everything + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropAllTypesBridge* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithEverything: + (NativeInteropAllNullableTypesBridge* _Nullable)everything + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropAllNullableTypesBridge* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableNativeInteropAllNullableTypesWithoutRecursionWithEverything: + (NativeInteropAllNullableTypesWithoutRecursionBridge* _Nullable) + everything + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void ( + ^_Nonnull)( + NativeInteropAllNullableTypesWithoutRecursionBridge* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncBoolWithABool:(BOOL)aBool + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncIntWithAnInt:(int64_t)anInt + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler:(void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncDoubleWithADouble:(double)aDouble + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncStringWithAString:(NSString* _Nonnull)aString + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSString* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncUint8ListWithList: + (NativeInteropTestsPigeonTypedData* _Nonnull)list + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncInt32ListWithList: + (NativeInteropTestsPigeonTypedData* _Nonnull)list + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncInt64ListWithList: + (NativeInteropTestsPigeonTypedData* _Nonnull)list + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncFloat64ListWithList: + (NativeInteropTestsPigeonTypedData* _Nonnull)list + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncObjectWithAnObject:(NSObject* _Nonnull)anObject + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSObject* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncListWithList:(NSArray* _Nonnull)list + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncEnumListWithEnumList: + (NSArray* _Nonnull)enumList + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncClassListWithClassList: + (NSArray* _Nonnull)classList + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSArray* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNonNullEnumListWithEnumList: + (NSArray* _Nonnull)enumList + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSArray* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNonNullClassListWithClassList: + (NSArray* _Nonnull)classList + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSArray* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncMapWithMap: + (NSDictionary, NSObject*>* _Nonnull)map + wrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, NSObject*>* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nonnull)stringMap + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nonnull)intMap + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nonnull)enumMap + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nonnull)classMap + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncEnumWithAnEnum:(enum NativeInteropAnEnum)anEnum + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAnotherAsyncEnumWithAnotherEnum: + (enum NativeInteropAnotherEnum)anotherEnum + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableBoolWithABool:(NSNumber* _Nullable)aBool + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableIntWithAnInt:(NSNumber* _Nullable)anInt + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableDoubleWithADouble: + (NSNumber* _Nullable)aDouble + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableStringWithAString: + (NSString* _Nullable)aString + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSString* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableUint8ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableInt32ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableInt64ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableFloat64ListWithList: + (NativeInteropTestsPigeonTypedData* _Nullable)list + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NativeInteropTestsPigeonTypedData* _Nullable)) + completionHandler; +- (void) + callFlutterThrowFlutterErrorAsyncWithWrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSObject* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableObjectWithAnObject:(NSObject* _Nonnull)anObject + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSObject* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableListWithList:(NSArray* _Nullable)list + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSArray* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableEnumListWithEnumList: + (NSArray* _Nullable)enumList + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSArray* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableClassListWithClassList: + (NSArray* _Nullable)classList + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSArray* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableNonNullEnumListWithEnumList: + (NSArray* _Nullable)enumList + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSArray< + NSObject*>* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableNonNullClassListWithClassList: + (NSArray* _Nullable)classList + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSArray< + NSObject*>* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableMapWithMap: + (NSDictionary, NSObject*>* _Nullable)map + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableStringMapWithStringMap: + (NSDictionary, NSObject*>* _Nullable)stringMap + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary< + id, + NSObject*>* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableIntMapWithIntMap: + (NSDictionary, NSObject*>* _Nullable)intMap + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableEnumMapWithEnumMap: + (NSDictionary, NSObject*>* _Nullable)enumMap + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAsyncNullableClassMapWithClassMap: + (NSDictionary, NSObject*>* _Nullable)classMap + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSDictionary, + NSObject*>* _Nullable)) + completionHandler; +- (void)callFlutterEchoAsyncNullableEnumWithAnEnum:(NSNumber* _Nullable)anEnum + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +- (void) + callFlutterEchoAnotherAsyncNullableEnumWithAnotherEnum: + (NSNumber* _Nullable)anotherEnum + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError + completionHandler: + (void (^_Nonnull)( + NSNumber* _Nullable)) + completionHandler; +/// Returns true if the handler is run on a main thread. +- (NSNumber* _Nullable)defaultIsMainThreadWithWrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError SWIFT_WARN_UNUSED_RESULT; +/// Spawns a background thread and calls noop on the +/// [NativeInteropFlutterIntegrationCoreApi]. Returns the result of whether the +/// flutter call was successful. +- (void) + callFlutterNoopOnBackgroundThreadWithWrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError + completionHandler: + (void (^_Nonnull)(NSNumber* _Nullable)) + completionHandler; +/// Tests deregistering a Host API natively. +- (NSNumber* _Nullable)testDeregisterHostApiWithWrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError SWIFT_WARN_UNUSED_RESULT; +/// Tests deregistering a Flutter API natively. +- (NSNumber* _Nullable)testDeregisterFlutterApiWithWrappedError: + (NativeInteropTestsError* _Nonnull)wrappedError SWIFT_WARN_UNUSED_RESULT; +/// Registers and immediately deregisters a Host API under [name]. +- (void) + registerAndImmediatelyDeregisterHostApiWithName:(NSString* _Nonnull)name + wrappedError: + (NativeInteropTestsError* _Nonnull) + wrappedError; +/// Tests that calling a deregistered Flutter API under [name] fails / returns +/// null. +- (NSNumber* _Nullable) + testCallDeregisteredFlutterApiWithName:(NSString* _Nonnull)name + wrappedError:(NativeInteropTestsError* _Nonnull) + wrappedError + SWIFT_WARN_UNUSED_RESULT; +@end + +/// Error class for passing custom error details to Dart side. +SWIFT_CLASS("_TtC11test_plugin23NativeInteropTestsError") +@interface NativeInteropTestsError : 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_plugin31NativeInteropTestsNumberWrapper") +@interface NativeInteropTestsNumberWrapper : 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_plugin36NativeInteropTestsPigeonInternalNull") +@interface NativeInteropTestsPigeonInternalNull : NSObject +- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +@end + +@class NSData; +SWIFT_CLASS("_TtC11test_plugin33NativeInteropTestsPigeonTypedData") +@interface NativeInteropTestsPigeonTypedData : 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 + +/// Generated bridge class from Pigeon that moves data from Swift to +/// Objective-C. +SWIFT_CLASS("_TtC11test_plugin30NativeInteropUnusedClassBridge") +@interface NativeInteropUnusedClassBridge : 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 + +#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/app/build.gradle.kts b/packages/pigeon/platform_tests/test_plugin/example/android/app/build.gradle.kts index b0a909c00d4f..abb1cd922055 100644 --- a/packages/pigeon/platform_tests/test_plugin/example/android/app/build.gradle.kts +++ b/packages/pigeon/platform_tests/test_plugin/example/android/app/build.gradle.kts @@ -41,3 +41,89 @@ kotlin { flutter { source = "../.." } +// Gradle stub for listing dependencies in JNIgen. If found in +// android/build.gradle.kts, please delete the following task. +tasks.register("getReleaseCompileClasspath") { + // Tell Gradle to complete the configuration phase of all subprojects (eg + // Flutter plugins) before continuing configuration of this project. + allprojects { + if (this != rootProject) { + evaluationDependsOn(path) + } + } + + // Fetch all the dependencies and extract the JARs. + allprojects { + val config = configurations.findByName("releaseCompileClasspath") ?: return@allprojects + try { + // Find all JARs. + val jarView = config.incoming.artifactView { + attributes { + attribute(org.gradle.api.attributes.Attribute.of("artifactType", String::class.java), "jar") + } + lenient(true) + } + inputs.files(jarView.files) + + // Also find all JARs stored in AARs. + val aarView = config.incoming.artifactView { + attributes { + attribute(org.gradle.api.attributes.Attribute.of("artifactType", String::class.java), "android-classes-jar") + } + lenient(true) + } + inputs.files(aarView.files) + } catch (e: Exception) {} + } + + // Find all the JARs and print their paths. + doLast { + try { + val cp = mutableListOf() + + // JNIgen uses the first version of a class it finds, so the order we list + // the JARs in is important. + val mainProject = allprojects.find { project -> + project.plugins.hasPlugin("com.android.application") + } ?: project + + // Start with the android bootClasspath. This contains things like java.* + // and android.*. + val android = mainProject.extensions.findByName("android") as? com.android.build.gradle.BaseExtension + android?.bootClasspath?.let { file -> cp.addAll(file) } + + // Next, add the main project's JARs, followed by all the other project's + // JARs. + val projects = (listOf(mainProject) + allprojects).distinct() + projects.forEach { project -> + val config = project.configurations.findByName("releaseCompileClasspath") ?: return@forEach + try { + // Add all JARs. + cp.addAll(config.incoming.artifactView { + attributes { + attribute(org.gradle.api.attributes.Attribute.of("artifactType", String::class.java), "jar") + } + lenient(true) + }.files) + + // Add all JARs that were contained in AARs. + cp.addAll(config.incoming.artifactView { + attributes { + attribute(org.gradle.api.attributes.Attribute.of("artifactType", String::class.java), "android-classes-jar") + } + lenient(true) + }.files) + } catch (e: Exception) {} + } + + // Dedupe and print the absolute paths to all the JARs. + cp.map { file -> file.absolutePath }.distinct().forEach { + path -> println(path) + } + } catch (e: Exception) { + System.err.println("Gradle stub cannot find JAR libraries.") + throw e + } + } + System.err.println("If you are seeing this error in `flutter build` output, it is likely that JNIgen left some stubs in the build.gradle file. Please restore that file from your version control system or manually remove the stub functions named getReleaseCompileClasspath and / or getSources.") +} diff --git a/packages/pigeon/platform_tests/test_plugin/example/android/settings.gradle.kts b/packages/pigeon/platform_tests/test_plugin/example/android/settings.gradle.kts index 575dbbe6c4c6..a8be9bb7583e 100644 --- a/packages/pigeon/platform_tests/test_plugin/example/android/settings.gradle.kts +++ b/packages/pigeon/platform_tests/test_plugin/example/android/settings.gradle.kts @@ -21,7 +21,7 @@ pluginManagement { plugins { id("dev.flutter.flutter-plugin-loader") version "1.0.0" id("com.android.application") version "9.1.0" apply false - id("org.jetbrains.kotlin.android") version "2.4.0" apply false + id("org.jetbrains.kotlin.android") version "2.3.20" apply false id("com.google.cloud.artifactregistry.gradle-plugin") version "2.2.1" } 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..44d00be99ea4 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/example/ffigen_config.dart @@ -0,0 +1,156 @@ +// Autogenerated from Pigeon, do not edit directly. +// See also: https://pub.dev/packages/pigeon +// ignore_for_file: depend_on_referenced_packages + +import 'dart:io'; + +import 'package:ffigen/ffigen.dart' as fg; +import 'package:path/path.dart' as path; +import 'package:pub_semver/pub_semver.dart'; +import 'package:swift2objc/swift2objc.dart'; +import 'package:swiftgen/src/config.dart'; +import 'package:swiftgen/swiftgen.dart'; + +Future main(List args) async { + Directory.current = Platform.script.resolve('.').toFilePath(); + Uri sdk; + if (args.isNotEmpty) { + sdk = Uri.directory(args[0]); + } else { + sdk = await _getAppleSdk(); + } + final bool isValidSdk = + File(path.join(sdk.toFilePath(), 'SDKSettings.json')).existsSync() || + File(path.join(sdk.toFilePath(), 'SDKSettings.plist')).existsSync(); + if (!isValidSdk) { + sdk = await _getAppleSdk(); + } + + final classes = { + 'NativeInteropTestsPigeonInternalNull', + 'NativeInteropTestsPigeonTypedData', + 'NativeInteropTestsNumberWrapper', + 'NSURLCredential', + 'NativeInteropHostIntegrationCoreApi', + 'NativeInteropHostIntegrationCoreApiSetup', + 'NativeInteropFlutterIntegrationCoreApiBridge', + 'NativeInteropFlutterIntegrationCoreApiRegistrar', + 'NativeInteropUnusedClassBridge', + 'NativeInteropAllTypesBridge', + 'NativeInteropAllNullableTypesBridge', + 'NativeInteropAllNullableTypesWithoutRecursionBridge', + 'NativeInteropAllClassesWrapperBridge', + 'NativeInteropTestsError', + }; + final enums = { + 'NativeInteropAnEnum', + 'NativeInteropAnotherEnum', + 'NSURLSessionAuthChallengeDisposition', + 'NativeInteropTestsPigeonInternalNumberType', + }; + var targetTriple = ''; + if (targetTriple.isEmpty) { + try { + targetTriple = sdk.path.toLowerCase().contains('macosx') + ? await macOSX64TargetTripleLatest + : await iOSArm64TargetTripleLatest; + } catch (_) { + targetTriple = sdk.path.toLowerCase().contains('macosx') + ? 'x86_64-apple-macosx' + : 'arm64-apple-ios'; + } + } + + await SwiftGenerator( + target: Target(triple: targetTriple, sdk: sdk), + inputs: [ + ObjCCompatibleSwiftFileInput( + files: [ + Uri.file('../darwin/test_plugin/Sources/test_plugin/NativeInteropTests.gen.swift'), + ], + ), + ], + include: (Declaration d) => classes.contains(d.name) || enums.contains(d.name), + output: Output( + module: 'test_plugin', + dartFile: Uri.file( + '../../shared_test_plugin_code/lib/src/generated/native_interop_tests.gen.ffi.dart', + ), + objectiveCFile: Uri.file( + '../darwin/test_plugin/Sources/test_plugin_objc_gen/NativeInteropTests.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(13, 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) { + // Assign declarations to their destination module. Foundation classes starting with 'NS' + // return null so ffigen treats them as external system framework types (provided by + // package:objective_c) rather than generating local module wrappers for them. + // Specific types (like NSURLCredential) return 'test_plugin' so ffigen generates the + // explicit Dart FFI bindings required by this plugin. + 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) { + // Assign declarations to their destination module. Foundation classes starting with 'NS' + // return null so ffigen treats them as external system framework types (provided by + // package:objective_c) rather than generating local module wrappers for them. + // Specific types (like NSURLCredential) return 'test_plugin' so ffigen generates the + // explicit Dart FFI bindings required by this plugin. + if (decl.originalName == 'NSURLCredential' || + decl.originalName == 'NSURLSessionAuthChallengeDisposition') { + return 'test_plugin'; + } + + return decl.originalName.startsWith('NS') ? null : 'test_plugin'; + }, + ), + ), + ), + ).generate( + logger: null, + tempDirectory: Uri.directory('../darwin/test_plugin/Sources/test_plugin_objc_gen'), + ); +} + +Future _getAppleSdk() async { + try { + final ProcessResult result = await Process.run('xcrun', [ + '--sdk', + 'iphoneos', + '--show-sdk-path', + ]); + if (result.exitCode == 0) { + final String sdkPath = result.stdout.toString().trim(); + if (sdkPath.isNotEmpty && + (File(path.join(sdkPath, 'SDKSettings.json')).existsSync() || + File(path.join(sdkPath, 'SDKSettings.plist')).existsSync())) { + return Uri.directory(sdkPath); + } + } + } catch (_) {} + return iOSSdk; +} 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..66130d8230e5 --- /dev/null +++ b/packages/pigeon/platform_tests/test_plugin/example/jnigen_config.dart @@ -0,0 +1,42 @@ +// Autogenerated from Pigeon, do not edit directly. +// See also: https://pub.dev/packages/pigeon +// ignore_for_file: depend_on_referenced_packages + +import 'dart:io'; +import 'package:jnigen/jnigen.dart'; +import 'package:logging/logging.dart'; + +void main() async { + Directory.current = Platform.script.resolve('.').toFilePath(); + 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/native_interop_tests.gen.jni.dart', + ), + structure: OutputStructure.singleFile, + ), + ), + logLevel: Level.ALL, + classPath: [Uri.directory('build/app/tmp/kotlin-classes/release')], + + classes: [ + 'com.example.test_plugin.NativeInteropTestsError', + 'com.example.test_plugin.NativeInteropHostIntegrationCoreApi', + 'com.example.test_plugin.NativeInteropHostIntegrationCoreApiRegistrar', + 'com.example.test_plugin.NativeInteropFlutterIntegrationCoreApi', + 'com.example.test_plugin.NativeInteropFlutterIntegrationCoreApiRegistrar', + 'com.example.test_plugin.NativeInteropUnusedClass', + 'com.example.test_plugin.NativeInteropAllTypes', + 'com.example.test_plugin.NativeInteropAllNullableTypes', + 'com.example.test_plugin.NativeInteropAllNullableTypesWithoutRecursion', + 'com.example.test_plugin.NativeInteropAllClassesWrapper', + 'com.example.test_plugin.NativeInteropAnEnum', + 'com.example.test_plugin.NativeInteropAnotherEnum', + ], + ), + ); +} diff --git a/packages/pigeon/platform_tests/test_plugin/example/pubspec.yaml b/packages/pigeon/platform_tests/test_plugin/example/pubspec.yaml index f82d2aced382..29356065e025 100644 --- a/packages/pigeon/platform_tests/test_plugin/example/pubspec.yaml +++ b/packages/pigeon/platform_tests/test_plugin/example/pubspec.yaml @@ -6,8 +6,19 @@ environment: sdk: ^3.10.0 dependencies: + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: 27890daeab690209603a979c7fbb54b22a3c878f flutter: sdk: flutter + jni: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jni + ref: 27890daeab690209603a979c7fbb54b22a3c878f + pub_semver: ^2.2.0 shared_test_plugin_code: path: ../../shared_test_plugin_code test_plugin: @@ -18,6 +29,46 @@ dev_dependencies: sdk: flutter integration_test: sdk: flutter + logging: ^1.3.0 + pigeon: + path: ../../.. flutter: uses-material-design: true + +dependency_overrides: + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: 27890daeab690209603a979c7fbb54b22a3c878f + ffigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffigen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + jni: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jni + ref: 27890daeab690209603a979c7fbb54b22a3c878f + jnigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jnigen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + objective_c: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/objective_c + ref: 27890daeab690209603a979c7fbb54b22a3c878f + swift2objc: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swift2objc + ref: 27890daeab690209603a979c7fbb54b22a3c878f + swiftgen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swiftgen + ref: 27890daeab690209603a979c7fbb54b22a3c878f \ No newline at end of file diff --git a/packages/pigeon/platform_tests/test_plugin/pubspec.yaml b/packages/pigeon/platform_tests/test_plugin/pubspec.yaml index 22e69f2ecbf3..371dcb10d203 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: 27890daeab690209603a979c7fbb54b22a3c878f flutter: sdk: flutter + jni: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jni + ref: 27890daeab690209603a979c7fbb54b22a3c878f dev_dependencies: flutter_test: sdk: flutter + +dependency_overrides: + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: 27890daeab690209603a979c7fbb54b22a3c878f + ffigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffigen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + objective_c: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/objective_c + ref: 27890daeab690209603a979c7fbb54b22a3c878f + swift2objc: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swift2objc + ref: 27890daeab690209603a979c7fbb54b22a3c878f \ No newline at end of file diff --git a/packages/pigeon/pubspec.yaml b/packages/pigeon/pubspec.yaml index af91648dcb59..d9c496ce5143 100644 --- a/packages/pigeon/pubspec.yaml +++ b/packages/pigeon/pubspec.yaml @@ -13,15 +13,87 @@ dependencies: code_builder: ^4.10.0 collection: ^1.15.0 dart_style: ^3.0.0 + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: 27890daeab690209603a979c7fbb54b22a3c878f + ffigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffigen + ref: 27890daeab690209603a979c7fbb54b22a3c878f graphs: ^2.3.1 + jni: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jni + ref: 27890daeab690209603a979c7fbb54b22a3c878f + jnigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jnigen + ref: 27890daeab690209603a979c7fbb54b22a3c878f meta: ^1.9.0 + objective_c: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/objective_c + ref: 27890daeab690209603a979c7fbb54b22a3c878f path: ^1.8.0 pub_semver: ^2.1.4 + swift2objc: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swift2objc + ref: 27890daeab690209603a979c7fbb54b22a3c878f + swiftgen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swiftgen + ref: 27890daeab690209603a979c7fbb54b22a3c878f yaml: ^3.1.1 dev_dependencies: test: ^1.11.1 +dependency_overrides: + ffi: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffi + ref: 27890daeab690209603a979c7fbb54b22a3c878f + ffigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/ffigen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + jni: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jni + ref: 27890daeab690209603a979c7fbb54b22a3c878f + jnigen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/jnigen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + objective_c: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/objective_c + ref: 27890daeab690209603a979c7fbb54b22a3c878f + swift2objc: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swift2objc + ref: 27890daeab690209603a979c7fbb54b22a3c878f + swiftgen: + git: + url: https://github.com/dart-lang/native/ + path: pkgs/swiftgen + ref: 27890daeab690209603a979c7fbb54b22a3c878f + topics: - codegen - interop diff --git a/packages/pigeon/test/dart_generator_test.dart b/packages/pigeon/test/dart_generator_test.dart index 8925c9aaf583..3514143bb62e 100644 --- a/packages/pigeon/test/dart_generator_test.dart +++ b/packages/pigeon/test/dart_generator_test.dart @@ -76,7 +76,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 event channel api with usage docs on the generated method', () { @@ -2068,6 +2068,83 @@ name: foobar expect(code, contains(r"return 'Foobar(field1: $field1)';")); }); + test('native interop host api unsupported error - getInstance', () { + final root = Root( + apis: [ + AstHostApi( + name: 'Api', + methods: [ + Method( + name: 'doSomething', + location: ApiLocation.host, + parameters: [], + returnType: const TypeDeclaration(baseName: 'void', isNullable: false), + ), + ], + ), + ], + classes: [], + enums: [], + ); + final sink = StringBuffer(); + const generator = DartGenerator(); + generator.generate( + const InternalDartOptions( + ignoreLints: false, + useFfi: true, + useJni: true, + dartOut: 'lib/foo.dart', + ), + root, + sink, + dartPackageName: DEFAULT_PACKAGE_NAME, + ); + final code = sink.toString(); + + expect(code, contains('Native Interop is not supported on this platform. Use Api instead.')); + }); + + test('native interop host api unsupported error - createWithNativeInteropApi', () { + final root = Root( + apis: [ + AstHostApi( + name: 'Api', + methods: [ + Method( + name: 'doSomething', + location: ApiLocation.host, + parameters: [], + returnType: const TypeDeclaration(baseName: 'void', isNullable: false), + ), + ], + ), + ], + classes: [], + enums: [], + ); + final sink = StringBuffer(); + const generator = DartGenerator(); + generator.generate( + const InternalDartOptions( + ignoreLints: false, + useFfi: true, + useJni: true, + dartOut: 'lib/foo.dart', + ), + root, + sink, + dartPackageName: DEFAULT_PACKAGE_NAME, + ); + final code = sink.toString(); + + expect( + code, + contains( + 'Native Interop is not supported on this platform. Use the default constructor of Api instead.', + ), + ); + }); + test('gen constants', () { final root = Root( apis: [], diff --git a/packages/pigeon/test/generator_tools_test.dart b/packages/pigeon/test/generator_tools_test.dart index 2c47589a4b4a..43db43af509e 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', () { @@ -466,4 +466,109 @@ void myMethod() { } '''); }); + + group('compareTypeDeclarationGenericness', () { + const object = TypeDeclaration(baseName: 'Object', isNullable: false); + const nullableObject = TypeDeclaration(baseName: 'Object', isNullable: true); + const listObject = TypeDeclaration( + baseName: 'List', + isNullable: false, + typeArguments: [object], + ); + const untypedList = TypeDeclaration(baseName: 'List', isNullable: false); + + const string = TypeDeclaration(baseName: 'String', isNullable: false); + const listString = TypeDeclaration( + baseName: 'List', + isNullable: false, + typeArguments: [string], + ); + const mapObjectObject = TypeDeclaration( + baseName: 'Map', + isNullable: false, + typeArguments: [object, object], + ); + const untypedMap = TypeDeclaration(baseName: 'Map', isNullable: false); + + const listListObject = TypeDeclaration( + baseName: 'List', + isNullable: false, + typeArguments: [listObject], + ); + + const listListNullableObject = TypeDeclaration( + baseName: 'List', + isNullable: false, + typeArguments: [ + TypeDeclaration( + baseName: 'List', + isNullable: false, + typeArguments: [nullableObject], + ), + ], + ); + + test('Object? is more generic than List', () { + expect(compareTypeDeclarationGenericness(nullableObject, listObject), 1); + }); + + test('Object is less generic than Object?', () { + expect(compareTypeDeclarationGenericness(object, nullableObject), -1); + }); + + test('Untyped List defaults to List which is more generic than List', () { + expect(compareTypeDeclarationGenericness(untypedList, listObject), 1); + }); + + test('List is more generic than List', () { + expect(compareTypeDeclarationGenericness(listObject, listString), 1); + }); + + test('Map is more generic than List', () { + expect(compareTypeDeclarationGenericness(mapObjectObject, listObject), 1); + }); + + test( + 'Untyped Map defaults to Map which is more generic than Map', + () { + expect(compareTypeDeclarationGenericness(untypedMap, mapObjectObject), 1); + }, + ); + + test('List> is more generic than List>', () { + expect(compareTypeDeclarationGenericness(listListNullableObject, listListObject), 1); + }); + }); + + group('isPrimitiveType', () { + test('returns true for int, double, bool', () { + expect(isPrimitiveType(const TypeDeclaration(baseName: 'int', isNullable: false)), isTrue); + expect(isPrimitiveType(const TypeDeclaration(baseName: 'double', isNullable: false)), isTrue); + expect(isPrimitiveType(const TypeDeclaration(baseName: 'bool', isNullable: false)), isTrue); + }); + + test('returns false for other types', () { + expect( + isPrimitiveType(const TypeDeclaration(baseName: 'String', isNullable: false)), + isFalse, + ); + expect(isPrimitiveType(const TypeDeclaration(baseName: 'List', isNullable: false)), isFalse); + expect( + isPrimitiveType(const TypeDeclaration(baseName: 'Object', isNullable: false)), + isFalse, + ); + }); + }); + + group('symbols', () { + test('getNullabilitySymbol', () { + expect(getNullabilitySymbol(true), '?'); + expect(getNullabilitySymbol(false), ''); + }); + + test('getForceNonNullSymbol', () { + expect(getForceNonNullSymbol(true), '!'); + expect(getForceNonNullSymbol(false), ''); + }); + }); } diff --git a/packages/pigeon/test/kotlin_generator_test.dart b/packages/pigeon/test/kotlin_generator_test.dart index 4daaadba5b79..566dc15b087a 100644 --- a/packages/pigeon/test/kotlin_generator_test.dart +++ b/packages/pigeon/test/kotlin_generator_test.dart @@ -1878,4 +1878,47 @@ void main() { expect(code, contains(r'const val stringWithBackslashDollar: String = "\\\$"')); expect(code, contains(r'const val stringWithTwoBackslashesDollar: String = "\\\\\$"')); }); + + test('kotlin generator handles HostApi and FlutterApi deregistration with null', () { + final root = Root( + apis: [ + AstHostApi( + name: 'HostApi', + methods: [ + Method( + name: 'doSomething', + location: ApiLocation.host, + returnType: const TypeDeclaration.voidDeclaration(), + parameters: [], + ), + ], + ), + AstFlutterApi( + name: 'FlutterApi', + methods: [ + Method( + name: 'onEvent', + location: ApiLocation.flutter, + returnType: const TypeDeclaration.voidDeclaration(), + parameters: [], + ), + ], + ), + ], + classes: [], + enums: [], + ); + final sink = StringBuffer(); + const kotlinOptions = InternalKotlinOptions(kotlinOut: '', useJni: true); + const generator = KotlinGenerator(); + generator.generate(kotlinOptions, root, sink, dartPackageName: DEFAULT_PACKAGE_NAME); + final code = sink.toString(); + expect(code, contains('api: HostApi?,')); + expect(code, contains('HostApiInstances.remove(name)')); + expect( + code, + contains('fun registerInstance(api: FlutterApi?, name: String = defaultInstanceName)'), + ); + expect(code, contains('registeredFlutterApi.remove(name)')); + }); } diff --git a/packages/pigeon/test/pigeon_lib_test.dart b/packages/pigeon/test/pigeon_lib_test.dart index e8df30b2ec13..ef704975e82d 100644 --- a/packages/pigeon/test/pigeon_lib_test.dart +++ b/packages/pigeon/test/pigeon_lib_test.dart @@ -6,9 +6,13 @@ import 'dart:async'; import 'dart:io'; import 'package:pigeon/src/ast.dart'; +import 'package:pigeon/src/dart/dart_generator.dart'; import 'package:pigeon/src/generator_tools.dart'; +import 'package:pigeon/src/kotlin/jnigen_config_generator.dart'; +import 'package:pigeon/src/kotlin/kotlin_generator.dart'; import 'package:pigeon/src/pigeon_lib.dart'; import 'package:pigeon/src/pigeon_lib_internal.dart'; +import 'package:pigeon/src/swift/swift_generator.dart'; import 'package:test/test.dart'; class _ValidatorGeneratorAdapter implements GeneratorAdapter { @@ -110,6 +114,16 @@ void main() { expect(opts.kotlinOptions!.useGeneratedAnnotation, isTrue); }); + test('parse args - kotlin_jni_classpaths', () { + final PigeonOptions opts = Pigeon.parseArgs([ + '--kotlin_jni_classpaths', + 'foo/bar', + '--kotlin_jni_classpaths', + 'baz.jar', + ]); + expect(opts.kotlinOptions?.jniClassPaths, equals(['foo/bar', 'baz.jar'])); + }); + test('parse args - cpp_header_out', () { final PigeonOptions opts = Pigeon.parseArgs(['--cpp_header_out', 'foo.h']); expect(opts.cppHeaderOut, equals('foo.h')); @@ -135,6 +149,85 @@ void main() { expect(opts.basePath, equals('./foo/')); }); + test('parse args - app_directory', () { + final PigeonOptions opts = Pigeon.parseArgs(['--app_directory', './foo/']); + expect(opts.appDirectory, equals('./foo/')); + }); + + test('parse args - swift options', () { + final PigeonOptions opts = Pigeon.parseArgs([ + '--swift_error_class_name', + 'MyError', + '--no-swift_include_error_class', + '--swift_use_ffi', + '--swift_ffi_module_name', + 'MyModule', + '--swift_app_directory', + './app/', + '--swift_apple_sdk_path', + '/path/to/sdk', + '--swift_apple_sdk_triple', + 'arm64-apple-ios', + ]); + expect(opts.swiftOptions?.errorClassName, equals('MyError')); + expect(opts.swiftOptions?.includeErrorClass, isFalse); + expect(opts.swiftOptions?.useFfi, isTrue); + expect(opts.swiftOptions?.ffiModuleName, equals('MyModule')); + expect(opts.swiftOptions?.appDirectory, equals('./app/')); + expect(opts.swiftOptions?.appleSdkPath, equals('/path/to/sdk')); + expect(opts.swiftOptions?.appleSdkTriple, equals('arm64-apple-ios')); + }); + + test('parse args - java options', () { + final PigeonOptions opts = Pigeon.parseArgs(['--java_class_name', 'MyClass']); + expect(opts.javaOptions?.className, equals('MyClass')); + }); + + test('parse args - kotlin options', () { + final PigeonOptions opts = Pigeon.parseArgs([ + '--kotlin_use_jni', + '--kotlin_app_directory', + './app/', + '--kotlin_error_class_name', + 'MyError', + '--no-kotlin_include_error_class', + '--kotlin_file_specific_class_name_component', + 'MyComponent', + ]); + expect(opts.kotlinOptions?.useJni, isTrue); + expect(opts.kotlinOptions?.appDirectory, equals('./app/')); + expect(opts.kotlinOptions?.errorClassName, equals('MyError')); + expect(opts.kotlinOptions?.includeErrorClass, isFalse); + expect(opts.kotlinOptions?.fileSpecificClassNameComponent, equals('MyComponent')); + }); + + test('parse args - cpp options', () { + final PigeonOptions opts = Pigeon.parseArgs([ + '--cpp_header_include_path', + 'foo.h', + '--cpp_header_out_path', + 'out.h', + ]); + expect(opts.cppOptions?.headerIncludePath, equals('foo.h')); + expect(opts.cppOptions?.headerOutPath, equals('out.h')); + }); + + test('parse args - gobject options', () { + final PigeonOptions opts = Pigeon.parseArgs([ + '--gobject_header_include_path', + 'foo.h', + '--gobject_header_out_path', + 'out.h', + ]); + expect(opts.gobjectOptions?.headerIncludePath, equals('foo.h')); + expect(opts.gobjectOptions?.headerOutPath, equals('out.h')); + }); + + test('parse args - objc options', () { + final PigeonOptions opts = Pigeon.parseArgs(['--objc_header_include_path', 'foo.h']); + expect(opts.objcOptions?.headerIncludePath, equals('foo.h')); + }); + test('simple parse api', () { const code = ''' class Input1 { @@ -1880,7 +1973,12 @@ abstract class Api { withTempFile('foo.dart', (File input) async { input.writeAsStringSync(code); final int result = await Pigeon.runWithOptions( - PigeonOptions(input: input.path, swiftOut: 'Foo.swift', dartOut: 'foo.dart'), + PigeonOptions( + input: input.path, + swiftOut: '${input.parent.path}/Foo.swift', + dartOut: '${input.parent.path}/foo.dart', + dartPackageName: 'foo_package', + ), ); expect(result, isNot(0)); completer.complete(); @@ -1889,6 +1987,163 @@ abstract class Api { }); }); + group('Dependency Validation', () { + test( + 'FfigenConfigGeneratorAdapter validation passes if ffi, objective_c, ffigen exist', + () async { + final Directory tempDir = Directory.systemTemp.createTempSync('pigeon_dependency_test_'); + try { + final pubspecFile = File('${tempDir.path}/pubspec.yaml'); + pubspecFile.writeAsStringSync(''' +name: my_package +dependencies: + ffi: ^2.0.0 + objective_c: ^1.0.0 +dev_dependencies: + ffigen: ^20.0.0 +'''); + final InternalPigeonOptions options = InternalPigeonOptions.fromPigeonOptions( + PigeonOptions( + input: 'foo.dart', + dartOut: '${tempDir.path}/lib/messages.dart', + swiftOut: '${tempDir.path}/lib/messages.swift', + swiftOptions: const SwiftOptions(useFfi: true), + dartPackageName: 'my_package', + ), + ); + const adapter = FfigenConfigGeneratorAdapter(); + final List errors = adapter.validate( + options, + Root(apis: [], classes: [], enums: []), + ); + expect(errors, isEmpty); + } finally { + tempDir.deleteSync(recursive: true); + } + }, + ); + + test('FfigenConfigGeneratorAdapter validation fails if objective_c is missing', () async { + final Directory tempDir = Directory.systemTemp.createTempSync('pigeon_dependency_test_'); + try { + final pubspecFile = File('${tempDir.path}/pubspec.yaml'); + pubspecFile.writeAsStringSync(''' +name: my_package +dependencies: + ffi: ^2.0.0 +dev_dependencies: + ffigen: ^20.0.0 +'''); + final InternalPigeonOptions options = InternalPigeonOptions.fromPigeonOptions( + PigeonOptions( + input: 'foo.dart', + dartOut: '${tempDir.path}/lib/messages.dart', + swiftOut: '${tempDir.path}/lib/messages.swift', + swiftOptions: const SwiftOptions(useFfi: true), + dartPackageName: 'my_package', + ), + ); + const adapter = FfigenConfigGeneratorAdapter(); + final List errors = adapter.validate( + options, + Root(apis: [], classes: [], enums: []), + ); + expect(errors, isNotEmpty); + expect(errors[0].message, contains('Missing required dependency "objective_c"')); + } finally { + tempDir.deleteSync(recursive: true); + } + }); + + test('JnigenConfigGeneratorAdapter validation passes if jni and jnigen exist', () async { + final Directory tempDir = Directory.systemTemp.createTempSync('pigeon_dependency_test_'); + try { + final pubspecFile = File('${tempDir.path}/pubspec.yaml'); + pubspecFile.writeAsStringSync(''' +name: my_package +dependencies: + jni: ^2.0.0 +dev_dependencies: + jnigen: ^20.0.0 +'''); + final InternalPigeonOptions options = InternalPigeonOptions.fromPigeonOptions( + PigeonOptions( + input: 'foo.dart', + dartOut: '${tempDir.path}/lib/messages.dart', + kotlinOut: '${tempDir.path}/lib/messages.kt', + kotlinOptions: const KotlinOptions(useJni: true), + dartPackageName: 'my_package', + ), + ); + const adapter = JnigenConfigGeneratorAdapter(); + final List errors = adapter.validate( + options, + Root(apis: [], classes: [], enums: []), + ); + expect(errors, isEmpty); + } finally { + tempDir.deleteSync(recursive: true); + } + }); + + test('JnigenConfigGeneratorAdapter validation fails if jni is missing', () async { + final Directory tempDir = Directory.systemTemp.createTempSync('pigeon_dependency_test_'); + try { + final pubspecFile = File('${tempDir.path}/pubspec.yaml'); + pubspecFile.writeAsStringSync(''' +name: my_package +dev_dependencies: + jnigen: ^20.0.0 +'''); + final InternalPigeonOptions options = InternalPigeonOptions.fromPigeonOptions( + PigeonOptions( + input: 'foo.dart', + dartOut: '${tempDir.path}/lib/messages.dart', + kotlinOut: '${tempDir.path}/lib/messages.kt', + kotlinOptions: const KotlinOptions(useJni: true), + dartPackageName: 'my_package', + ), + ); + const adapter = JnigenConfigGeneratorAdapter(); + final List errors = adapter.validate( + options, + Root(apis: [], classes: [], enums: []), + ); + expect(errors, isNotEmpty); + expect(errors[0].message, contains('Missing required dependency "jni"')); + } finally { + tempDir.deleteSync(recursive: true); + } + }); + + test('KotlinOptions serialization/deserialization with jniClassPaths', () { + const options = KotlinOptions(jniClassPaths: ['foo/bar', 'baz.jar']); + final Map map = options.toMap(); + expect(map['jniClassPaths'], equals(['foo/bar', 'baz.jar'])); + + final KotlinOptions roundTrip = KotlinOptions.fromMap(map); + expect(roundTrip.jniClassPaths, equals(['foo/bar', 'baz.jar'])); + }); + + test('JnigenConfigGenerator generates custom classPaths', () { + final root = Root(apis: [], classes: [], enums: []); + final sink = StringBuffer(); + final generator = JnigenConfigGenerator(); + final options = InternalJnigenConfigOptions( + const InternalDartOptions(dartOut: 'lib/messages.dart', ignoreLints: false), + const InternalKotlinOptions( + kotlinOut: 'android/Messages.kt', + jniClassPaths: ['foo/bar', 'baz.jar'], + ), + null, + null, + ); + generator.generate(options, root, sink, dartPackageName: 'foo_package'); + final output = sink.toString(); + expect(output, contains("classPath: [Uri.directory('foo/bar'), Uri.file('baz.jar')]")); + }); + }); + group('constants parsing', () { test('valid constants', () { const code = ''' @@ -1939,7 +2194,6 @@ const String myAdjacentString = 'hello ' 'world'; expect(myAdjacentString.type.baseName, 'String'); expect(myAdjacentString.value, 'hello world'); }); - test('missing type annotation error', () { const code = ''' const myConst = 42; diff --git a/packages/pigeon/test/swift_generator_test.dart b/packages/pigeon/test/swift_generator_test.dart index 31032779c9d6..07a1be2d9c11 100644 --- a/packages/pigeon/test/swift_generator_test.dart +++ b/packages/pigeon/test/swift_generator_test.dart @@ -1576,4 +1576,58 @@ void main() { expect(code, contains('let doubleConst: Double = 3.14')); expect(code, contains('let boolConst: Bool = true')); }); + + test('ffi codec initializes NSMutableArray and NSMutableDictionary with capacity', () { + final root = Root(apis: [], classes: [], enums: []); + final sink = StringBuffer(); + const swiftOptions = InternalSwiftOptions(swiftOut: '', useFfi: true); + const generator = SwiftGenerator(); + generator.generate(swiftOptions, root, sink, dartPackageName: DEFAULT_PACKAGE_NAME); + final code = sink.toString(); + expect(code, contains('let res: NSMutableArray = NSMutableArray(capacity: list.count)')); + expect( + code, + contains('let res: NSMutableDictionary = NSMutableDictionary(capacity: dict.count)'), + ); + }); + + test('swift generator handles HostApi and FlutterApi deregistration with nil', () { + final root = Root( + apis: [ + AstHostApi( + name: 'HostApi', + methods: [ + Method( + name: 'doSomething', + location: ApiLocation.host, + returnType: const TypeDeclaration.voidDeclaration(), + parameters: [], + ), + ], + ), + AstFlutterApi( + name: 'FlutterApi', + methods: [ + Method( + name: 'onEvent', + location: ApiLocation.flutter, + returnType: const TypeDeclaration.voidDeclaration(), + parameters: [], + ), + ], + ), + ], + classes: [], + enums: [], + ); + final sink = StringBuffer(); + const swiftOptions = InternalSwiftOptions(swiftOut: '', useFfi: true); + const generator = SwiftGenerator(); + generator.generate(swiftOptions, root, sink, dartPackageName: DEFAULT_PACKAGE_NAME); + final code = sink.toString(); + expect(code, contains('static func register(api: HostApi?, name: String = ')); + expect(code, contains('HostApiInstanceTracker.instancesOfHostApi.removeValue(forKey: name)')); + expect(code, contains('registerInstance(api: FlutterApiBridge?, name: String = ')); + expect(code, contains('FlutterApiRegistrar.registeredFlutterApi.removeValue(forKey: name)')); + }); } diff --git a/packages/pigeon/tool/shared/generation.dart b/packages/pigeon/tool/shared/generation.dart index 68930c0ef30d..3652dda84948 100644 --- a/packages/pigeon/tool/shared/generation.dart +++ b/packages/pigeon/tool/shared/generation.dart @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -import 'dart:io' show Platform; +import 'dart:io' show File, Platform, Process, ProcessResult; import 'package:path/path.dart' as p; import 'package:pigeon/pigeon.dart'; @@ -34,6 +34,12 @@ const Map> _unsupportedFiles = { + GeneratorLanguage.cpp, + GeneratorLanguage.gobject, + GeneratorLanguage.java, + GeneratorLanguage.objc, + }, }; String _snakeToPascalCase(String snake) { @@ -65,6 +71,19 @@ Future generateExamplePigeons() async { basePath: './example/app', suppressVersion: true, ); + success += await runPigeon( + input: './example/native_interop_app/pigeons/native_interop_example.dart', + appDirectory: './example/native_interop_app', + swiftAppDirectory: './example/native_interop_app', + basePath: './example/native_interop_app', + suppressVersion: true, + dartOut: 'lib/src/native_interop_example.g.dart', + kotlinOut: + 'android/app/src/main/kotlin/dev/flutter/pigeon_example_app/NativeInteropExample.g.kt', + kotlinPackage: 'dev.flutter.pigeon_example_app', + swiftOut: 'ios/Runner/NativeInteropExample.g.swift', + copyrightHeader: 'pigeons/copyright.txt', + ); return success; } @@ -84,6 +103,7 @@ Future generateTestPigeons({required String baseDir, bool includeOverflow = 'nullable_returns', 'primitive', 'proxy_api_tests', + 'native_interop_tests', }; const testPluginName = 'test_plugin'; @@ -111,6 +131,7 @@ Future generateTestPigeons({required String baseDir, bool includeOverflow = // 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' : null, dartPackageName: 'pigeon_integration_tests', @@ -121,6 +142,7 @@ Future generateTestPigeons({required String baseDir, bool includeOverflow = : '$outputBase/android/src/main/kotlin/com/example/test_plugin/$pascalCaseName.gen.kt', kotlinPackage: 'com.example.test_plugin', kotlinErrorClassName: kotlinErrorName, + kotlinUseJni: input == 'native_interop_tests', kotlinIncludeErrorClass: input != 'primitive', // iOS/macOS swiftOut: skipLanguages.contains(GeneratorLanguage.swift) @@ -128,6 +150,8 @@ Future generateTestPigeons({required String baseDir, bool includeOverflow = : '$outputBase/darwin/$testPluginName/Sources/$testPluginName/$pascalCaseName.gen.swift', swiftErrorClassName: swiftErrorClassName, swiftIncludeErrorClass: input != 'primitive', + swiftUseFfi: input == 'native_interop_tests', + swiftAppDirectory: '$outputBase/example', // Linux gobjectHeaderOut: skipLanguages.contains(GeneratorLanguage.gobject) ? null @@ -206,14 +230,19 @@ Future generateTestPigeons({required String baseDir, bool includeOverflow = 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, @@ -264,6 +293,7 @@ Future runPigeon({ final int result = await Pigeon.runWithOptions( PigeonOptions( input: input, + appDirectory: appDirectory, copyrightHeader: copyrightHeader, dartOut: dartOut, dartTestOut: dartTestOut, @@ -281,6 +311,7 @@ Future runPigeon({ package: kotlinPackage, errorClassName: kotlinErrorClassName, includeErrorClass: kotlinIncludeErrorClass, + useJni: kotlinUseJni, useGeneratedAnnotation: kotlinUseGeneratedAnnotation, ), objcHeaderOut: objcHeaderOut, @@ -290,6 +321,8 @@ Future runPigeon({ swiftOptions: SwiftOptions( errorClassName: swiftErrorClassName, includeErrorClass: swiftIncludeErrorClass, + useFfi: swiftUseFfi, + appDirectory: swiftAppDirectory, ), basePath: basePath, dartPackageName: dartPackageName, @@ -318,28 +351,66 @@ Future formatAllFiles({ GeneratorLanguage.objc, GeneratorLanguage.swift, }, -}) { +}) async { final dartCommand = Platform.isWindows ? 'dart.exe' : 'dart'; - return runProcess( + final String? xcodeClangFormat = await _findXcodeClangFormat(); + final useXcodeClangFormat = xcodeClangFormat != null; + final args = [ + 'run', + 'script/tool/bin/flutter_plugin_tools.dart', + 'format', + '--packages=pigeon', + if (languages.contains(GeneratorLanguage.cpp) || + languages.contains(GeneratorLanguage.gobject) || + languages.contains(GeneratorLanguage.objc)) ...[ + '--clang-format', + if (useXcodeClangFormat) '--clang-format-path=$xcodeClangFormat', + ] else + '--no-clang-format', + if (languages.contains(GeneratorLanguage.java)) '--java' else '--no-java', + if (languages.contains(GeneratorLanguage.dart)) '--dart' else '--no-dart', + if (languages.contains(GeneratorLanguage.kotlin)) '--kotlin' else '--no-kotlin', + if (languages.contains(GeneratorLanguage.swift)) '--swift' else '--no-swift', + ]; + + int exitCode = await runProcess( dartCommand, - [ - 'run', - 'script/tool/bin/flutter_plugin_tools.dart', - 'format', - '--packages=pigeon', - if (languages.contains(GeneratorLanguage.cpp) || - languages.contains(GeneratorLanguage.gobject) || - languages.contains(GeneratorLanguage.objc)) - '--clang-format' - else - '--no-clang-format', - if (languages.contains(GeneratorLanguage.java)) '--java' else '--no-java', - if (languages.contains(GeneratorLanguage.dart)) '--dart' else '--no-dart', - if (languages.contains(GeneratorLanguage.kotlin)) '--kotlin' else '--no-kotlin', - if (languages.contains(GeneratorLanguage.swift)) '--swift' else '--no-swift', - ], + args, workingDirectory: repositoryRoot, - streamOutput: false, logFailure: true, ); + if (exitCode != 0) { + return exitCode; + } + + // Run a second time if formatting Objective-C files, because clang-format + // requires two passes to reach a stable state for Swift-generated ObjC headers + // due to complex macro wrapping. + if (languages.contains(GeneratorLanguage.objc)) { + exitCode = await runProcess( + dartCommand, + args, + workingDirectory: repositoryRoot, + logFailure: true, + ); + } + return exitCode; +} + +Future _findXcodeClangFormat() async { + if (!Platform.isMacOS) { + return null; + } + try { + final ProcessResult result = await Process.run('xcrun', ['-f', 'clang-format']); + if (result.exitCode == 0) { + final String path = result.stdout.toString().trim(); + if (path.isNotEmpty && File(path).existsSync()) { + return path; + } + } + } catch (_) { + // Ignore errors and fall back. + } + return null; }