From 285f4f3aadb12aaed120dfeb6a2a1fe6c8889396 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Thu, 30 Mar 2023 15:20:33 -0700 Subject: [PATCH 1/6] [pigeon] Migrates off old BinaryMessenger API --- packages/pigeon/CHANGELOG.md | 4 ++++ packages/pigeon/lib/dart_generator.dart | 9 ++++---- packages/pigeon/lib/generator_tools.dart | 2 +- .../pigeon/mock_handler_tester/test/test.dart | 21 +++++++++++++------ .../test/null_safe_test.dart | 10 ++++----- packages/pigeon/pubspec.yaml | 2 +- 6 files changed, 31 insertions(+), 17 deletions(-) diff --git a/packages/pigeon/CHANGELOG.md b/packages/pigeon/CHANGELOG.md index bd70a39a79ab..f712ef854174 100644 --- a/packages/pigeon/CHANGELOG.md +++ b/packages/pigeon/CHANGELOG.md @@ -1,3 +1,7 @@ +## 9.1.4 + +* Migrates off deprecated `BinaryMessenger` API. + ## 9.1.3 * [cpp] Requires passing any non-nullable fields of generated data classes as diff --git a/packages/pigeon/lib/dart_generator.dart b/packages/pigeon/lib/dart_generator.dart index b3342452c0ff..8fbdfe8e942a 100644 --- a/packages/pigeon/lib/dart_generator.dart +++ b/packages/pigeon/lib/dart_generator.dart @@ -332,16 +332,17 @@ $resultAt != null 'binaryMessenger: binaryMessenger);', ); }); - final String messageHandlerSetter = - isMockHandler ? 'setMockMessageHandler' : 'setMessageHandler'; + final String messageHandlerSetter = isMockHandler + ? 'TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, ' + : 'channel.setMessageHandler('; indent.write('if (api == null) '); indent.addScoped('{', '}', () { - indent.writeln('channel.$messageHandlerSetter(null);'); + indent.writeln('${messageHandlerSetter}null);'); }, addTrailingNewline: false); indent.add(' else '); indent.addScoped('{', '}', () { indent.write( - 'channel.$messageHandlerSetter((Object? message) async ', + '$messageHandlerSetter(Object? message) async ', ); indent.addScoped('{', '});', () { final String returnType = diff --git a/packages/pigeon/lib/generator_tools.dart b/packages/pigeon/lib/generator_tools.dart index c7c25f53ebae..ee6de3c3efab 100644 --- a/packages/pigeon/lib/generator_tools.dart +++ b/packages/pigeon/lib/generator_tools.dart @@ -11,7 +11,7 @@ import 'ast.dart'; /// The current version of pigeon. /// /// This must match the version in pubspec.yaml. -const String pigeonVersion = '9.1.3'; +const String pigeonVersion = '9.1.4'; /// Read all the content from [stdin] to a String. String readStdin() { diff --git a/packages/pigeon/mock_handler_tester/test/test.dart b/packages/pigeon/mock_handler_tester/test/test.dart index 2b428e7f7217..45f2a4613d14 100644 --- a/packages/pigeon/mock_handler_tester/test/test.dart +++ b/packages/pigeon/mock_handler_tester/test/test.dart @@ -62,9 +62,12 @@ abstract class TestHostApi { 'dev.flutter.pigeon.MessageApi.initialize', codec, binaryMessenger: binaryMessenger); if (api == null) { - channel.setMockMessageHandler(null); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockDecodedMessageHandler(channel, null); } else { - channel.setMockMessageHandler((Object? message) async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockDecodedMessageHandler(channel, + (Object? message) async { // ignore message api.initialize(); return []; @@ -76,9 +79,12 @@ abstract class TestHostApi { 'dev.flutter.pigeon.MessageApi.search', codec, binaryMessenger: binaryMessenger); if (api == null) { - channel.setMockMessageHandler(null); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockDecodedMessageHandler(channel, null); } else { - channel.setMockMessageHandler((Object? message) async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockDecodedMessageHandler(channel, + (Object? message) async { assert(message != null, 'Argument for dev.flutter.pigeon.MessageApi.search was null.'); final List args = (message as List?)!; @@ -142,9 +148,12 @@ abstract class TestNestedApi { 'dev.flutter.pigeon.MessageNestedApi.search', codec, binaryMessenger: binaryMessenger); if (api == null) { - channel.setMockMessageHandler(null); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockDecodedMessageHandler(channel, null); } else { - channel.setMockMessageHandler((Object? message) async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockDecodedMessageHandler(channel, + (Object? message) async { assert(message != null, 'Argument for dev.flutter.pigeon.MessageNestedApi.search was null.'); final List args = (message as List?)!; diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/null_safe_test.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/null_safe_test.dart index 32fdb52895d4..a3094feb1c74 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/null_safe_test.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/null_safe_test.dart @@ -22,7 +22,7 @@ import 'test_util.dart'; NullableCollectionReturnFlutterApi, ]) void main() { - TestWidgetsFlutterBinding.ensureInitialized(); + final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized(); test('with values filled', () { final FlutterSearchReply reply = FlutterSearchReply() @@ -134,7 +134,7 @@ void main() { NullableArgFlutterApi.setup(mockFlutterApi); final Completer resultCompleter = Completer(); - ServicesBinding.instance.defaultBinaryMessenger.handlePlatformMessage( + binding.defaultBinaryMessenger.handlePlatformMessage( 'dev.flutter.pigeon.NullableArgFlutterApi.doit', NullableArgFlutterApi.codec.encodeMessage([null]), (ByteData? data) { @@ -158,7 +158,7 @@ void main() { NullableCollectionArgFlutterApi.setup(mockFlutterApi); final Completer> resultCompleter = Completer>(); - ServicesBinding.instance.defaultBinaryMessenger.handlePlatformMessage( + binding.defaultBinaryMessenger.handlePlatformMessage( 'dev.flutter.pigeon.NullableCollectionArgFlutterApi.doit', NullableCollectionArgFlutterApi.codec.encodeMessage([null]), (ByteData? data) { @@ -210,7 +210,7 @@ void main() { NullableReturnFlutterApi.setup(mockFlutterApi); final Completer resultCompleter = Completer(); - ServicesBinding.instance.defaultBinaryMessenger.handlePlatformMessage( + binding.defaultBinaryMessenger.handlePlatformMessage( 'dev.flutter.pigeon.NullableReturnFlutterApi.doit', NullableReturnFlutterApi.codec.encodeMessage([]), (ByteData? data) { @@ -233,7 +233,7 @@ void main() { final Completer?> resultCompleter = Completer?>(); - ServicesBinding.instance.defaultBinaryMessenger.handlePlatformMessage( + binding.defaultBinaryMessenger.handlePlatformMessage( 'dev.flutter.pigeon.NullableCollectionReturnFlutterApi.doit', NullableCollectionReturnFlutterApi.codec.encodeMessage([]), (ByteData? data) { diff --git a/packages/pigeon/pubspec.yaml b/packages/pigeon/pubspec.yaml index de7256a28de1..3269645d9e97 100644 --- a/packages/pigeon/pubspec.yaml +++ b/packages/pigeon/pubspec.yaml @@ -2,7 +2,7 @@ name: pigeon description: Code generator tool to make communication between Flutter and the host platform type-safe and easier. repository: https://github.com/flutter/packages/tree/main/packages/pigeon issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3Apigeon -version: 9.1.3 # This must match the version in lib/generator_tools.dart +version: 9.1.4 # This must match the version in lib/generator_tools.dart environment: sdk: ">=2.18.0 <4.0.0" From fa3460376ba089fb28912fd2da1958d91478753a Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Thu, 30 Mar 2023 16:20:21 -0700 Subject: [PATCH 2/6] regenerate --- .../mock_handler_tester/test/message.dart | 29 +- .../pigeon/mock_handler_tester/test/test.dart | 42 +- .../CoreTests.java | 607 +- .../example/android/build.gradle | 2 +- .../ios/Classes/CoreTests.gen.h | 372 +- .../ios/Classes/CoreTests.gen.m | 1629 +++--- .../lib/core_tests.gen.dart | 302 +- .../lib/flutter_unittests.gen.dart | 18 +- .../lib/multiple_arity.gen.dart | 9 +- .../lib/non_null_fields.gen.dart | 27 +- .../lib/null_fields.gen.dart | 23 +- .../lib/nullable_returns.gen.dart | 29 +- .../lib/primitive.gen.dart | 34 +- .../test/null_safe_test.dart | 3 +- .../lib/src/generated/core_tests.gen.dart | 302 +- .../com/example/test_plugin/CoreTests.gen.kt | 2 +- .../ios/Classes/CoreTests.gen.swift | 2 +- .../macos/Classes/CoreTests.gen.swift | 2 +- .../windows/pigeon/core_tests.gen.cpp | 4939 +++++++---------- .../windows/pigeon/core_tests.gen.h | 494 +- 20 files changed, 3545 insertions(+), 5322 deletions(-) diff --git a/packages/pigeon/mock_handler_tester/test/message.dart b/packages/pigeon/mock_handler_tester/test/message.dart index 2969c1ba1745..77f409337bb8 100644 --- a/packages/pigeon/mock_handler_tester/test/message.dart +++ b/packages/pigeon/mock_handler_tester/test/message.dart @@ -1,8 +1,8 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -144,9 +144,9 @@ class _MessageApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return MessageSearchReply.decode(readValue(buffer)!); - case 129: + case 129: return MessageSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -174,7 +174,8 @@ class MessageApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.MessageApi.initialize', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -241,11 +242,11 @@ class _MessageNestedApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return MessageNested.decode(readValue(buffer)!); - case 129: + case 129: return MessageSearchReply.decode(readValue(buffer)!); - case 130: + case 130: return MessageSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -313,9 +314,9 @@ class _MessageFlutterSearchApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return MessageSearchReply.decode(readValue(buffer)!); - case 129: + case 129: return MessageSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -330,8 +331,7 @@ abstract class MessageFlutterSearchApi { /// This comment is to test method documentation comments. MessageSearchReply search(MessageSearchRequest request); - static void setup(MessageFlutterSearchApi? api, - {BinaryMessenger? binaryMessenger}) { + static void setup(MessageFlutterSearchApi? api, {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.MessageFlutterSearchApi.search', codec, @@ -341,10 +341,9 @@ abstract class MessageFlutterSearchApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.MessageFlutterSearchApi.search was null.'); + 'Argument for dev.flutter.pigeon.MessageFlutterSearchApi.search was null.'); final List args = (message as List?)!; - final MessageSearchRequest? arg_request = - (args[0] as MessageSearchRequest?); + final MessageSearchRequest? arg_request = (args[0] as MessageSearchRequest?); assert(arg_request != null, 'Argument for dev.flutter.pigeon.MessageFlutterSearchApi.search was null, expected non-null MessageSearchRequest.'); final MessageSearchReply output = api.search(arg_request!); diff --git a/packages/pigeon/mock_handler_tester/test/test.dart b/packages/pigeon/mock_handler_tester/test/test.dart index 45f2a4613d14..00a6f1aa48db 100644 --- a/packages/pigeon/mock_handler_tester/test/test.dart +++ b/packages/pigeon/mock_handler_tester/test/test.dart @@ -1,8 +1,8 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, unnecessary_import // ignore_for_file: avoid_relative_lib_imports @@ -32,9 +32,9 @@ class _TestHostApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return MessageSearchReply.decode(readValue(buffer)!); - case 129: + case 129: return MessageSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -62,12 +62,9 @@ abstract class TestHostApi { 'dev.flutter.pigeon.MessageApi.initialize', codec, binaryMessenger: binaryMessenger); if (api == null) { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .setMockDecodedMessageHandler(channel, null); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, null); } else { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .setMockDecodedMessageHandler(channel, - (Object? message) async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, (Object? message) async { // ignore message api.initialize(); return []; @@ -79,17 +76,13 @@ abstract class TestHostApi { 'dev.flutter.pigeon.MessageApi.search', codec, binaryMessenger: binaryMessenger); if (api == null) { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .setMockDecodedMessageHandler(channel, null); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, null); } else { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .setMockDecodedMessageHandler(channel, - (Object? message) async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.MessageApi.search was null.'); + 'Argument for dev.flutter.pigeon.MessageApi.search was null.'); final List args = (message as List?)!; - final MessageSearchRequest? arg_request = - (args[0] as MessageSearchRequest?); + final MessageSearchRequest? arg_request = (args[0] as MessageSearchRequest?); assert(arg_request != null, 'Argument for dev.flutter.pigeon.MessageApi.search was null, expected non-null MessageSearchRequest.'); final MessageSearchReply output = api.search(arg_request!); @@ -121,11 +114,11 @@ class _TestNestedApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return MessageNested.decode(readValue(buffer)!); - case 129: + case 129: return MessageSearchReply.decode(readValue(buffer)!); - case 130: + case 130: return MessageSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -148,14 +141,11 @@ abstract class TestNestedApi { 'dev.flutter.pigeon.MessageNestedApi.search', codec, binaryMessenger: binaryMessenger); if (api == null) { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .setMockDecodedMessageHandler(channel, null); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, null); } else { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger - .setMockDecodedMessageHandler(channel, - (Object? message) async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.MessageNestedApi.search was null.'); + 'Argument for dev.flutter.pigeon.MessageNestedApi.search was null.'); final List args = (message as List?)!; final MessageNested? arg_nested = (args[0] as MessageNested?); assert(arg_nested != null, diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java b/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java index 112af0c0d182..9c1629fa5006 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java @@ -1,8 +1,8 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon package com.example.alternate_language_test_plugin; @@ -19,6 +19,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; +import java.util.HashMap; import java.util.List; import java.util.Map; @@ -35,7 +36,8 @@ public static class FlutterError extends RuntimeException { /** The error details. Must be a datatype supported by the api codec. */ public final Object details; - public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) { + public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) + { super(message); this.code = code; this.details = details; @@ -54,7 +56,7 @@ private static ArrayList wrapError(@NonNull Throwable exception) { errorList.add(exception.toString()); errorList.add(exception.getClass().getSimpleName()); errorList.add( - "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); + "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); } return errorList; } @@ -359,13 +361,9 @@ ArrayList toList() { Object aBool = list.get(0); pigeonResult.setABool((Boolean) aBool); Object anInt = list.get(1); - pigeonResult.setAnInt( - (anInt == null) ? null : ((anInt instanceof Integer) ? (Integer) anInt : (Long) anInt)); + pigeonResult.setAnInt((anInt == null) ? null : ((anInt instanceof Integer) ? (Integer) anInt : (Long) anInt)); Object anInt64 = list.get(2); - pigeonResult.setAnInt64( - (anInt64 == null) - ? null - : ((anInt64 instanceof Integer) ? (Integer) anInt64 : (Long) anInt64)); + pigeonResult.setAnInt64((anInt64 == null) ? null : ((anInt64 instanceof Integer) ? (Integer) anInt64 : (Long) anInt64)); Object aDouble = list.get(3); pigeonResult.setADouble((Double) aDouble); Object aByteArray = list.get(4); @@ -621,8 +619,7 @@ public static final class Builder { private @Nullable Map nullableMapWithAnnotations; - public @NonNull Builder setNullableMapWithAnnotations( - @Nullable Map setterArg) { + public @NonNull Builder setNullableMapWithAnnotations(@Nullable Map setterArg) { this.nullableMapWithAnnotations = setterArg; return this; } @@ -695,17 +692,9 @@ ArrayList toList() { Object aNullableBool = list.get(0); pigeonResult.setANullableBool((Boolean) aNullableBool); Object aNullableInt = list.get(1); - pigeonResult.setANullableInt( - (aNullableInt == null) - ? null - : ((aNullableInt instanceof Integer) ? (Integer) aNullableInt : (Long) aNullableInt)); + pigeonResult.setANullableInt((aNullableInt == null) ? null : ((aNullableInt instanceof Integer) ? (Integer) aNullableInt : (Long) aNullableInt)); Object aNullableInt64 = list.get(2); - pigeonResult.setANullableInt64( - (aNullableInt64 == null) - ? null - : ((aNullableInt64 instanceof Integer) - ? (Integer) aNullableInt64 - : (Long) aNullableInt64)); + pigeonResult.setANullableInt64((aNullableInt64 == null) ? null : ((aNullableInt64 instanceof Integer) ? (Integer) aNullableInt64 : (Long) aNullableInt64)); Object aNullableDouble = list.get(3); pigeonResult.setANullableDouble((Double) aNullableDouble); Object aNullableByteArray = list.get(4); @@ -727,8 +716,7 @@ ArrayList toList() { Object nullableMapWithObject = list.get(12); pigeonResult.setNullableMapWithObject((Map) nullableMapWithObject); Object aNullableEnum = list.get(13); - pigeonResult.setANullableEnum( - aNullableEnum == null ? null : AnEnum.values()[(int) aNullableEnum]); + pigeonResult.setANullableEnum(aNullableEnum == null ? null : AnEnum.values()[(int) aNullableEnum]); Object aNullableString = list.get(14); pigeonResult.setANullableString((String) aNullableString); return pigeonResult; @@ -779,8 +767,7 @@ ArrayList toList() { static @NonNull AllNullableTypesWrapper fromList(@NonNull ArrayList list) { AllNullableTypesWrapper pigeonResult = new AllNullableTypesWrapper(); Object values = list.get(0); - pigeonResult.setValues( - (values == null) ? null : AllNullableTypes.fromList((ArrayList) values)); + pigeonResult.setValues((values == null) ? null : AllNullableTypes.fromList((ArrayList) values)); return pigeonResult; } } @@ -788,7 +775,7 @@ ArrayList toList() { /** * A data class containing a List, used in unit tests. * - *

Generated class from Pigeon that represents data sent in messages. + * Generated class from Pigeon that represents data sent in messages. */ public static final class TestMessage { private @Nullable List testList; @@ -880,97 +867,97 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) { } /** - * The core interface that each host language plugin must implement in platform_test integration - * tests. + * The core interface that each host language plugin must implement in + * platform_test integration tests. * - *

Generated interface from Pigeon that represents a handler of messages from Flutter. + * Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface HostIntegrationCoreApi { /** - * A no-op function taking no arguments and returning no value, to sanity test basic calling. + * 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. */ - @NonNull + @NonNull AllTypes echoAllTypes(@NonNull AllTypes everything); /** Returns an error, to test error handling. */ - @Nullable + @Nullable Object throwError(); /** Returns an error from a void function, to test error handling. */ void throwErrorFromVoid(); /** Returns a Flutter error, to test error handling. */ - @Nullable + @Nullable Object throwFlutterError(); /** Returns passed in int. */ - @NonNull + @NonNull Long echoInt(@NonNull Long anInt); /** Returns passed in double. */ - @NonNull + @NonNull Double echoDouble(@NonNull Double aDouble); /** Returns the passed in boolean. */ - @NonNull + @NonNull Boolean echoBool(@NonNull Boolean aBool); /** Returns the passed in string. */ - @NonNull + @NonNull String echoString(@NonNull String aString); /** Returns the passed in Uint8List. */ - @NonNull + @NonNull byte[] echoUint8List(@NonNull byte[] aUint8List); /** Returns the passed in generic Object. */ - @NonNull + @NonNull Object echoObject(@NonNull Object anObject); /** Returns the passed list, to test serialization and deserialization. */ - @NonNull + @NonNull List echoList(@NonNull List aList); /** Returns the passed map, to test serialization and deserialization. */ - @NonNull + @NonNull Map echoMap(@NonNull Map aMap); /** Returns the passed object, to test serialization and deserialization. */ - @Nullable + @Nullable AllNullableTypes echoAllNullableTypes(@Nullable AllNullableTypes everything); /** - * Returns the inner `aString` value from the wrapped object, to test sending of nested objects. + * Returns the inner `aString` value from the wrapped object, to test + * sending of nested objects. */ - @Nullable + @Nullable String extractNestedNullableString(@NonNull AllNullableTypesWrapper wrapper); /** - * Returns the inner `aString` value from the wrapped object, to test sending of nested objects. + * Returns the inner `aString` value from the wrapped object, to test + * sending of nested objects. */ - @NonNull + @NonNull AllNullableTypesWrapper createNestedNullableString(@Nullable String nullableString); /** Returns passed in arguments of multiple types. */ - @NonNull - AllNullableTypes sendMultipleNullableTypes( - @Nullable Boolean aNullableBool, - @Nullable Long aNullableInt, - @Nullable String aNullableString); + @NonNull + AllNullableTypes sendMultipleNullableTypes(@Nullable Boolean aNullableBool, @Nullable Long aNullableInt, @Nullable String aNullableString); /** Returns passed in int. */ - @Nullable + @Nullable Long echoNullableInt(@Nullable Long aNullableInt); /** Returns passed in double. */ - @Nullable + @Nullable Double echoNullableDouble(@Nullable Double aNullableDouble); /** Returns the passed in boolean. */ - @Nullable + @Nullable Boolean echoNullableBool(@Nullable Boolean aNullableBool); /** Returns the passed in string. */ - @Nullable + @Nullable String echoNullableString(@Nullable String aNullableString); /** Returns the passed in Uint8List. */ - @Nullable + @Nullable byte[] echoNullableUint8List(@Nullable byte[] aNullableUint8List); /** Returns the passed in generic Object. */ - @Nullable + @Nullable Object echoNullableObject(@Nullable Object aNullableObject); /** Returns the passed list, to test serialization and deserialization. */ - @Nullable + @Nullable List echoNullableList(@Nullable List aNullableList); /** Returns the passed map, to test serialization and deserialization. */ - @Nullable + @Nullable Map echoNullableMap(@Nullable Map aNullableMap); /** - * A no-op function taking no arguments and returning no value, to sanity test basic - * asynchronous calling. + * A no-op function taking no arguments and returning no value, to sanity + * test basic asynchronous calling. */ void noopAsync(Result result); /** Returns passed in int asynchronously. */ @@ -998,8 +985,7 @@ AllNullableTypes sendMultipleNullableTypes( /** Returns the passed object, to test async serialization and deserialization. */ void echoAsyncAllTypes(@NonNull AllTypes everything, Result result); /** Returns the passed object, to test serialization and deserialization. */ - void echoAsyncNullableAllNullableTypes( - @Nullable AllNullableTypes everything, Result result); + void echoAsyncNullableAllNullableTypes(@Nullable AllNullableTypes everything, Result result); /** Returns passed in int asynchronously. */ void echoAsyncNullableInt(@Nullable Long anInt, Result result); /** Returns passed in double asynchronously. */ @@ -1015,8 +1001,7 @@ void echoAsyncNullableAllNullableTypes( /** Returns the passed list, to test serialization and deserialization asynchronously. */ void echoAsyncNullableList(@Nullable List aList, Result> result); /** Returns the passed map, to test serialization and deserialization asynchronously. */ - void echoAsyncNullableMap( - @Nullable Map aMap, Result> result); + void echoAsyncNullableMap(@Nullable Map aMap, Result> result); void callFlutterNoop(Result result); @@ -1026,11 +1011,7 @@ void echoAsyncNullableMap( void callFlutterEchoAllTypes(@NonNull AllTypes everything, Result result); - void callFlutterSendMultipleNullableTypes( - @Nullable Boolean aNullableBool, - @Nullable Long aNullableInt, - @Nullable String aNullableString, - Result result); + void callFlutterSendMultipleNullableTypes(@Nullable Boolean aNullableBool, @Nullable Long aNullableInt, @Nullable String aNullableString, Result result); void callFlutterEchoBool(@NonNull Boolean aBool, Result result); @@ -1058,17 +1039,13 @@ void callFlutterSendMultipleNullableTypes( void callFlutterEchoNullableList(@Nullable List aList, Result> result); - void callFlutterEchoNullableMap( - @Nullable Map aMap, Result> result); + void callFlutterEchoNullableMap(@Nullable Map aMap, Result> result); /** The codec used by HostIntegrationCoreApi. */ static MessageCodec getCodec() { return HostIntegrationCoreApiCodec.INSTANCE; } - /** - * Sets up an instance of `HostIntegrationCoreApi` to handle messages through the - * `binaryMessenger`. - */ + /**Sets up an instance of `HostIntegrationCoreApi` to handle messages through the `binaryMessenger`. */ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = @@ -1081,7 +1058,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { api.noop(); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1094,9 +1072,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAllTypes", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAllTypes", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1106,7 +1082,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { AllTypes output = api.echoAllTypes(everythingArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1119,9 +1096,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.throwError", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwError", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1129,7 +1104,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Object output = api.throwError(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1142,9 +1118,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.throwErrorFromVoid", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwErrorFromVoid", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1152,7 +1126,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { api.throwErrorFromVoid(); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1165,9 +1140,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.throwFlutterError", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwFlutterError", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1175,7 +1148,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Object output = api.throwFlutterError(); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1198,7 +1172,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Long output = api.echoInt((anIntArg == null) ? null : anIntArg.longValue()); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1211,9 +1186,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoDouble", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoDouble", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1223,7 +1196,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Double output = api.echoDouble(aDoubleArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1246,7 +1220,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Boolean output = api.echoBool(aBoolArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1259,9 +1234,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoString", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoString", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1271,7 +1244,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { String output = api.echoString(aStringArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1284,9 +1258,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoUint8List", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoUint8List", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1296,7 +1268,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { byte[] output = api.echoUint8List(aUint8ListArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1309,9 +1282,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoObject", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoObject", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1321,7 +1292,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Object output = api.echoObject(anObjectArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1344,7 +1316,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { List output = api.echoList(aListArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1367,7 +1340,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Map output = api.echoMap(aMapArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1380,9 +1354,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAllNullableTypes", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAllNullableTypes", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1392,7 +1364,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { AllNullableTypes output = api.echoAllNullableTypes(everythingArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1405,9 +1378,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1417,7 +1388,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { String output = api.extractNestedNullableString(wrapperArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1430,9 +1402,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1440,10 +1410,10 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { ArrayList args = (ArrayList) message; String nullableStringArg = (String) args.get(0); try { - AllNullableTypesWrapper output = - api.createNestedNullableString(nullableStringArg); + AllNullableTypesWrapper output = api.createNestedNullableString(nullableStringArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1456,9 +1426,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1468,13 +1436,10 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { Number aNullableIntArg = (Number) args.get(1); String aNullableStringArg = (String) args.get(2); try { - AllNullableTypes output = - api.sendMultipleNullableTypes( - aNullableBoolArg, - (aNullableIntArg == null) ? null : aNullableIntArg.longValue(), - aNullableStringArg); + AllNullableTypes output = api.sendMultipleNullableTypes(aNullableBoolArg, (aNullableIntArg == null) ? null : aNullableIntArg.longValue(), aNullableStringArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1487,9 +1452,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableInt", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableInt", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1497,11 +1460,10 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { ArrayList args = (ArrayList) message; Number aNullableIntArg = (Number) args.get(0); try { - Long output = - api.echoNullableInt( - (aNullableIntArg == null) ? null : aNullableIntArg.longValue()); + Long output = api.echoNullableInt((aNullableIntArg == null) ? null : aNullableIntArg.longValue()); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1514,9 +1476,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableDouble", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableDouble", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1526,7 +1486,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Double output = api.echoNullableDouble(aNullableDoubleArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1539,9 +1500,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableBool", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableBool", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1551,7 +1510,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Boolean output = api.echoNullableBool(aNullableBoolArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1564,9 +1524,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableString", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableString", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1576,7 +1534,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { String output = api.echoNullableString(aNullableStringArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1589,9 +1548,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1601,7 +1558,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { byte[] output = api.echoNullableUint8List(aNullableUint8ListArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1614,9 +1572,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableObject", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableObject", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1626,7 +1582,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Object output = api.echoNullableObject(aNullableObjectArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1639,9 +1596,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableList", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableList", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1651,7 +1606,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { List output = api.echoNullableList(aNullableListArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1664,9 +1620,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableMap", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableMap", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1676,7 +1630,8 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Map output = api.echoNullableMap(aNullableMapArg); wrapped.add(0, output); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1716,9 +1671,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncInt", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncInt", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1747,9 +1700,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncDouble", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncDouble", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1778,9 +1729,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncBool", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncBool", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1809,9 +1758,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncString", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncString", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1840,9 +1787,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncUint8List", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncUint8List", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1871,9 +1816,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncObject", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncObject", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1902,9 +1845,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncList", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncList", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1933,9 +1874,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncMap", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncMap", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1964,9 +1903,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncError", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncError", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1993,9 +1930,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2022,9 +1957,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2051,9 +1984,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncAllTypes", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncAllTypes", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2082,9 +2013,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2113,9 +2042,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableInt", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableInt", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2135,8 +2062,7 @@ public void error(Throwable error) { } }; - api.echoAsyncNullableInt( - (anIntArg == null) ? null : anIntArg.longValue(), resultCallback); + api.echoAsyncNullableInt((anIntArg == null) ? null : anIntArg.longValue(), resultCallback); }); } else { channel.setMessageHandler(null); @@ -2145,9 +2071,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2176,9 +2100,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2207,9 +2129,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2238,9 +2158,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2269,9 +2187,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2300,9 +2216,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2331,9 +2245,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableMap", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableMap", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2362,9 +2274,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterNoop", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterNoop", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2391,9 +2301,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2420,9 +2328,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2449,9 +2355,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2480,9 +2384,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2504,11 +2406,7 @@ public void error(Throwable error) { } }; - api.callFlutterSendMultipleNullableTypes( - aNullableBoolArg, - (aNullableIntArg == null) ? null : aNullableIntArg.longValue(), - aNullableStringArg, - resultCallback); + api.callFlutterSendMultipleNullableTypes(aNullableBoolArg, (aNullableIntArg == null) ? null : aNullableIntArg.longValue(), aNullableStringArg, resultCallback); }); } else { channel.setMessageHandler(null); @@ -2517,9 +2415,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoBool", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoBool", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2548,9 +2444,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoInt", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoInt", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2570,8 +2464,7 @@ public void error(Throwable error) { } }; - api.callFlutterEchoInt( - (anIntArg == null) ? null : anIntArg.longValue(), resultCallback); + api.callFlutterEchoInt((anIntArg == null) ? null : anIntArg.longValue(), resultCallback); }); } else { channel.setMessageHandler(null); @@ -2580,9 +2473,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2611,9 +2502,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2642,9 +2531,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2673,9 +2560,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoList", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoList", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2704,9 +2589,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoMap", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoMap", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2735,9 +2618,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2766,9 +2647,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2788,8 +2667,7 @@ public void error(Throwable error) { } }; - api.callFlutterEchoNullableInt( - (anIntArg == null) ? null : anIntArg.longValue(), resultCallback); + api.callFlutterEchoNullableInt((anIntArg == null) ? null : anIntArg.longValue(), resultCallback); }); } else { channel.setMessageHandler(null); @@ -2798,9 +2676,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2829,9 +2705,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2860,9 +2734,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2891,9 +2763,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2922,9 +2792,7 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap", getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2954,8 +2822,7 @@ public void error(Throwable error) { } private static class FlutterIntegrationCoreApiCodec extends StandardMessageCodec { - public static final FlutterIntegrationCoreApiCodec INSTANCE = - new FlutterIntegrationCoreApiCodec(); + public static final FlutterIntegrationCoreApiCodec INSTANCE = new FlutterIntegrationCoreApiCodec(); private FlutterIntegrationCoreApiCodec() {} @@ -2996,10 +2863,10 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) { } /** - * The core interface that the Dart platform_test code implements for host integration tests to - * call into. + * 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 Java. + * Generated class from Pigeon that represents Flutter messages that can be called from Java. */ public static class FlutterIntegrationCoreApi { private final BinaryMessenger binaryMessenger; @@ -3008,8 +2875,7 @@ public FlutterIntegrationCoreApi(BinaryMessenger argBinaryMessenger) { this.binaryMessenger = argBinaryMessenger; } - /** Public interface for sending reply. */ - public interface Reply { + /** Public interface for sending reply. */ public interface Reply { void reply(T reply); } /** The codec used by FlutterIntegrationCoreApi. */ @@ -3017,21 +2883,22 @@ static MessageCodec getCodec() { return FlutterIntegrationCoreApiCodec.INSTANCE; } /** - * A no-op function taking no arguments and returning no value, to sanity test basic calling. + * A no-op function taking no arguments and returning no value, to sanity + * test basic calling. */ public void noop(Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.noop", getCodec()); - channel.send(null, channelReply -> callback.reply(null)); + channel.send( + null, + channelReply -> callback.reply(null)); } /** Responds with an error from an async function returning a value. */ public void throwError(Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.throwError", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.throwError", getCodec()); channel.send( null, channelReply -> { @@ -3044,18 +2911,16 @@ public void throwError(Reply callback) { public void throwErrorFromVoid(Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid", - getCodec()); - channel.send(null, channelReply -> callback.reply(null)); + binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid", getCodec()); + channel.send( + null, + channelReply -> callback.reply(null)); } /** Returns the passed object, to test serialization and deserialization. */ public void echoAllTypes(@NonNull AllTypes everythingArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes", getCodec()); channel.send( new ArrayList(Collections.singletonList(everythingArg)), channelReply -> { @@ -3065,13 +2930,10 @@ public void echoAllTypes(@NonNull AllTypes everythingArg, Reply callba }); } /** Returns the passed object, to test serialization and deserialization. */ - public void echoAllNullableTypes( - @NonNull AllNullableTypes everythingArg, Reply callback) { + public void echoAllNullableTypes(@NonNull AllNullableTypes everythingArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes", getCodec()); channel.send( new ArrayList(Collections.singletonList(everythingArg)), channelReply -> { @@ -3083,21 +2945,14 @@ public void echoAllNullableTypes( /** * Returns passed in arguments of multiple types. * - *

Tests multiple-arity FlutterApi handling. + * Tests multiple-arity FlutterApi handling. */ - public void sendMultipleNullableTypes( - @Nullable Boolean aNullableBoolArg, - @Nullable Long aNullableIntArg, - @Nullable String aNullableStringArg, - Reply callback) { + public void sendMultipleNullableTypes(@Nullable Boolean aNullableBoolArg, @Nullable Long aNullableIntArg, @Nullable String aNullableStringArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes", getCodec()); channel.send( - new ArrayList( - Arrays.asList(aNullableBoolArg, aNullableIntArg, aNullableStringArg)), + new ArrayList(Arrays.asList(aNullableBoolArg, aNullableIntArg, aNullableStringArg)), channelReply -> { @SuppressWarnings("ConstantConditions") AllNullableTypes output = (AllNullableTypes) channelReply; @@ -3134,9 +2989,7 @@ public void echoInt(@NonNull Long anIntArg, Reply callback) { public void echoDouble(@NonNull Double aDoubleArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble", getCodec()); channel.send( new ArrayList(Collections.singletonList(aDoubleArg)), channelReply -> { @@ -3149,9 +3002,7 @@ public void echoDouble(@NonNull Double aDoubleArg, Reply callback) { public void echoString(@NonNull String aStringArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString", getCodec()); channel.send( new ArrayList(Collections.singletonList(aStringArg)), channelReply -> { @@ -3164,9 +3015,7 @@ public void echoString(@NonNull String aStringArg, Reply callback) { public void echoUint8List(@NonNull byte[] aListArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List", getCodec()); channel.send( new ArrayList(Collections.singletonList(aListArg)), channelReply -> { @@ -3205,9 +3054,7 @@ public void echoMap(@NonNull Map aMapArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool", getCodec()); channel.send( new ArrayList(Collections.singletonList(aBoolArg)), channelReply -> { @@ -3220,9 +3067,7 @@ public void echoNullableBool(@Nullable Boolean aBoolArg, Reply callback public void echoNullableInt(@Nullable Long anIntArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt", getCodec()); channel.send( new ArrayList(Collections.singletonList(anIntArg)), channelReply -> { @@ -3235,9 +3080,7 @@ public void echoNullableInt(@Nullable Long anIntArg, Reply callback) { public void echoNullableDouble(@Nullable Double aDoubleArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble", getCodec()); channel.send( new ArrayList(Collections.singletonList(aDoubleArg)), channelReply -> { @@ -3250,9 +3093,7 @@ public void echoNullableDouble(@Nullable Double aDoubleArg, Reply callba public void echoNullableString(@Nullable String aStringArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString", getCodec()); channel.send( new ArrayList(Collections.singletonList(aStringArg)), channelReply -> { @@ -3265,9 +3106,7 @@ public void echoNullableString(@Nullable String aStringArg, Reply callba public void echoNullableUint8List(@Nullable byte[] aListArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List", getCodec()); channel.send( new ArrayList(Collections.singletonList(aListArg)), channelReply -> { @@ -3280,9 +3119,7 @@ public void echoNullableUint8List(@Nullable byte[] aListArg, Reply callb public void echoNullableList(@Nullable List aListArg, Reply> callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList", getCodec()); channel.send( new ArrayList(Collections.singletonList(aListArg)), channelReply -> { @@ -3292,13 +3129,10 @@ public void echoNullableList(@Nullable List aListArg, Reply }); } /** Returns the passed map, to test serialization and deserialization. */ - public void echoNullableMap( - @Nullable Map aMapArg, Reply> callback) { + public void echoNullableMap(@Nullable Map aMapArg, Reply> callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap", getCodec()); channel.send( new ArrayList(Collections.singletonList(aMapArg)), channelReply -> { @@ -3308,24 +3142,22 @@ public void echoNullableMap( }); } /** - * A no-op function taking no arguments and returning no value, to sanity test basic - * asynchronous calling. + * A no-op function taking no arguments and returning no value, to sanity + * test basic asynchronous calling. */ public void noopAsync(Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.noopAsync", - getCodec()); - channel.send(null, channelReply -> callback.reply(null)); + binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.noopAsync", getCodec()); + channel.send( + null, + channelReply -> callback.reply(null)); } /** Returns the passed in generic Object asynchronously. */ public void echoAsyncString(@NonNull String aStringArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString", - getCodec()); + binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString", getCodec()); channel.send( new ArrayList(Collections.singletonList(aStringArg)), channelReply -> { @@ -3338,7 +3170,7 @@ public void echoAsyncString(@NonNull String aStringArg, Reply callback) /** * An API that can be implemented for minimal, compile-only tests. * - *

Generated interface from Pigeon that represents a handler of messages from Flutter. + * Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface HostTrivialApi { @@ -3348,7 +3180,7 @@ public interface HostTrivialApi { static MessageCodec getCodec() { return new StandardMessageCodec(); } - /** Sets up an instance of `HostTrivialApi` to handle messages through the `binaryMessenger`. */ + /**Sets up an instance of `HostTrivialApi` to handle messages through the `binaryMessenger`. */ static void setup(BinaryMessenger binaryMessenger, HostTrivialApi api) { { BasicMessageChannel channel = @@ -3361,7 +3193,8 @@ static void setup(BinaryMessenger binaryMessenger, HostTrivialApi api) { try { api.noop(); wrapped.add(0, null); - } catch (Throwable exception) { + } + catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -3376,7 +3209,7 @@ static void setup(BinaryMessenger binaryMessenger, HostTrivialApi api) { /** * A simple API implemented in some unit tests. * - *

Generated interface from Pigeon that represents a handler of messages from Flutter. + * Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface HostSmallApi { @@ -3388,7 +3221,7 @@ public interface HostSmallApi { static MessageCodec getCodec() { return new StandardMessageCodec(); } - /** Sets up an instance of `HostSmallApi` to handle messages through the `binaryMessenger`. */ + /**Sets up an instance of `HostSmallApi` to handle messages through the `binaryMessenger`. */ static void setup(BinaryMessenger binaryMessenger, HostSmallApi api) { { BasicMessageChannel channel = @@ -3478,7 +3311,7 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) { /** * A simple API called in some unit tests. * - *

Generated class from Pigeon that represents Flutter messages that can be called from Java. + * Generated class from Pigeon that represents Flutter messages that can be called from Java. */ public static class FlutterSmallApi { private final BinaryMessenger binaryMessenger; @@ -3487,15 +3320,13 @@ public FlutterSmallApi(BinaryMessenger argBinaryMessenger) { this.binaryMessenger = argBinaryMessenger; } - /** Public interface for sending reply. */ - public interface Reply { + /** Public interface for sending reply. */ public interface Reply { void reply(T reply); } /** The codec used by FlutterSmallApi. */ static MessageCodec getCodec() { return FlutterSmallApiCodec.INSTANCE; } - public void echoWrappedList(@NonNull TestMessage msgArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/build.gradle b/packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/build.gradle index b68b7af5f8ed..9ed60439e9b8 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/build.gradle +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/build.gradle @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h index 3459ab38360d..923196c5c3c3 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h @@ -1,8 +1,8 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon #import @@ -29,77 +29,75 @@ typedef NS_ENUM(NSUInteger, AnEnum) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithABool:(NSNumber *)aBool - anInt:(NSNumber *)anInt - anInt64:(NSNumber *)anInt64 - aDouble:(NSNumber *)aDouble - aByteArray:(FlutterStandardTypedData *)aByteArray - a4ByteArray:(FlutterStandardTypedData *)a4ByteArray - a8ByteArray:(FlutterStandardTypedData *)a8ByteArray - aFloatArray:(FlutterStandardTypedData *)aFloatArray - aList:(NSArray *)aList - aMap:(NSDictionary *)aMap - anEnum:(AnEnum)anEnum - aString:(NSString *)aString; -@property(nonatomic, strong) NSNumber *aBool; -@property(nonatomic, strong) NSNumber *anInt; -@property(nonatomic, strong) NSNumber *anInt64; -@property(nonatomic, strong) NSNumber *aDouble; -@property(nonatomic, strong) FlutterStandardTypedData *aByteArray; -@property(nonatomic, strong) FlutterStandardTypedData *a4ByteArray; -@property(nonatomic, strong) FlutterStandardTypedData *a8ByteArray; -@property(nonatomic, strong) FlutterStandardTypedData *aFloatArray; -@property(nonatomic, strong) NSArray *aList; -@property(nonatomic, strong) NSDictionary *aMap; + anInt:(NSNumber *)anInt + anInt64:(NSNumber *)anInt64 + aDouble:(NSNumber *)aDouble + aByteArray:(FlutterStandardTypedData *)aByteArray + a4ByteArray:(FlutterStandardTypedData *)a4ByteArray + a8ByteArray:(FlutterStandardTypedData *)a8ByteArray + aFloatArray:(FlutterStandardTypedData *)aFloatArray + aList:(NSArray *)aList + aMap:(NSDictionary *)aMap + anEnum:(AnEnum)anEnum + aString:(NSString *)aString; +@property(nonatomic, strong) NSNumber * aBool; +@property(nonatomic, strong) NSNumber * anInt; +@property(nonatomic, strong) NSNumber * anInt64; +@property(nonatomic, strong) NSNumber * aDouble; +@property(nonatomic, strong) FlutterStandardTypedData * aByteArray; +@property(nonatomic, strong) FlutterStandardTypedData * a4ByteArray; +@property(nonatomic, strong) FlutterStandardTypedData * a8ByteArray; +@property(nonatomic, strong) FlutterStandardTypedData * aFloatArray; +@property(nonatomic, strong) NSArray * aList; +@property(nonatomic, strong) NSDictionary * aMap; @property(nonatomic, assign) AnEnum anEnum; -@property(nonatomic, copy) NSString *aString; +@property(nonatomic, copy) NSString * aString; @end @interface AllNullableTypes : NSObject + (instancetype)makeWithANullableBool:(nullable NSNumber *)aNullableBool - aNullableInt:(nullable NSNumber *)aNullableInt - aNullableInt64:(nullable NSNumber *)aNullableInt64 - aNullableDouble:(nullable NSNumber *)aNullableDouble - aNullableByteArray:(nullable FlutterStandardTypedData *)aNullableByteArray - aNullable4ByteArray:(nullable FlutterStandardTypedData *)aNullable4ByteArray - aNullable8ByteArray:(nullable FlutterStandardTypedData *)aNullable8ByteArray - aNullableFloatArray:(nullable FlutterStandardTypedData *)aNullableFloatArray - aNullableList:(nullable NSArray *)aNullableList - aNullableMap:(nullable NSDictionary *)aNullableMap - nullableNestedList:(nullable NSArray *> *)nullableNestedList - nullableMapWithAnnotations: - (nullable NSDictionary *)nullableMapWithAnnotations - nullableMapWithObject:(nullable NSDictionary *)nullableMapWithObject - aNullableEnum:(AnEnum)aNullableEnum - aNullableString:(nullable NSString *)aNullableString; -@property(nonatomic, strong, nullable) NSNumber *aNullableBool; -@property(nonatomic, strong, nullable) NSNumber *aNullableInt; -@property(nonatomic, strong, nullable) NSNumber *aNullableInt64; -@property(nonatomic, strong, nullable) NSNumber *aNullableDouble; -@property(nonatomic, strong, nullable) FlutterStandardTypedData *aNullableByteArray; -@property(nonatomic, strong, nullable) FlutterStandardTypedData *aNullable4ByteArray; -@property(nonatomic, strong, nullable) FlutterStandardTypedData *aNullable8ByteArray; -@property(nonatomic, strong, nullable) FlutterStandardTypedData *aNullableFloatArray; -@property(nonatomic, strong, nullable) NSArray *aNullableList; -@property(nonatomic, strong, nullable) NSDictionary *aNullableMap; -@property(nonatomic, strong, nullable) NSArray *> *nullableNestedList; -@property(nonatomic, strong, nullable) - NSDictionary *nullableMapWithAnnotations; -@property(nonatomic, strong, nullable) NSDictionary *nullableMapWithObject; + aNullableInt:(nullable NSNumber *)aNullableInt + aNullableInt64:(nullable NSNumber *)aNullableInt64 + aNullableDouble:(nullable NSNumber *)aNullableDouble + aNullableByteArray:(nullable FlutterStandardTypedData *)aNullableByteArray + aNullable4ByteArray:(nullable FlutterStandardTypedData *)aNullable4ByteArray + aNullable8ByteArray:(nullable FlutterStandardTypedData *)aNullable8ByteArray + aNullableFloatArray:(nullable FlutterStandardTypedData *)aNullableFloatArray + aNullableList:(nullable NSArray *)aNullableList + aNullableMap:(nullable NSDictionary *)aNullableMap + nullableNestedList:(nullable NSArray *> *)nullableNestedList + nullableMapWithAnnotations:(nullable NSDictionary *)nullableMapWithAnnotations + nullableMapWithObject:(nullable NSDictionary *)nullableMapWithObject + aNullableEnum:(AnEnum)aNullableEnum + aNullableString:(nullable NSString *)aNullableString; +@property(nonatomic, strong, nullable) NSNumber * aNullableBool; +@property(nonatomic, strong, nullable) NSNumber * aNullableInt; +@property(nonatomic, strong, nullable) NSNumber * aNullableInt64; +@property(nonatomic, strong, nullable) NSNumber * aNullableDouble; +@property(nonatomic, strong, nullable) FlutterStandardTypedData * aNullableByteArray; +@property(nonatomic, strong, nullable) FlutterStandardTypedData * aNullable4ByteArray; +@property(nonatomic, strong, nullable) FlutterStandardTypedData * aNullable8ByteArray; +@property(nonatomic, strong, nullable) FlutterStandardTypedData * aNullableFloatArray; +@property(nonatomic, strong, nullable) NSArray * aNullableList; +@property(nonatomic, strong, nullable) NSDictionary * aNullableMap; +@property(nonatomic, strong, nullable) NSArray *> * nullableNestedList; +@property(nonatomic, strong, nullable) NSDictionary * nullableMapWithAnnotations; +@property(nonatomic, strong, nullable) NSDictionary * nullableMapWithObject; @property(nonatomic, assign) AnEnum aNullableEnum; -@property(nonatomic, copy, nullable) NSString *aNullableString; +@property(nonatomic, copy, nullable) NSString * aNullableString; @end @interface AllNullableTypesWrapper : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithValues:(AllNullableTypes *)values; -@property(nonatomic, strong) AllNullableTypes *values; +@property(nonatomic, strong) AllNullableTypes * values; @end /// A data class containing a List, used in unit tests. @interface TestMessage : NSObject + (instancetype)makeWithTestList:(nullable NSArray *)testList; -@property(nonatomic, strong, nullable) NSArray *testList; +@property(nonatomic, strong, nullable) NSArray * testList; @end /// The codec used by HostIntegrationCoreApi. @@ -114,8 +112,7 @@ NSObject *HostIntegrationCoreApiGetCodec(void); /// Returns the passed object, to test serialization and deserialization. /// /// @return `nil` only when `error != nil`. -- (nullable AllTypes *)echoAllTypes:(AllTypes *)everything - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable AllTypes *)echoAllTypes:(AllTypes *)everything error:(FlutterError *_Nullable *_Nonnull)error; /// Returns an error, to test error handling. - (nullable id)throwErrorWithError:(FlutterError *_Nullable *_Nonnull)error; /// Returns an error from a void function, to test error handling. @@ -129,8 +126,7 @@ NSObject *HostIntegrationCoreApiGetCodec(void); /// Returns passed in double. /// /// @return `nil` only when `error != nil`. -- (nullable NSNumber *)echoDouble:(NSNumber *)aDouble - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSNumber *)echoDouble:(NSNumber *)aDouble error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed in boolean. /// /// @return `nil` only when `error != nil`. @@ -138,13 +134,11 @@ NSObject *HostIntegrationCoreApiGetCodec(void); /// Returns the passed in string. /// /// @return `nil` only when `error != nil`. -- (nullable NSString *)echoString:(NSString *)aString - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSString *)echoString:(NSString *)aString error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed in Uint8List. /// /// @return `nil` only when `error != nil`. -- (nullable FlutterStandardTypedData *)echoUint8List:(FlutterStandardTypedData *)aUint8List - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FlutterStandardTypedData *)echoUint8List:(FlutterStandardTypedData *)aUint8List error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed in generic Object. /// /// @return `nil` only when `error != nil`. @@ -152,182 +146,108 @@ NSObject *HostIntegrationCoreApiGetCodec(void); /// Returns the passed list, to test serialization and deserialization. /// /// @return `nil` only when `error != nil`. -- (nullable NSArray *)echoList:(NSArray *)aList - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSArray *)echoList:(NSArray *)aList error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed map, to test serialization and deserialization. /// /// @return `nil` only when `error != nil`. -- (nullable NSDictionary *)echoMap:(NSDictionary *)aMap - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSDictionary *)echoMap:(NSDictionary *)aMap error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed object, to test serialization and deserialization. -- (nullable AllNullableTypes *)echoAllNullableTypes:(nullable AllNullableTypes *)everything - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable AllNullableTypes *)echoAllNullableTypes:(nullable AllNullableTypes *)everything error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the inner `aString` value from the wrapped object, to test /// sending of nested objects. -- (nullable NSString *)extractNestedNullableStringFrom:(AllNullableTypesWrapper *)wrapper - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSString *)extractNestedNullableStringFrom:(AllNullableTypesWrapper *)wrapper error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the inner `aString` value from the wrapped object, to test /// sending of nested objects. /// /// @return `nil` only when `error != nil`. -- (nullable AllNullableTypesWrapper *) - createNestedObjectWithNullableString:(nullable NSString *)nullableString - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable AllNullableTypesWrapper *)createNestedObjectWithNullableString:(nullable NSString *)nullableString error:(FlutterError *_Nullable *_Nonnull)error; /// Returns passed in arguments of multiple types. /// /// @return `nil` only when `error != nil`. -- (nullable AllNullableTypes *)sendMultipleNullableTypesABool:(nullable NSNumber *)aNullableBool - anInt:(nullable NSNumber *)aNullableInt - aString:(nullable NSString *)aNullableString - error:(FlutterError *_Nullable *_Nonnull) - error; +- (nullable AllNullableTypes *)sendMultipleNullableTypesABool:(nullable NSNumber *)aNullableBool anInt:(nullable NSNumber *)aNullableInt aString:(nullable NSString *)aNullableString error:(FlutterError *_Nullable *_Nonnull)error; /// Returns passed in int. -- (nullable NSNumber *)echoNullableInt:(nullable NSNumber *)aNullableInt - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSNumber *)echoNullableInt:(nullable NSNumber *)aNullableInt error:(FlutterError *_Nullable *_Nonnull)error; /// Returns passed in double. -- (nullable NSNumber *)echoNullableDouble:(nullable NSNumber *)aNullableDouble - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSNumber *)echoNullableDouble:(nullable NSNumber *)aNullableDouble error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed in boolean. -- (nullable NSNumber *)echoNullableBool:(nullable NSNumber *)aNullableBool - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSNumber *)echoNullableBool:(nullable NSNumber *)aNullableBool error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed in string. -- (nullable NSString *)echoNullableString:(nullable NSString *)aNullableString - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSString *)echoNullableString:(nullable NSString *)aNullableString error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed in Uint8List. -- (nullable FlutterStandardTypedData *) - echoNullableUint8List:(nullable FlutterStandardTypedData *)aNullableUint8List - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FlutterStandardTypedData *)echoNullableUint8List:(nullable FlutterStandardTypedData *)aNullableUint8List error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed in generic Object. -- (nullable id)echoNullableObject:(nullable id)aNullableObject - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable id)echoNullableObject:(nullable id)aNullableObject error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed list, to test serialization and deserialization. -- (nullable NSArray *)echoNullableList:(nullable NSArray *)aNullableList - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSArray *)echoNullableList:(nullable NSArray *)aNullableList error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed map, to test serialization and deserialization. -- (nullable NSDictionary *)echoNullableMap: - (nullable NSDictionary *)aNullableMap - error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSDictionary *)echoNullableMap:(nullable NSDictionary *)aNullableMap error:(FlutterError *_Nullable *_Nonnull)error; /// A no-op function taking no arguments and returning no value, to sanity /// test basic asynchronous calling. - (void)noopAsyncWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Returns passed in int asynchronously. -- (void)echoAsyncInt:(NSNumber *)anInt - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncInt:(NSNumber *)anInt completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns passed in double asynchronously. -- (void)echoAsyncDouble:(NSNumber *)aDouble - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncDouble:(NSNumber *)aDouble completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed in boolean asynchronously. -- (void)echoAsyncBool:(NSNumber *)aBool - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncBool:(NSNumber *)aBool completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed string asynchronously. -- (void)echoAsyncString:(NSString *)aString - completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncString:(NSString *)aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed in Uint8List asynchronously. -- (void)echoAsyncUint8List:(FlutterStandardTypedData *)aUint8List - completion:(void (^)(FlutterStandardTypedData *_Nullable, - FlutterError *_Nullable))completion; +- (void)echoAsyncUint8List:(FlutterStandardTypedData *)aUint8List completion:(void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed in generic Object asynchronously. -- (void)echoAsyncObject:(id)anObject - completion:(void (^)(id _Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncObject:(id)anObject completion:(void (^)(id _Nullable, FlutterError *_Nullable))completion; /// Returns the passed list, to test serialization and deserialization asynchronously. -- (void)echoAsyncList:(NSArray *)aList - completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncList:(NSArray *)aList completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed map, to test serialization and deserialization asynchronously. -- (void)echoAsyncMap:(NSDictionary *)aMap - completion:(void (^)(NSDictionary *_Nullable, - FlutterError *_Nullable))completion; +- (void)echoAsyncMap:(NSDictionary *)aMap completion:(void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion; /// Responds with an error from an async function returning a value. - (void)throwAsyncErrorWithCompletion:(void (^)(id _Nullable, FlutterError *_Nullable))completion; /// Responds with an error from an async void function. - (void)throwAsyncErrorFromVoidWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Responds with a Flutter error from an async function returning a value. -- (void)throwAsyncFlutterErrorWithCompletion:(void (^)(id _Nullable, - FlutterError *_Nullable))completion; +- (void)throwAsyncFlutterErrorWithCompletion:(void (^)(id _Nullable, FlutterError *_Nullable))completion; /// Returns the passed object, to test async serialization and deserialization. -- (void)echoAsyncAllTypes:(AllTypes *)everything - completion:(void (^)(AllTypes *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncAllTypes:(AllTypes *)everything completion:(void (^)(AllTypes *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed object, to test serialization and deserialization. -- (void)echoAsyncNullableAllNullableTypes:(nullable AllNullableTypes *)everything - completion:(void (^)(AllNullableTypes *_Nullable, - FlutterError *_Nullable))completion; +- (void)echoAsyncNullableAllNullableTypes:(nullable AllNullableTypes *)everything completion:(void (^)(AllNullableTypes *_Nullable, FlutterError *_Nullable))completion; /// Returns passed in int asynchronously. -- (void)echoAsyncNullableInt:(nullable NSNumber *)anInt - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncNullableInt:(nullable NSNumber *)anInt completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns passed in double asynchronously. -- (void)echoAsyncNullableDouble:(nullable NSNumber *)aDouble - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncNullableDouble:(nullable NSNumber *)aDouble completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed in boolean asynchronously. -- (void)echoAsyncNullableBool:(nullable NSNumber *)aBool - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncNullableBool:(nullable NSNumber *)aBool completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed string asynchronously. -- (void)echoAsyncNullableString:(nullable NSString *)aString - completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncNullableString:(nullable NSString *)aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed in Uint8List asynchronously. -- (void)echoAsyncNullableUint8List:(nullable FlutterStandardTypedData *)aUint8List - completion:(void (^)(FlutterStandardTypedData *_Nullable, - FlutterError *_Nullable))completion; +- (void)echoAsyncNullableUint8List:(nullable FlutterStandardTypedData *)aUint8List completion:(void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed in generic Object asynchronously. -- (void)echoAsyncNullableObject:(nullable id)anObject - completion:(void (^)(id _Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncNullableObject:(nullable id)anObject completion:(void (^)(id _Nullable, FlutterError *_Nullable))completion; /// Returns the passed list, to test serialization and deserialization asynchronously. -- (void)echoAsyncNullableList:(nullable NSArray *)aList - completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncNullableList:(nullable NSArray *)aList completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed map, to test serialization and deserialization asynchronously. -- (void)echoAsyncNullableMap:(nullable NSDictionary *)aMap - completion:(void (^)(NSDictionary *_Nullable, - FlutterError *_Nullable))completion; +- (void)echoAsyncNullableMap:(nullable NSDictionary *)aMap completion:(void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion; - (void)callFlutterNoopWithCompletion:(void (^)(FlutterError *_Nullable))completion; -- (void)callFlutterThrowErrorWithCompletion:(void (^)(id _Nullable, - FlutterError *_Nullable))completion; +- (void)callFlutterThrowErrorWithCompletion:(void (^)(id _Nullable, FlutterError *_Nullable))completion; - (void)callFlutterThrowErrorFromVoidWithCompletion:(void (^)(FlutterError *_Nullable))completion; -- (void)callFlutterEchoAllTypes:(AllTypes *)everything - completion:(void (^)(AllTypes *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterSendMultipleNullableTypesABool:(nullable NSNumber *)aNullableBool - anInt:(nullable NSNumber *)aNullableInt - aString:(nullable NSString *)aNullableString - completion:(void (^)(AllNullableTypes *_Nullable, - FlutterError *_Nullable))completion; -- (void)callFlutterEchoBool:(NSNumber *)aBool - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoInt:(NSNumber *)anInt - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoDouble:(NSNumber *)aDouble - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoString:(NSString *)aString - completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoUint8List:(FlutterStandardTypedData *)aList - completion:(void (^)(FlutterStandardTypedData *_Nullable, - FlutterError *_Nullable))completion; -- (void)callFlutterEchoList:(NSArray *)aList - completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoMap:(NSDictionary *)aMap - completion:(void (^)(NSDictionary *_Nullable, - FlutterError *_Nullable))completion; -- (void)callFlutterEchoNullableBool:(nullable NSNumber *)aBool - completion: - (void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoNullableInt:(nullable NSNumber *)anInt - completion: - (void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoNullableDouble:(nullable NSNumber *)aDouble - completion: - (void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoNullableString:(nullable NSString *)aString - completion: - (void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoNullableUint8List:(nullable FlutterStandardTypedData *)aList - completion:(void (^)(FlutterStandardTypedData *_Nullable, - FlutterError *_Nullable))completion; -- (void)callFlutterEchoNullableList:(nullable NSArray *)aList - completion: - (void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoNullableMap:(nullable NSDictionary *)aMap - completion:(void (^)(NSDictionary *_Nullable, - FlutterError *_Nullable))completion; +- (void)callFlutterEchoAllTypes:(AllTypes *)everything completion:(void (^)(AllTypes *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterSendMultipleNullableTypesABool:(nullable NSNumber *)aNullableBool anInt:(nullable NSNumber *)aNullableInt aString:(nullable NSString *)aNullableString completion:(void (^)(AllNullableTypes *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoBool:(NSNumber *)aBool completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoInt:(NSNumber *)anInt completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoDouble:(NSNumber *)aDouble completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoString:(NSString *)aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoUint8List:(FlutterStandardTypedData *)aList completion:(void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoList:(NSArray *)aList completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoMap:(NSDictionary *)aMap completion:(void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoNullableBool:(nullable NSNumber *)aBool completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoNullableInt:(nullable NSNumber *)anInt completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoNullableDouble:(nullable NSNumber *)aDouble completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoNullableString:(nullable NSString *)aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoNullableUint8List:(nullable FlutterStandardTypedData *)aList completion:(void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoNullableList:(nullable NSArray *)aList completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoNullableMap:(nullable NSDictionary *)aMap completion:(void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion; @end -extern void HostIntegrationCoreApiSetup(id binaryMessenger, - NSObject *_Nullable api); +extern void HostIntegrationCoreApiSetup(id binaryMessenger, NSObject *_Nullable api); /// The codec used by FlutterIntegrationCoreApi. NSObject *FlutterIntegrationCoreApiGetCodec(void); @@ -344,72 +264,46 @@ NSObject *FlutterIntegrationCoreApiGetCodec(void); /// Responds with an error from an async void function. - (void)throwErrorFromVoidWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Returns the passed object, to test serialization and deserialization. -- (void)echoAllTypes:(AllTypes *)everything - completion:(void (^)(AllTypes *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAllTypes:(AllTypes *)everything completion:(void (^)(AllTypes *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed object, to test serialization and deserialization. -- (void)echoAllNullableTypes:(AllNullableTypes *)everything - completion: - (void (^)(AllNullableTypes *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAllNullableTypes:(AllNullableTypes *)everything completion:(void (^)(AllNullableTypes *_Nullable, FlutterError *_Nullable))completion; /// Returns passed in arguments of multiple types. /// /// Tests multiple-arity FlutterApi handling. -- (void)sendMultipleNullableTypesABool:(nullable NSNumber *)aNullableBool - anInt:(nullable NSNumber *)aNullableInt - aString:(nullable NSString *)aNullableString - completion:(void (^)(AllNullableTypes *_Nullable, - FlutterError *_Nullable))completion; +- (void)sendMultipleNullableTypesABool:(nullable NSNumber *)aNullableBool anInt:(nullable NSNumber *)aNullableInt aString:(nullable NSString *)aNullableString completion:(void (^)(AllNullableTypes *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed boolean, to test serialization and deserialization. -- (void)echoBool:(NSNumber *)aBool - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoBool:(NSNumber *)aBool completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed int, to test serialization and deserialization. -- (void)echoInt:(NSNumber *)anInt - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoInt:(NSNumber *)anInt completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed double, to test serialization and deserialization. -- (void)echoDouble:(NSNumber *)aDouble - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoDouble:(NSNumber *)aDouble completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed string, to test serialization and deserialization. -- (void)echoString:(NSString *)aString - completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)echoString:(NSString *)aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed byte list, to test serialization and deserialization. -- (void)echoUint8List:(FlutterStandardTypedData *)aList - completion: - (void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion; +- (void)echoUint8List:(FlutterStandardTypedData *)aList completion:(void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed list, to test serialization and deserialization. -- (void)echoList:(NSArray *)aList - completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)echoList:(NSArray *)aList completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed map, to test serialization and deserialization. -- (void)echoMap:(NSDictionary *)aMap - completion: - (void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion; +- (void)echoMap:(NSDictionary *)aMap completion:(void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed boolean, to test serialization and deserialization. -- (void)echoNullableBool:(nullable NSNumber *)aBool - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoNullableBool:(nullable NSNumber *)aBool completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed int, to test serialization and deserialization. -- (void)echoNullableInt:(nullable NSNumber *)anInt - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoNullableInt:(nullable NSNumber *)anInt completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed double, to test serialization and deserialization. -- (void)echoNullableDouble:(nullable NSNumber *)aDouble - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoNullableDouble:(nullable NSNumber *)aDouble completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed string, to test serialization and deserialization. -- (void)echoNullableString:(nullable NSString *)aString - completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)echoNullableString:(nullable NSString *)aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed byte list, to test serialization and deserialization. -- (void)echoNullableUint8List:(nullable FlutterStandardTypedData *)aList - completion:(void (^)(FlutterStandardTypedData *_Nullable, - FlutterError *_Nullable))completion; +- (void)echoNullableUint8List:(nullable FlutterStandardTypedData *)aList completion:(void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed list, to test serialization and deserialization. -- (void)echoNullableList:(nullable NSArray *)aList - completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)echoNullableList:(nullable NSArray *)aList completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed map, to test serialization and deserialization. -- (void)echoNullableMap:(nullable NSDictionary *)aMap - completion:(void (^)(NSDictionary *_Nullable, - FlutterError *_Nullable))completion; +- (void)echoNullableMap:(nullable NSDictionary *)aMap completion:(void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion; /// A no-op function taking no arguments and returning no value, to sanity /// test basic asynchronous calling. - (void)noopAsyncWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Returns the passed in generic Object asynchronously. -- (void)echoAsyncString:(NSString *)aString - completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncString:(NSString *)aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; @end /// The codec used by HostTrivialApi. @@ -420,21 +314,18 @@ NSObject *HostTrivialApiGetCodec(void); - (void)noopWithError:(FlutterError *_Nullable *_Nonnull)error; @end -extern void HostTrivialApiSetup(id binaryMessenger, - NSObject *_Nullable api); +extern void HostTrivialApiSetup(id binaryMessenger, NSObject *_Nullable api); /// The codec used by HostSmallApi. NSObject *HostSmallApiGetCodec(void); /// A simple API implemented in some unit tests. @protocol HostSmallApi -- (void)echoString:(NSString *)aString - completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)echoString:(NSString *)aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; - (void)voidVoidWithCompletion:(void (^)(FlutterError *_Nullable))completion; @end -extern void HostSmallApiSetup(id binaryMessenger, - NSObject *_Nullable api); +extern void HostSmallApiSetup(id binaryMessenger, NSObject *_Nullable api); /// The codec used by FlutterSmallApi. NSObject *FlutterSmallApiGetCodec(void); @@ -442,8 +333,7 @@ NSObject *FlutterSmallApiGetCodec(void); /// A simple API called in some unit tests. @interface FlutterSmallApi : NSObject - (instancetype)initWithBinaryMessenger:(id)binaryMessenger; -- (void)echoWrappedList:(TestMessage *)msg - completion:(void (^)(TestMessage *_Nullable, FlutterError *_Nullable))completion; +- (void)echoWrappedList:(TestMessage *)msg completion:(void (^)(TestMessage *_Nullable, FlutterError *_Nullable))completion; @end NS_ASSUME_NONNULL_END diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m index 54570176322e..4e2a032ec0d7 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m @@ -1,8 +1,8 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon #import "CoreTests.gen.h" @@ -51,18 +51,18 @@ - (NSArray *)toList; @implementation AllTypes + (instancetype)makeWithABool:(NSNumber *)aBool - anInt:(NSNumber *)anInt - anInt64:(NSNumber *)anInt64 - aDouble:(NSNumber *)aDouble - aByteArray:(FlutterStandardTypedData *)aByteArray - a4ByteArray:(FlutterStandardTypedData *)a4ByteArray - a8ByteArray:(FlutterStandardTypedData *)a8ByteArray - aFloatArray:(FlutterStandardTypedData *)aFloatArray - aList:(NSArray *)aList - aMap:(NSDictionary *)aMap - anEnum:(AnEnum)anEnum - aString:(NSString *)aString { - AllTypes *pigeonResult = [[AllTypes alloc] init]; + anInt:(NSNumber *)anInt + anInt64:(NSNumber *)anInt64 + aDouble:(NSNumber *)aDouble + aByteArray:(FlutterStandardTypedData *)aByteArray + a4ByteArray:(FlutterStandardTypedData *)a4ByteArray + a8ByteArray:(FlutterStandardTypedData *)a8ByteArray + aFloatArray:(FlutterStandardTypedData *)aFloatArray + aList:(NSArray *)aList + aMap:(NSDictionary *)aMap + anEnum:(AnEnum)anEnum + aString:(NSString *)aString { + AllTypes* pigeonResult = [[AllTypes alloc] init]; pigeonResult.aBool = aBool; pigeonResult.anInt = anInt; pigeonResult.anInt64 = anInt64; @@ -127,22 +127,21 @@ - (NSArray *)toList { @implementation AllNullableTypes + (instancetype)makeWithANullableBool:(nullable NSNumber *)aNullableBool - aNullableInt:(nullable NSNumber *)aNullableInt - aNullableInt64:(nullable NSNumber *)aNullableInt64 - aNullableDouble:(nullable NSNumber *)aNullableDouble - aNullableByteArray:(nullable FlutterStandardTypedData *)aNullableByteArray - aNullable4ByteArray:(nullable FlutterStandardTypedData *)aNullable4ByteArray - aNullable8ByteArray:(nullable FlutterStandardTypedData *)aNullable8ByteArray - aNullableFloatArray:(nullable FlutterStandardTypedData *)aNullableFloatArray - aNullableList:(nullable NSArray *)aNullableList - aNullableMap:(nullable NSDictionary *)aNullableMap - nullableNestedList:(nullable NSArray *> *)nullableNestedList - nullableMapWithAnnotations: - (nullable NSDictionary *)nullableMapWithAnnotations - nullableMapWithObject:(nullable NSDictionary *)nullableMapWithObject - aNullableEnum:(AnEnum)aNullableEnum - aNullableString:(nullable NSString *)aNullableString { - AllNullableTypes *pigeonResult = [[AllNullableTypes alloc] init]; + aNullableInt:(nullable NSNumber *)aNullableInt + aNullableInt64:(nullable NSNumber *)aNullableInt64 + aNullableDouble:(nullable NSNumber *)aNullableDouble + aNullableByteArray:(nullable FlutterStandardTypedData *)aNullableByteArray + aNullable4ByteArray:(nullable FlutterStandardTypedData *)aNullable4ByteArray + aNullable8ByteArray:(nullable FlutterStandardTypedData *)aNullable8ByteArray + aNullableFloatArray:(nullable FlutterStandardTypedData *)aNullableFloatArray + aNullableList:(nullable NSArray *)aNullableList + aNullableMap:(nullable NSDictionary *)aNullableMap + nullableNestedList:(nullable NSArray *> *)nullableNestedList + nullableMapWithAnnotations:(nullable NSDictionary *)nullableMapWithAnnotations + nullableMapWithObject:(nullable NSDictionary *)nullableMapWithObject + aNullableEnum:(AnEnum)aNullableEnum + aNullableString:(nullable NSString *)aNullableString { + AllNullableTypes* pigeonResult = [[AllNullableTypes alloc] init]; pigeonResult.aNullableBool = aNullableBool; pigeonResult.aNullableInt = aNullableInt; pigeonResult.aNullableInt64 = aNullableInt64; @@ -205,7 +204,7 @@ - (NSArray *)toList { @implementation AllNullableTypesWrapper + (instancetype)makeWithValues:(AllNullableTypes *)values { - AllNullableTypesWrapper *pigeonResult = [[AllNullableTypesWrapper alloc] init]; + AllNullableTypesWrapper* pigeonResult = [[AllNullableTypesWrapper alloc] init]; pigeonResult.values = values; return pigeonResult; } @@ -227,7 +226,7 @@ - (NSArray *)toList { @implementation TestMessage + (instancetype)makeWithTestList:(nullable NSArray *)testList { - TestMessage *pigeonResult = [[TestMessage alloc] init]; + TestMessage* pigeonResult = [[TestMessage alloc] init]; pigeonResult.testList = testList; return pigeonResult; } @@ -251,13 +250,13 @@ @interface HostIntegrationCoreApiCodecReader : FlutterStandardReader @implementation HostIntegrationCoreApiCodecReader - (nullable id)readValueOfType:(UInt8)type { switch (type) { - case 128: + case 128: return [AllNullableTypes fromList:[self readValue]]; - case 129: + case 129: return [AllNullableTypesWrapper fromList:[self readValue]]; - case 130: + case 130: return [AllTypes fromList:[self readValue]]; - case 131: + case 131: return [TestMessage fromList:[self readValue]]; default: return [super readValueOfType:type]; @@ -302,26 +301,23 @@ - (FlutterStandardReader *)readerWithData:(NSData *)data { static FlutterStandardMessageCodec *sSharedObject = nil; static dispatch_once_t sPred = 0; dispatch_once(&sPred, ^{ - HostIntegrationCoreApiCodecReaderWriter *readerWriter = - [[HostIntegrationCoreApiCodecReaderWriter alloc] init]; + HostIntegrationCoreApiCodecReaderWriter *readerWriter = [[HostIntegrationCoreApiCodecReaderWriter alloc] init]; sSharedObject = [FlutterStandardMessageCodec codecWithReaderWriter:readerWriter]; }); return sSharedObject; } -void HostIntegrationCoreApiSetup(id binaryMessenger, - NSObject *api) { +void HostIntegrationCoreApiSetup(id binaryMessenger, NSObject *api) { /// A no-op function taking no arguments and returning no value, to sanity /// test basic calling. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.noop" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.noop" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(noopWithError:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(noopWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(noopWithError:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(noopWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; [api noopWithError:&error]; @@ -333,15 +329,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed object, to test serialization and deserialization. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAllTypes" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAllTypes" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(echoAllTypes:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAllTypes:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAllTypes:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAllTypes:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; AllTypes *arg_everything = GetNullableObjectAtIndex(args, 0); @@ -355,15 +349,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns an error, to test error handling. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwError" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwError" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(throwErrorWithError:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(throwErrorWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(throwErrorWithError:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(throwErrorWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; id output = [api throwErrorWithError:&error]; @@ -375,15 +367,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns an error from a void function, to test error handling. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwErrorFromVoid" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwErrorFromVoid" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(throwErrorFromVoidWithError:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(throwErrorFromVoidWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(throwErrorFromVoidWithError:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(throwErrorFromVoidWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; [api throwErrorFromVoidWithError:&error]; @@ -395,15 +385,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns a Flutter error, to test error handling. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwFlutterError" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwFlutterError" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(throwFlutterErrorWithError:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(throwFlutterErrorWithError:)", - api); + NSCAssert([api respondsToSelector:@selector(throwFlutterErrorWithError:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(throwFlutterErrorWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; id output = [api throwFlutterErrorWithError:&error]; @@ -415,14 +403,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns passed in int. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoInt" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoInt" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoInt:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoInt:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoInt:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoInt:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_anInt = GetNullableObjectAtIndex(args, 0); @@ -436,14 +423,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns passed in double. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoDouble" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoDouble" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoDouble:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoDouble:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoDouble:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoDouble:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aDouble = GetNullableObjectAtIndex(args, 0); @@ -457,14 +443,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed in boolean. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoBool" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoBool" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoBool:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoBool:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoBool:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoBool:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aBool = GetNullableObjectAtIndex(args, 0); @@ -478,14 +463,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed in string. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoString" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoString" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoString:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoString:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoString:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoString:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_aString = GetNullableObjectAtIndex(args, 0); @@ -499,15 +483,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed in Uint8List. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoUint8List" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoUint8List" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(echoUint8List:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoUint8List:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoUint8List:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoUint8List:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FlutterStandardTypedData *arg_aUint8List = GetNullableObjectAtIndex(args, 0); @@ -521,14 +503,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed in generic Object. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoObject" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoObject" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoObject:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoObject:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoObject:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoObject:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; id arg_anObject = GetNullableObjectAtIndex(args, 0); @@ -542,14 +523,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed list, to test serialization and deserialization. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoList" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoList" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoList:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoList:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoList:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoList:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_aList = GetNullableObjectAtIndex(args, 0); @@ -563,14 +543,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed map, to test serialization and deserialization. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoMap" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoMap" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoMap:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoMap:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoMap:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoMap:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSDictionary *arg_aMap = GetNullableObjectAtIndex(args, 0); @@ -584,15 +563,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed object, to test serialization and deserialization. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAllNullableTypes" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAllNullableTypes" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAllNullableTypes:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoAllNullableTypes:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAllNullableTypes:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAllNullableTypes:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; AllNullableTypes *arg_everything = GetNullableObjectAtIndex(args, 0); @@ -607,15 +584,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, /// Returns the inner `aString` value from the wrapped object, to test /// sending of nested objects. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(extractNestedNullableStringFrom:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(extractNestedNullableStringFrom:error:)", - api); + NSCAssert([api respondsToSelector:@selector(extractNestedNullableStringFrom:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(extractNestedNullableStringFrom:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; AllNullableTypesWrapper *arg_wrapper = GetNullableObjectAtIndex(args, 0); @@ -630,21 +605,18 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, /// Returns the inner `aString` value from the wrapped object, to test /// sending of nested objects. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(createNestedObjectWithNullableString:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(createNestedObjectWithNullableString:error:)", - api); + NSCAssert([api respondsToSelector:@selector(createNestedObjectWithNullableString:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(createNestedObjectWithNullableString:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_nullableString = GetNullableObjectAtIndex(args, 0); FlutterError *error; - AllNullableTypesWrapper *output = - [api createNestedObjectWithNullableString:arg_nullableString error:&error]; + AllNullableTypesWrapper *output = [api createNestedObjectWithNullableString:arg_nullableString error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -653,26 +625,20 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns passed in arguments of multiple types. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(sendMultipleNullableTypesABool: - anInt:aString:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(sendMultipleNullableTypesABool:anInt:aString:error:)", - api); + NSCAssert([api respondsToSelector:@selector(sendMultipleNullableTypesABool:anInt:aString:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(sendMultipleNullableTypesABool:anInt:aString:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aNullableBool = GetNullableObjectAtIndex(args, 0); NSNumber *arg_aNullableInt = GetNullableObjectAtIndex(args, 1); NSString *arg_aNullableString = GetNullableObjectAtIndex(args, 2); FlutterError *error; - AllNullableTypes *output = [api sendMultipleNullableTypesABool:arg_aNullableBool - anInt:arg_aNullableInt - aString:arg_aNullableString - error:&error]; + AllNullableTypes *output = [api sendMultipleNullableTypesABool:arg_aNullableBool anInt:arg_aNullableInt aString:arg_aNullableString error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -681,15 +647,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns passed in int. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableInt" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableInt" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(echoNullableInt:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableInt:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoNullableInt:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableInt:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aNullableInt = GetNullableObjectAtIndex(args, 0); @@ -703,15 +667,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns passed in double. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableDouble" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableDouble" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoNullableDouble:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoNullableDouble:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoNullableDouble:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableDouble:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aNullableDouble = GetNullableObjectAtIndex(args, 0); @@ -725,15 +687,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed in boolean. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableBool" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableBool" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(echoNullableBool:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableBool:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoNullableBool:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableBool:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aNullableBool = GetNullableObjectAtIndex(args, 0); @@ -747,15 +707,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed in string. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableString" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableString" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoNullableString:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoNullableString:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoNullableString:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableString:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_aNullableString = GetNullableObjectAtIndex(args, 0); @@ -769,21 +727,18 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed in Uint8List. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoNullableUint8List:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoNullableUint8List:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoNullableUint8List:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableUint8List:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FlutterStandardTypedData *arg_aNullableUint8List = GetNullableObjectAtIndex(args, 0); FlutterError *error; - FlutterStandardTypedData *output = [api echoNullableUint8List:arg_aNullableUint8List - error:&error]; + FlutterStandardTypedData *output = [api echoNullableUint8List:arg_aNullableUint8List error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -792,15 +747,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed in generic Object. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableObject" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableObject" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoNullableObject:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoNullableObject:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoNullableObject:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableObject:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; id arg_aNullableObject = GetNullableObjectAtIndex(args, 0); @@ -814,15 +767,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed list, to test serialization and deserialization. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableList" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableList" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(echoNullableList:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableList:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoNullableList:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableList:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_aNullableList = GetNullableObjectAtIndex(args, 0); @@ -836,15 +787,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed map, to test serialization and deserialization. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableMap" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableMap" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(echoNullableMap:error:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableMap:error:)", - api); + NSCAssert([api respondsToSelector:@selector(echoNullableMap:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableMap:error:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSDictionary *arg_aNullableMap = GetNullableObjectAtIndex(args, 0); @@ -859,15 +808,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, /// A no-op function taking no arguments and returning no value, to sanity /// test basic asynchronous calling. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.noopAsync" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.noopAsync" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(noopAsyncWithCompletion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(noopAsyncWithCompletion:)", - api); + NSCAssert([api respondsToSelector:@selector(noopAsyncWithCompletion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(noopAsyncWithCompletion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { [api noopAsyncWithCompletion:^(FlutterError *_Nullable error) { callback(wrapResult(nil, error)); @@ -879,22 +826,19 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns passed in int asynchronously. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncInt" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncInt" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(echoAsyncInt:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncInt:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncInt:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncInt:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_anInt = GetNullableObjectAtIndex(args, 0); - [api echoAsyncInt:arg_anInt - completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncInt:arg_anInt completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -902,22 +846,19 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns passed in double asynchronously. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncDouble" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncDouble" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncDouble:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoAsyncDouble:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncDouble:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncDouble:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aDouble = GetNullableObjectAtIndex(args, 0); - [api echoAsyncDouble:arg_aDouble - completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncDouble:arg_aDouble completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -925,22 +866,19 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed in boolean asynchronously. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncBool" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncBool" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncBool:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoAsyncBool:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncBool:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncBool:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aBool = GetNullableObjectAtIndex(args, 0); - [api echoAsyncBool:arg_aBool - completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncBool:arg_aBool completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -948,22 +886,19 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed string asynchronously. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncString" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncString" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncString:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoAsyncString:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncString:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncString:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_aString = GetNullableObjectAtIndex(args, 0); - [api echoAsyncString:arg_aString - completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncString:arg_aString completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -971,23 +906,19 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed in Uint8List asynchronously. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncUint8List" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncUint8List" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncUint8List:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoAsyncUint8List:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncUint8List:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncUint8List:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FlutterStandardTypedData *arg_aUint8List = GetNullableObjectAtIndex(args, 0); - [api echoAsyncUint8List:arg_aUint8List - completion:^(FlutterStandardTypedData *_Nullable output, - FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncUint8List:arg_aUint8List completion:^(FlutterStandardTypedData *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -995,22 +926,19 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed in generic Object asynchronously. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncObject" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncObject" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncObject:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoAsyncObject:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncObject:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncObject:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; id arg_anObject = GetNullableObjectAtIndex(args, 0); - [api echoAsyncObject:arg_anObject - completion:^(id _Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncObject:arg_anObject completion:^(id _Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1018,22 +946,19 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed list, to test serialization and deserialization asynchronously. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncList" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncList" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncList:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoAsyncList:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncList:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncList:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_aList = GetNullableObjectAtIndex(args, 0); - [api echoAsyncList:arg_aList - completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncList:arg_aList completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1041,23 +966,19 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed map, to test serialization and deserialization asynchronously. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncMap" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncMap" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert( - [api respondsToSelector:@selector(echoAsyncMap:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncMap:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncMap:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncMap:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSDictionary *arg_aMap = GetNullableObjectAtIndex(args, 0); - [api echoAsyncMap:arg_aMap - completion:^(NSDictionary *_Nullable output, - FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncMap:arg_aMap completion:^(NSDictionary *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1065,15 +986,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Responds with an error from an async function returning a value. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncError" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncError" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(throwAsyncErrorWithCompletion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(throwAsyncErrorWithCompletion:)", - api); + NSCAssert([api respondsToSelector:@selector(throwAsyncErrorWithCompletion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(throwAsyncErrorWithCompletion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { [api throwAsyncErrorWithCompletion:^(id _Nullable output, FlutterError *_Nullable error) { callback(wrapResult(output, error)); @@ -1085,15 +1004,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Responds with an error from an async void function. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(throwAsyncErrorFromVoidWithCompletion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(throwAsyncErrorFromVoidWithCompletion:)", - api); + NSCAssert([api respondsToSelector:@selector(throwAsyncErrorFromVoidWithCompletion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(throwAsyncErrorFromVoidWithCompletion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { [api throwAsyncErrorFromVoidWithCompletion:^(FlutterError *_Nullable error) { callback(wrapResult(nil, error)); @@ -1105,18 +1022,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Responds with a Flutter error from an async function returning a value. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(throwAsyncFlutterErrorWithCompletion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(throwAsyncFlutterErrorWithCompletion:)", - api); + NSCAssert([api respondsToSelector:@selector(throwAsyncFlutterErrorWithCompletion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(throwAsyncFlutterErrorWithCompletion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { - [api throwAsyncFlutterErrorWithCompletion:^(id _Nullable output, - FlutterError *_Nullable error) { + [api throwAsyncFlutterErrorWithCompletion:^(id _Nullable output, FlutterError *_Nullable error) { callback(wrapResult(output, error)); }]; }]; @@ -1126,22 +1040,19 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed object, to test async serialization and deserialization. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncAllTypes" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncAllTypes" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncAllTypes:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoAsyncAllTypes:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncAllTypes:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncAllTypes:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; AllTypes *arg_everything = GetNullableObjectAtIndex(args, 0); - [api echoAsyncAllTypes:arg_everything - completion:^(AllTypes *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncAllTypes:arg_everything completion:^(AllTypes *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1149,24 +1060,19 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed object, to test serialization and deserialization. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName: - @"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableAllNullableTypes:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoAsyncNullableAllNullableTypes:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableAllNullableTypes:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableAllNullableTypes:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; AllNullableTypes *arg_everything = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableAllNullableTypes:arg_everything - completion:^(AllNullableTypes *_Nullable output, - FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableAllNullableTypes:arg_everything completion:^(AllNullableTypes *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1174,22 +1080,19 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns passed in int asynchronously. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableInt" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableInt" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableInt:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoAsyncNullableInt:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableInt:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableInt:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_anInt = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableInt:arg_anInt - completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableInt:arg_anInt completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1197,22 +1100,19 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns passed in double asynchronously. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableDouble:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoAsyncNullableDouble:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableDouble:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableDouble:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aDouble = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableDouble:arg_aDouble - completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableDouble:arg_aDouble completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1220,22 +1120,19 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed in boolean asynchronously. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableBool:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoAsyncNullableBool:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableBool:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableBool:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aBool = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableBool:arg_aBool - completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableBool:arg_aBool completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1243,22 +1140,19 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed string asynchronously. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableString:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoAsyncNullableString:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableString:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableString:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_aString = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableString:arg_aString - completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableString:arg_aString completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1266,23 +1160,19 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed in Uint8List asynchronously. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableUint8List:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoAsyncNullableUint8List:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableUint8List:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableUint8List:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FlutterStandardTypedData *arg_aUint8List = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableUint8List:arg_aUint8List - completion:^(FlutterStandardTypedData *_Nullable output, - FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableUint8List:arg_aUint8List completion:^(FlutterStandardTypedData *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1290,22 +1180,19 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed in generic Object asynchronously. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableObject:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoAsyncNullableObject:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableObject:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableObject:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; id arg_anObject = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableObject:arg_anObject - completion:^(id _Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableObject:arg_anObject completion:^(id _Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1313,22 +1200,19 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed list, to test serialization and deserialization asynchronously. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableList:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoAsyncNullableList:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableList:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableList:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_aList = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableList:arg_aList - completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableList:arg_aList completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1336,38 +1220,32 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } /// Returns the passed map, to test serialization and deserialization asynchronously. { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableMap" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableMap" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableMap:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(echoAsyncNullableMap:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableMap:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableMap:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSDictionary *arg_aMap = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableMap:arg_aMap - completion:^(NSDictionary *_Nullable output, - FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableMap:arg_aMap completion:^(NSDictionary *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterNoop" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterNoop" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterNoopWithCompletion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterNoopWithCompletion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterNoopWithCompletion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterNoopWithCompletion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { [api callFlutterNoopWithCompletion:^(FlutterError *_Nullable error) { callback(wrapResult(nil, error)); @@ -1378,18 +1256,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterThrowErrorWithCompletion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterThrowErrorWithCompletion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterThrowErrorWithCompletion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterThrowErrorWithCompletion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { - [api callFlutterThrowErrorWithCompletion:^(id _Nullable output, - FlutterError *_Nullable error) { + [api callFlutterThrowErrorWithCompletion:^(id _Nullable output, FlutterError *_Nullable error) { callback(wrapResult(output, error)); }]; }]; @@ -1398,15 +1273,13 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterThrowErrorFromVoidWithCompletion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterThrowErrorFromVoidWithCompletion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterThrowErrorFromVoidWithCompletion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterThrowErrorFromVoidWithCompletion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { [api callFlutterThrowErrorFromVoidWithCompletion:^(FlutterError *_Nullable error) { callback(wrapResult(nil, error)); @@ -1417,369 +1290,306 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoAllTypes:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterEchoAllTypes:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoAllTypes:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoAllTypes:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; AllTypes *arg_everything = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoAllTypes:arg_everything - completion:^(AllTypes *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoAllTypes:arg_everything completion:^(AllTypes *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName: - @"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector - (callFlutterSendMultipleNullableTypesABool:anInt:aString:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterSendMultipleNullableTypesABool:anInt:aString:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterSendMultipleNullableTypesABool:anInt:aString:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterSendMultipleNullableTypesABool:anInt:aString:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aNullableBool = GetNullableObjectAtIndex(args, 0); NSNumber *arg_aNullableInt = GetNullableObjectAtIndex(args, 1); NSString *arg_aNullableString = GetNullableObjectAtIndex(args, 2); - [api callFlutterSendMultipleNullableTypesABool:arg_aNullableBool - anInt:arg_aNullableInt - aString:arg_aNullableString - completion:^(AllNullableTypes *_Nullable output, - FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterSendMultipleNullableTypesABool:arg_aNullableBool anInt:arg_aNullableInt aString:arg_aNullableString completion:^(AllNullableTypes *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoBool" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoBool" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoBool:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterEchoBool:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoBool:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoBool:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aBool = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoBool:arg_aBool - completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoBool:arg_aBool completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoInt" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoInt" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoInt:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterEchoInt:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoInt:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoInt:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_anInt = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoInt:arg_anInt - completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoInt:arg_anInt completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoDouble:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterEchoDouble:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoDouble:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoDouble:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aDouble = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoDouble:arg_aDouble - completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoDouble:arg_aDouble completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoString:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterEchoString:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoString:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoString:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_aString = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoString:arg_aString - completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoString:arg_aString completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoUint8List:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterEchoUint8List:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoUint8List:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoUint8List:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FlutterStandardTypedData *arg_aList = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoUint8List:arg_aList - completion:^(FlutterStandardTypedData *_Nullable output, - FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoUint8List:arg_aList completion:^(FlutterStandardTypedData *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoList" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoList" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoList:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterEchoList:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoList:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoList:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_aList = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoList:arg_aList - completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoList:arg_aList completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoMap" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoMap" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoMap:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterEchoMap:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoMap:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoMap:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSDictionary *arg_aMap = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoMap:arg_aMap - completion:^(NSDictionary *_Nullable output, - FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoMap:arg_aMap completion:^(NSDictionary *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableBool:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterEchoNullableBool:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableBool:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoNullableBool:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aBool = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoNullableBool:arg_aBool - completion:^(NSNumber *_Nullable output, - FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoNullableBool:arg_aBool completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableInt:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterEchoNullableInt:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableInt:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoNullableInt:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_anInt = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoNullableInt:arg_anInt - completion:^(NSNumber *_Nullable output, - FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoNullableInt:arg_anInt completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableDouble:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterEchoNullableDouble:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableDouble:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoNullableDouble:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aDouble = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoNullableDouble:arg_aDouble - completion:^(NSNumber *_Nullable output, - FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoNullableDouble:arg_aDouble completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableString:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterEchoNullableString:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableString:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoNullableString:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_aString = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoNullableString:arg_aString - completion:^(NSString *_Nullable output, - FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoNullableString:arg_aString completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName: - @"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableUint8List:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterEchoNullableUint8List:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableUint8List:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoNullableUint8List:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FlutterStandardTypedData *arg_aList = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoNullableUint8List:arg_aList - completion:^(FlutterStandardTypedData *_Nullable output, - FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoNullableUint8List:arg_aList completion:^(FlutterStandardTypedData *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableList:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterEchoNullableList:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableList:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoNullableList:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_aList = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoNullableList:arg_aList - completion:^(NSArray *_Nullable output, - FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoNullableList:arg_aList completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap" + FlutterBasicMessageChannel *channel = + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableMap:completion:)], - @"HostIntegrationCoreApi api (%@) doesn't respond to " - @"@selector(callFlutterEchoNullableMap:completion:)", - api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableMap:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoNullableMap:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSDictionary *arg_aMap = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoNullableMap:arg_aMap - completion:^(NSDictionary *_Nullable output, - FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoNullableMap:arg_aMap completion:^(NSDictionary *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1791,13 +1601,13 @@ @interface FlutterIntegrationCoreApiCodecReader : FlutterStandardReader @implementation FlutterIntegrationCoreApiCodecReader - (nullable id)readValueOfType:(UInt8)type { switch (type) { - case 128: + case 128: return [AllNullableTypes fromList:[self readValue]]; - case 129: + case 129: return [AllNullableTypesWrapper fromList:[self readValue]]; - case 130: + case 130: return [AllTypes fromList:[self readValue]]; - case 131: + case 131: return [TestMessage fromList:[self readValue]]; default: return [super readValueOfType:type]; @@ -1842,8 +1652,7 @@ - (FlutterStandardReader *)readerWithData:(NSData *)data { static FlutterStandardMessageCodec *sSharedObject = nil; static dispatch_once_t sPred = 0; dispatch_once(&sPred, ^{ - FlutterIntegrationCoreApiCodecReaderWriter *readerWriter = - [[FlutterIntegrationCoreApiCodecReaderWriter alloc] init]; + FlutterIntegrationCoreApiCodecReaderWriter *readerWriter = [[FlutterIntegrationCoreApiCodecReaderWriter alloc] init]; sSharedObject = [FlutterStandardMessageCodec codecWithReaderWriter:readerWriter]; }); return sSharedObject; @@ -1863,273 +1672,243 @@ - (instancetype)initWithBinaryMessenger:(NSObject *)bina return self; } - (void)noopWithCompletion:(void (^)(FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.noop" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:nil - reply:^(id reply) { - completion(nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:nil reply:^(id reply) { + completion(nil); + }]; } - (void)throwErrorWithCompletion:(void (^)(id _Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.throwError" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:nil - reply:^(id reply) { - id output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:nil reply:^(id reply) { + id output = reply; + completion(output, nil); + }]; } - (void)throwErrorFromVoidWithCompletion:(void (^)(FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:nil - reply:^(id reply) { - completion(nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:nil reply:^(id reply) { + completion(nil); + }]; } -- (void)echoAllTypes:(AllTypes *)arg_everything - completion:(void (^)(AllTypes *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoAllTypes:(AllTypes *)arg_everything completion:(void (^)(AllTypes *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ arg_everything ?: [NSNull null] ] - reply:^(id reply) { - AllTypes *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_everything ?: [NSNull null]] reply:^(id reply) { + AllTypes *output = reply; + completion(output, nil); + }]; } -- (void)echoAllNullableTypes:(AllNullableTypes *)arg_everything - completion: - (void (^)(AllNullableTypes *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoAllNullableTypes:(AllNullableTypes *)arg_everything completion:(void (^)(AllNullableTypes *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ arg_everything ?: [NSNull null] ] - reply:^(id reply) { - AllNullableTypes *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_everything ?: [NSNull null]] reply:^(id reply) { + AllNullableTypes *output = reply; + completion(output, nil); + }]; } -- (void)sendMultipleNullableTypesABool:(nullable NSNumber *)arg_aNullableBool - anInt:(nullable NSNumber *)arg_aNullableInt - aString:(nullable NSString *)arg_aNullableString - completion:(void (^)(AllNullableTypes *_Nullable, - FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel - messageChannelWithName: - @"dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ - arg_aNullableBool ?: [NSNull null], arg_aNullableInt ?: [NSNull null], - arg_aNullableString ?: [NSNull null] - ] - reply:^(id reply) { - AllNullableTypes *output = reply; - completion(output, nil); - }]; +- (void)sendMultipleNullableTypesABool:(nullable NSNumber *)arg_aNullableBool anInt:(nullable NSNumber *)arg_aNullableInt aString:(nullable NSString *)arg_aNullableString completion:(void (^)(AllNullableTypes *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel + messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes" + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_aNullableBool ?: [NSNull null], arg_aNullableInt ?: [NSNull null], arg_aNullableString ?: [NSNull null]] reply:^(id reply) { + AllNullableTypes *output = reply; + completion(output, nil); + }]; } -- (void)echoBool:(NSNumber *)arg_aBool - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoBool:(NSNumber *)arg_aBool completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoBool" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ arg_aBool ?: [NSNull null] ] - reply:^(id reply) { - NSNumber *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_aBool ?: [NSNull null]] reply:^(id reply) { + NSNumber *output = reply; + completion(output, nil); + }]; } -- (void)echoInt:(NSNumber *)arg_anInt - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoInt:(NSNumber *)arg_anInt completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoInt" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ arg_anInt ?: [NSNull null] ] - reply:^(id reply) { - NSNumber *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_anInt ?: [NSNull null]] reply:^(id reply) { + NSNumber *output = reply; + completion(output, nil); + }]; } -- (void)echoDouble:(NSNumber *)arg_aDouble - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoDouble:(NSNumber *)arg_aDouble completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ arg_aDouble ?: [NSNull null] ] - reply:^(id reply) { - NSNumber *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_aDouble ?: [NSNull null]] reply:^(id reply) { + NSNumber *output = reply; + completion(output, nil); + }]; } -- (void)echoString:(NSString *)arg_aString - completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoString:(NSString *)arg_aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ arg_aString ?: [NSNull null] ] - reply:^(id reply) { - NSString *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_aString ?: [NSNull null]] reply:^(id reply) { + NSString *output = reply; + completion(output, nil); + }]; } -- (void)echoUint8List:(FlutterStandardTypedData *)arg_aList - completion: - (void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoUint8List:(FlutterStandardTypedData *)arg_aList completion:(void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ arg_aList ?: [NSNull null] ] - reply:^(id reply) { - FlutterStandardTypedData *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_aList ?: [NSNull null]] reply:^(id reply) { + FlutterStandardTypedData *output = reply; + completion(output, nil); + }]; } -- (void)echoList:(NSArray *)arg_aList - completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoList:(NSArray *)arg_aList completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ arg_aList ?: [NSNull null] ] - reply:^(id reply) { - NSArray *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_aList ?: [NSNull null]] reply:^(id reply) { + NSArray *output = reply; + completion(output, nil); + }]; } -- (void)echoMap:(NSDictionary *)arg_aMap - completion: - (void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoMap:(NSDictionary *)arg_aMap completion:(void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ arg_aMap ?: [NSNull null] ] - reply:^(id reply) { - NSDictionary *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_aMap ?: [NSNull null]] reply:^(id reply) { + NSDictionary *output = reply; + completion(output, nil); + }]; } -- (void)echoNullableBool:(nullable NSNumber *)arg_aBool - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoNullableBool:(nullable NSNumber *)arg_aBool completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ arg_aBool ?: [NSNull null] ] - reply:^(id reply) { - NSNumber *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_aBool ?: [NSNull null]] reply:^(id reply) { + NSNumber *output = reply; + completion(output, nil); + }]; } -- (void)echoNullableInt:(nullable NSNumber *)arg_anInt - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoNullableInt:(nullable NSNumber *)arg_anInt completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ arg_anInt ?: [NSNull null] ] - reply:^(id reply) { - NSNumber *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_anInt ?: [NSNull null]] reply:^(id reply) { + NSNumber *output = reply; + completion(output, nil); + }]; } -- (void)echoNullableDouble:(nullable NSNumber *)arg_aDouble - completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoNullableDouble:(nullable NSNumber *)arg_aDouble completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ arg_aDouble ?: [NSNull null] ] - reply:^(id reply) { - NSNumber *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_aDouble ?: [NSNull null]] reply:^(id reply) { + NSNumber *output = reply; + completion(output, nil); + }]; } -- (void)echoNullableString:(nullable NSString *)arg_aString - completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoNullableString:(nullable NSString *)arg_aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ arg_aString ?: [NSNull null] ] - reply:^(id reply) { - NSString *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_aString ?: [NSNull null]] reply:^(id reply) { + NSString *output = reply; + completion(output, nil); + }]; } -- (void)echoNullableUint8List:(nullable FlutterStandardTypedData *)arg_aList - completion:(void (^)(FlutterStandardTypedData *_Nullable, - FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoNullableUint8List:(nullable FlutterStandardTypedData *)arg_aList completion:(void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ arg_aList ?: [NSNull null] ] - reply:^(id reply) { - FlutterStandardTypedData *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_aList ?: [NSNull null]] reply:^(id reply) { + FlutterStandardTypedData *output = reply; + completion(output, nil); + }]; } -- (void)echoNullableList:(nullable NSArray *)arg_aList - completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoNullableList:(nullable NSArray *)arg_aList completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ arg_aList ?: [NSNull null] ] - reply:^(id reply) { - NSArray *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_aList ?: [NSNull null]] reply:^(id reply) { + NSArray *output = reply; + completion(output, nil); + }]; } -- (void)echoNullableMap:(nullable NSDictionary *)arg_aMap - completion:(void (^)(NSDictionary *_Nullable, - FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoNullableMap:(nullable NSDictionary *)arg_aMap completion:(void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ arg_aMap ?: [NSNull null] ] - reply:^(id reply) { - NSDictionary *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_aMap ?: [NSNull null]] reply:^(id reply) { + NSDictionary *output = reply; + completion(output, nil); + }]; } - (void)noopAsyncWithCompletion:(void (^)(FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.noopAsync" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:nil - reply:^(id reply) { - completion(nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:nil reply:^(id reply) { + completion(nil); + }]; } -- (void)echoAsyncString:(NSString *)arg_aString - completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoAsyncString:(NSString *)arg_aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[ arg_aString ?: [NSNull null] ] - reply:^(id reply) { - NSString *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[arg_aString ?: [NSNull null]] reply:^(id reply) { + NSString *output = reply; + completion(output, nil); + }]; } @end @@ -2139,16 +1918,15 @@ - (void)echoAsyncString:(NSString *)arg_aString return sSharedObject; } -void HostTrivialApiSetup(id binaryMessenger, - NSObject *api) { +void HostTrivialApiSetup(id binaryMessenger, NSObject *api) { { FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] initWithName:@"dev.flutter.pigeon.HostTrivialApi.noop" - binaryMessenger:binaryMessenger - codec:HostTrivialApiGetCodec()]; + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostTrivialApi.noop" + binaryMessenger:binaryMessenger + codec:HostTrivialApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(noopWithError:)], - @"HostTrivialApi api (%@) doesn't respond to @selector(noopWithError:)", api); + NSCAssert([api respondsToSelector:@selector(noopWithError:)], @"HostTrivialApi api (%@) doesn't respond to @selector(noopWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; [api noopWithError:&error]; @@ -2168,19 +1946,18 @@ void HostTrivialApiSetup(id binaryMessenger, void HostSmallApiSetup(id binaryMessenger, NSObject *api) { { FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] initWithName:@"dev.flutter.pigeon.HostSmallApi.echo" - binaryMessenger:binaryMessenger - codec:HostSmallApiGetCodec()]; + [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostSmallApi.echo" + binaryMessenger:binaryMessenger + codec:HostSmallApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoString:completion:)], - @"HostSmallApi api (%@) doesn't respond to @selector(echoString:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoString:completion:)], @"HostSmallApi api (%@) doesn't respond to @selector(echoString:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_aString = GetNullableObjectAtIndex(args, 0); - [api echoString:arg_aString - completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoString:arg_aString completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -2188,13 +1965,12 @@ void HostSmallApiSetup(id binaryMessenger, NSObject *)bina } return self; } -- (void)echoWrappedList:(TestMessage *)arg_msg - completion:(void (^)(TestMessage *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel +- (void)echoWrappedList:(TestMessage *)arg_msg completion:(void (^)(TestMessage *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = + [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterSmallApi.echoWrappedList" - binaryMessenger:self.binaryMessenger - codec:FlutterSmallApiGetCodec()]; - [channel sendMessage:@[ arg_msg ?: [NSNull null] ] - reply:^(id reply) { - TestMessage *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterSmallApiGetCodec()]; + [channel sendMessage:@[arg_msg ?: [NSNull null]] reply:^(id reply) { + TestMessage *output = reply; + completion(output, nil); + }]; } @end + diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/core_tests.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/core_tests.gen.dart index a87b2844d6f9..fc2e678fe717 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/core_tests.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/core_tests.gen.dart @@ -1,8 +1,8 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -177,12 +177,11 @@ class AllNullableTypes { aNullableList: result[8] as List?, aNullableMap: result[9] as Map?, nullableNestedList: (result[10] as List?)?.cast?>(), - nullableMapWithAnnotations: - (result[11] as Map?)?.cast(), - nullableMapWithObject: - (result[12] as Map?)?.cast(), - aNullableEnum: - result[13] != null ? AnEnum.values[result[13]! as int] : null, + nullableMapWithAnnotations: (result[11] as Map?)?.cast(), + nullableMapWithObject: (result[12] as Map?)?.cast(), + aNullableEnum: result[13] != null + ? AnEnum.values[result[13]! as int] + : null, aNullableString: result[14] as String?, ); } @@ -255,13 +254,13 @@ class _HostIntegrationCoreApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return AllNullableTypes.decode(readValue(buffer)!); - case 129: + case 129: return AllNullableTypesWrapper.decode(readValue(buffer)!); - case 130: + case 130: return AllTypes.decode(readValue(buffer)!); - case 131: + case 131: return TestMessage.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -287,7 +286,8 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.noop', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -337,7 +337,8 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.throwError', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -359,7 +360,8 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.throwErrorFromVoid', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -381,7 +383,8 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.throwFlutterError', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -623,8 +626,7 @@ class HostIntegrationCoreApi { } /// Returns the passed object, to test serialization and deserialization. - Future echoAllNullableTypes( - AllNullableTypes? arg_everything) async { + Future echoAllNullableTypes(AllNullableTypes? arg_everything) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAllNullableTypes', codec, binaryMessenger: _binaryMessenger); @@ -648,11 +650,9 @@ class HostIntegrationCoreApi { /// Returns the inner `aString` value from the wrapped object, to test /// sending of nested objects. - Future extractNestedNullableString( - AllNullableTypesWrapper arg_wrapper) async { + Future extractNestedNullableString(AllNullableTypesWrapper arg_wrapper) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_wrapper]) as List?; @@ -674,11 +674,9 @@ class HostIntegrationCoreApi { /// Returns the inner `aString` value from the wrapped object, to test /// sending of nested objects. - Future createNestedNullableString( - String? arg_nullableString) async { + Future createNestedNullableString(String? arg_nullableString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_nullableString]) as List?; @@ -704,15 +702,12 @@ class HostIntegrationCoreApi { } /// Returns passed in arguments of multiple types. - Future sendMultipleNullableTypes(bool? arg_aNullableBool, - int? arg_aNullableInt, String? arg_aNullableString) async { + Future sendMultipleNullableTypes(bool? arg_aNullableBool, int? arg_aNullableInt, String? arg_aNullableString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send( - [arg_aNullableBool, arg_aNullableInt, arg_aNullableString]) - as List?; + final List? replyList = + await channel.send([arg_aNullableBool, arg_aNullableInt, arg_aNullableString]) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -827,11 +822,9 @@ class HostIntegrationCoreApi { } /// Returns the passed in Uint8List. - Future echoNullableUint8List( - Uint8List? arg_aNullableUint8List) async { + Future echoNullableUint8List(Uint8List? arg_aNullableUint8List) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aNullableUint8List]) as List?; @@ -875,8 +868,7 @@ class HostIntegrationCoreApi { } /// Returns the passed list, to test serialization and deserialization. - Future?> echoNullableList( - List? arg_aNullableList) async { + Future?> echoNullableList(List? arg_aNullableList) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableList', codec, binaryMessenger: _binaryMessenger); @@ -899,8 +891,7 @@ class HostIntegrationCoreApi { } /// Returns the passed map, to test serialization and deserialization. - Future?> echoNullableMap( - Map? arg_aNullableMap) async { + Future?> echoNullableMap(Map? arg_aNullableMap) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableMap', codec, binaryMessenger: _binaryMessenger); @@ -928,7 +919,8 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.noopAsync', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1142,8 +1134,7 @@ class HostIntegrationCoreApi { } /// Returns the passed map, to test serialization and deserialization asynchronously. - Future> echoAsyncMap( - Map arg_aMap) async { + Future> echoAsyncMap(Map arg_aMap) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncMap', codec, binaryMessenger: _binaryMessenger); @@ -1175,7 +1166,8 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncError', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1195,10 +1187,10 @@ class HostIntegrationCoreApi { /// Responds with an error from an async void function. Future throwAsyncErrorFromVoid() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1218,10 +1210,10 @@ class HostIntegrationCoreApi { /// Responds with a Flutter error from an async function returning a value. Future throwAsyncFlutterError() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1267,11 +1259,9 @@ class HostIntegrationCoreApi { } /// Returns the passed object, to test serialization and deserialization. - Future echoAsyncNullableAllNullableTypes( - AllNullableTypes? arg_everything) async { + Future echoAsyncNullableAllNullableTypes(AllNullableTypes? arg_everything) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_everything]) as List?; @@ -1317,8 +1307,7 @@ class HostIntegrationCoreApi { /// Returns passed in double asynchronously. Future echoAsyncNullableDouble(double? arg_aDouble) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aDouble]) as List?; @@ -1341,8 +1330,7 @@ class HostIntegrationCoreApi { /// Returns the passed in boolean asynchronously. Future echoAsyncNullableBool(bool? arg_aBool) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aBool]) as List?; @@ -1365,8 +1353,7 @@ class HostIntegrationCoreApi { /// Returns the passed string asynchronously. Future echoAsyncNullableString(String? arg_aString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aString]) as List?; @@ -1387,11 +1374,9 @@ class HostIntegrationCoreApi { } /// Returns the passed in Uint8List asynchronously. - Future echoAsyncNullableUint8List( - Uint8List? arg_aUint8List) async { + Future echoAsyncNullableUint8List(Uint8List? arg_aUint8List) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aUint8List]) as List?; @@ -1414,8 +1399,7 @@ class HostIntegrationCoreApi { /// Returns the passed in generic Object asynchronously. Future echoAsyncNullableObject(Object? arg_anObject) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_anObject]) as List?; @@ -1438,8 +1422,7 @@ class HostIntegrationCoreApi { /// Returns the passed list, to test serialization and deserialization asynchronously. Future?> echoAsyncNullableList(List? arg_aList) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aList]) as List?; @@ -1460,8 +1443,7 @@ class HostIntegrationCoreApi { } /// Returns the passed map, to test serialization and deserialization asynchronously. - Future?> echoAsyncNullableMap( - Map? arg_aMap) async { + Future?> echoAsyncNullableMap(Map? arg_aMap) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableMap', codec, binaryMessenger: _binaryMessenger); @@ -1487,7 +1469,8 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterNoop', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1506,10 +1489,10 @@ class HostIntegrationCoreApi { Future callFlutterThrowError() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1528,10 +1511,10 @@ class HostIntegrationCoreApi { Future callFlutterThrowErrorFromVoid() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1550,8 +1533,7 @@ class HostIntegrationCoreApi { Future callFlutterEchoAllTypes(AllTypes arg_everything) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_everything]) as List?; @@ -1576,17 +1558,12 @@ class HostIntegrationCoreApi { } } - Future callFlutterSendMultipleNullableTypes( - bool? arg_aNullableBool, - int? arg_aNullableInt, - String? arg_aNullableString) async { + Future callFlutterSendMultipleNullableTypes(bool? arg_aNullableBool, int? arg_aNullableInt, String? arg_aNullableString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send( - [arg_aNullableBool, arg_aNullableInt, arg_aNullableString]) - as List?; + final List? replyList = + await channel.send([arg_aNullableBool, arg_aNullableInt, arg_aNullableString]) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1664,8 +1641,7 @@ class HostIntegrationCoreApi { Future callFlutterEchoDouble(double arg_aDouble) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aDouble]) as List?; @@ -1692,8 +1668,7 @@ class HostIntegrationCoreApi { Future callFlutterEchoString(String arg_aString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aString]) as List?; @@ -1720,8 +1695,7 @@ class HostIntegrationCoreApi { Future callFlutterEchoUint8List(Uint8List arg_aList) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aList]) as List?; @@ -1773,8 +1747,7 @@ class HostIntegrationCoreApi { } } - Future> callFlutterEchoMap( - Map arg_aMap) async { + Future> callFlutterEchoMap(Map arg_aMap) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoMap', codec, binaryMessenger: _binaryMessenger); @@ -1803,8 +1776,7 @@ class HostIntegrationCoreApi { Future callFlutterEchoNullableBool(bool? arg_aBool) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aBool]) as List?; @@ -1826,8 +1798,7 @@ class HostIntegrationCoreApi { Future callFlutterEchoNullableInt(int? arg_anInt) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_anInt]) as List?; @@ -1849,8 +1820,7 @@ class HostIntegrationCoreApi { Future callFlutterEchoNullableDouble(double? arg_aDouble) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aDouble]) as List?; @@ -1872,8 +1842,7 @@ class HostIntegrationCoreApi { Future callFlutterEchoNullableString(String? arg_aString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aString]) as List?; @@ -1893,11 +1862,9 @@ class HostIntegrationCoreApi { } } - Future callFlutterEchoNullableUint8List( - Uint8List? arg_aList) async { + Future callFlutterEchoNullableUint8List(Uint8List? arg_aList) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aList]) as List?; @@ -1917,11 +1884,9 @@ class HostIntegrationCoreApi { } } - Future?> callFlutterEchoNullableList( - List? arg_aList) async { + Future?> callFlutterEchoNullableList(List? arg_aList) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aList]) as List?; @@ -1941,11 +1906,9 @@ class HostIntegrationCoreApi { } } - Future?> callFlutterEchoNullableMap( - Map? arg_aMap) async { + Future?> callFlutterEchoNullableMap(Map? arg_aMap) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aMap]) as List?; @@ -1990,13 +1953,13 @@ class _FlutterIntegrationCoreApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return AllNullableTypes.decode(readValue(buffer)!); - case 129: + case 129: return AllNullableTypesWrapper.decode(readValue(buffer)!); - case 130: + case 130: return AllTypes.decode(readValue(buffer)!); - case 131: + case 131: return TestMessage.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -2028,8 +1991,7 @@ abstract class FlutterIntegrationCoreApi { /// Returns passed in arguments of multiple types. /// /// Tests multiple-arity FlutterApi handling. - AllNullableTypes sendMultipleNullableTypes( - bool? aNullableBool, int? aNullableInt, String? aNullableString); + AllNullableTypes sendMultipleNullableTypes(bool? aNullableBool, int? aNullableInt, String? aNullableString); /// Returns the passed boolean, to test serialization and deserialization. bool echoBool(bool aBool); @@ -2080,8 +2042,7 @@ abstract class FlutterIntegrationCoreApi { /// Returns the passed in generic Object asynchronously. Future echoAsyncString(String aString); - static void setup(FlutterIntegrationCoreApi? api, - {BinaryMessenger? binaryMessenger}) { + static void setup(FlutterIntegrationCoreApi? api, {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.FlutterIntegrationCoreApi.noop', codec, @@ -2112,8 +2073,7 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid', - codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid', codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); @@ -2134,7 +2094,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes was null.'); final List args = (message as List?)!; final AllTypes? arg_everything = (args[0] as AllTypes?); assert(arg_everything != null, @@ -2146,43 +2106,38 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes', - codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes', codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes was null.'); final List args = (message as List?)!; - final AllNullableTypes? arg_everything = - (args[0] as AllNullableTypes?); + final AllNullableTypes? arg_everything = (args[0] as AllNullableTypes?); assert(arg_everything != null, 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes was null, expected non-null AllNullableTypes.'); - final AllNullableTypes output = - api.echoAllNullableTypes(arg_everything!); + final AllNullableTypes output = api.echoAllNullableTypes(arg_everything!); return output; }); } } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes', - codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes', codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes was null.'); 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?); - final AllNullableTypes output = api.sendMultipleNullableTypes( - arg_aNullableBool, arg_aNullableInt, arg_aNullableString); + final AllNullableTypes output = api.sendMultipleNullableTypes(arg_aNullableBool, arg_aNullableInt, arg_aNullableString); return output; }); } @@ -2196,7 +2151,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoBool was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoBool was null.'); final List args = (message as List?)!; final bool? arg_aBool = (args[0] as bool?); assert(arg_aBool != null, @@ -2215,7 +2170,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoInt was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoInt was null.'); final List args = (message as List?)!; final int? arg_anInt = (args[0] as int?); assert(arg_anInt != null, @@ -2234,7 +2189,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble was null.'); final List args = (message as List?)!; final double? arg_aDouble = (args[0] as double?); assert(arg_aDouble != null, @@ -2253,7 +2208,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString was null.'); final List args = (message as List?)!; final String? arg_aString = (args[0] as String?); assert(arg_aString != null, @@ -2272,7 +2227,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List was null.'); final List args = (message as List?)!; final Uint8List? arg_aList = (args[0] as Uint8List?); assert(arg_aList != null, @@ -2291,10 +2246,9 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList was null.'); final List args = (message as List?)!; - final List? arg_aList = - (args[0] as List?)?.cast(); + final List? arg_aList = (args[0] as List?)?.cast(); assert(arg_aList != null, 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList was null, expected non-null List.'); final List output = api.echoList(arg_aList!); @@ -2311,10 +2265,9 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap was null.'); final List args = (message as List?)!; - final Map? arg_aMap = - (args[0] as Map?)?.cast(); + final Map? arg_aMap = (args[0] as Map?)?.cast(); assert(arg_aMap != null, 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap was null, expected non-null Map.'); final Map output = api.echoMap(arg_aMap!); @@ -2324,15 +2277,14 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool', - codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool', codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool was null.'); final List args = (message as List?)!; final bool? arg_aBool = (args[0] as bool?); final bool? output = api.echoNullableBool(arg_aBool); @@ -2349,7 +2301,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt was null.'); final List args = (message as List?)!; final int? arg_anInt = (args[0] as int?); final int? output = api.echoNullableInt(arg_anInt); @@ -2359,15 +2311,14 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble', - codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble', codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble was null.'); final List args = (message as List?)!; final double? arg_aDouble = (args[0] as double?); final double? output = api.echoNullableDouble(arg_aDouble); @@ -2377,15 +2328,14 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString', - codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString', codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString was null.'); final List args = (message as List?)!; final String? arg_aString = (args[0] as String?); final String? output = api.echoNullableString(arg_aString); @@ -2395,15 +2345,14 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List', - codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List', codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List was null.'); final List args = (message as List?)!; final Uint8List? arg_aList = (args[0] as Uint8List?); final Uint8List? output = api.echoNullableUint8List(arg_aList); @@ -2413,18 +2362,16 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList', - codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList', codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList was null.'); final List args = (message as List?)!; - final List? arg_aList = - (args[0] as List?)?.cast(); + final List? arg_aList = (args[0] as List?)?.cast(); final List? output = api.echoNullableList(arg_aList); return output; }); @@ -2439,10 +2386,9 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap was null.'); final List args = (message as List?)!; - final Map? arg_aMap = - (args[0] as Map?)?.cast(); + final Map? arg_aMap = (args[0] as Map?)?.cast(); final Map? output = api.echoNullableMap(arg_aMap); return output; }); @@ -2471,7 +2417,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString was null.'); final List args = (message as List?)!; final String? arg_aString = (args[0] as String?); assert(arg_aString != null, @@ -2499,7 +2445,8 @@ class HostTrivialApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostTrivialApi.noop', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -2559,7 +2506,8 @@ class HostSmallApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostSmallApi.voidVoid', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -2592,7 +2540,7 @@ class _FlutterSmallApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return TestMessage.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -2616,7 +2564,7 @@ abstract class FlutterSmallApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterSmallApi.echoWrappedList was null.'); + 'Argument for dev.flutter.pigeon.FlutterSmallApi.echoWrappedList was null.'); final List args = (message as List?)!; final TestMessage? arg_msg = (args[0] as TestMessage?); assert(arg_msg != null, diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/flutter_unittests.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/flutter_unittests.gen.dart index 1f96d4dee242..e11d31558172 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/flutter_unittests.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/flutter_unittests.gen.dart @@ -1,8 +1,8 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -125,13 +125,13 @@ class _ApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return FlutterSearchReplies.decode(readValue(buffer)!); - case 129: + case 129: return FlutterSearchReply.decode(readValue(buffer)!); - case 130: + case 130: return FlutterSearchRequest.decode(readValue(buffer)!); - case 131: + case 131: return FlutterSearchRequests.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -143,7 +143,8 @@ class Api { /// Constructor for [Api]. The [binaryMessenger] named argument is /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. - Api({BinaryMessenger? binaryMessenger}) : _binaryMessenger = binaryMessenger; + Api({BinaryMessenger? binaryMessenger}) + : _binaryMessenger = binaryMessenger; final BinaryMessenger? _binaryMessenger; static const MessageCodec codec = _ApiCodec(); @@ -175,8 +176,7 @@ class Api { } } - Future doSearches( - FlutterSearchRequests arg_request) async { + Future doSearches(FlutterSearchRequests arg_request) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.Api.doSearches', codec, binaryMessenger: _binaryMessenger); diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/multiple_arity.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/multiple_arity.gen.dart index 7c477b28dcf7..5390932bf6b7 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/multiple_arity.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/multiple_arity.gen.dart @@ -1,8 +1,8 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -55,8 +55,7 @@ abstract class MultipleArityFlutterApi { int subtract(int x, int y); - static void setup(MultipleArityFlutterApi? api, - {BinaryMessenger? binaryMessenger}) { + static void setup(MultipleArityFlutterApi? api, {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.MultipleArityFlutterApi.subtract', codec, @@ -66,7 +65,7 @@ abstract class MultipleArityFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.MultipleArityFlutterApi.subtract was null.'); + 'Argument for dev.flutter.pigeon.MultipleArityFlutterApi.subtract was null.'); final List args = (message as List?)!; final int? arg_x = (args[0] as int?); assert(arg_x != null, diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/non_null_fields.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/non_null_fields.gen.dart index 60e2655c32fd..fef862ca39ca 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/non_null_fields.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/non_null_fields.gen.dart @@ -1,8 +1,8 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -126,11 +126,11 @@ class _NonNullFieldHostApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return ExtraData.decode(readValue(buffer)!); - case 129: + case 129: return NonNullFieldSearchReply.decode(readValue(buffer)!); - case 130: + case 130: return NonNullFieldSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -148,8 +148,7 @@ class NonNullFieldHostApi { static const MessageCodec codec = _NonNullFieldHostApiCodec(); - Future search( - NonNullFieldSearchRequest arg_nested) async { + Future search(NonNullFieldSearchRequest arg_nested) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NonNullFieldHostApi.search', codec, binaryMessenger: _binaryMessenger); @@ -198,11 +197,11 @@ class _NonNullFieldFlutterApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return ExtraData.decode(readValue(buffer)!); - case 129: + case 129: return NonNullFieldSearchReply.decode(readValue(buffer)!); - case 130: + case 130: return NonNullFieldSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -215,8 +214,7 @@ abstract class NonNullFieldFlutterApi { NonNullFieldSearchReply search(NonNullFieldSearchRequest request); - static void setup(NonNullFieldFlutterApi? api, - {BinaryMessenger? binaryMessenger}) { + static void setup(NonNullFieldFlutterApi? api, {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NonNullFieldFlutterApi.search', codec, @@ -226,10 +224,9 @@ abstract class NonNullFieldFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.NonNullFieldFlutterApi.search was null.'); + 'Argument for dev.flutter.pigeon.NonNullFieldFlutterApi.search was null.'); final List args = (message as List?)!; - final NonNullFieldSearchRequest? arg_request = - (args[0] as NonNullFieldSearchRequest?); + final NonNullFieldSearchRequest? arg_request = (args[0] as NonNullFieldSearchRequest?); assert(arg_request != null, 'Argument for dev.flutter.pigeon.NonNullFieldFlutterApi.search was null, expected non-null NonNullFieldSearchRequest.'); final NonNullFieldSearchReply output = api.search(arg_request!); diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/null_fields.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/null_fields.gen.dart index 9c16fbe7dbfd..4d22b8cc111a 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/null_fields.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/null_fields.gen.dart @@ -1,8 +1,8 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -106,9 +106,9 @@ class _NullFieldsHostApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return NullFieldsSearchReply.decode(readValue(buffer)!); - case 129: + case 129: return NullFieldsSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -126,8 +126,7 @@ class NullFieldsHostApi { static const MessageCodec codec = _NullFieldsHostApiCodec(); - Future search( - NullFieldsSearchRequest arg_nested) async { + Future search(NullFieldsSearchRequest arg_nested) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NullFieldsHostApi.search', codec, binaryMessenger: _binaryMessenger); @@ -173,9 +172,9 @@ class _NullFieldsFlutterApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return NullFieldsSearchReply.decode(readValue(buffer)!); - case 129: + case 129: return NullFieldsSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -188,8 +187,7 @@ abstract class NullFieldsFlutterApi { NullFieldsSearchReply search(NullFieldsSearchRequest request); - static void setup(NullFieldsFlutterApi? api, - {BinaryMessenger? binaryMessenger}) { + static void setup(NullFieldsFlutterApi? api, {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NullFieldsFlutterApi.search', codec, @@ -199,10 +197,9 @@ abstract class NullFieldsFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.NullFieldsFlutterApi.search was null.'); + 'Argument for dev.flutter.pigeon.NullFieldsFlutterApi.search was null.'); final List args = (message as List?)!; - final NullFieldsSearchRequest? arg_request = - (args[0] as NullFieldsSearchRequest?); + final NullFieldsSearchRequest? arg_request = (args[0] as NullFieldsSearchRequest?); assert(arg_request != null, 'Argument for dev.flutter.pigeon.NullFieldsFlutterApi.search was null, expected non-null NullFieldsSearchRequest.'); final NullFieldsSearchReply output = api.search(arg_request!); diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/nullable_returns.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/nullable_returns.gen.dart index a0a0a60a6f60..91ca77ca9edb 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/nullable_returns.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/nullable_returns.gen.dart @@ -1,8 +1,8 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -26,7 +26,8 @@ class NullableReturnHostApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NullableReturnHostApi.doit', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -49,8 +50,7 @@ abstract class NullableReturnFlutterApi { int? doit(); - static void setup(NullableReturnFlutterApi? api, - {BinaryMessenger? binaryMessenger}) { + static void setup(NullableReturnFlutterApi? api, {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NullableReturnFlutterApi.doit', codec, @@ -111,8 +111,7 @@ abstract class NullableArgFlutterApi { int doit(int? x); - static void setup(NullableArgFlutterApi? api, - {BinaryMessenger? binaryMessenger}) { + static void setup(NullableArgFlutterApi? api, {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NullableArgFlutterApi.doit', codec, @@ -122,7 +121,7 @@ abstract class NullableArgFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.NullableArgFlutterApi.doit was null.'); + 'Argument for dev.flutter.pigeon.NullableArgFlutterApi.doit was null.'); final List args = (message as List?)!; final int? arg_x = (args[0] as int?); final int output = api.doit(arg_x); @@ -147,7 +146,8 @@ class NullableCollectionReturnHostApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NullableCollectionReturnHostApi.doit', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -170,8 +170,7 @@ abstract class NullableCollectionReturnFlutterApi { List? doit(); - static void setup(NullableCollectionReturnFlutterApi? api, - {BinaryMessenger? binaryMessenger}) { + static void setup(NullableCollectionReturnFlutterApi? api, {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NullableCollectionReturnFlutterApi.doit', codec, @@ -232,8 +231,7 @@ abstract class NullableCollectionArgFlutterApi { List doit(List? x); - static void setup(NullableCollectionArgFlutterApi? api, - {BinaryMessenger? binaryMessenger}) { + static void setup(NullableCollectionArgFlutterApi? api, {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NullableCollectionArgFlutterApi.doit', codec, @@ -243,10 +241,9 @@ abstract class NullableCollectionArgFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.NullableCollectionArgFlutterApi.doit was null.'); + 'Argument for dev.flutter.pigeon.NullableCollectionArgFlutterApi.doit was null.'); final List args = (message as List?)!; - final List? arg_x = - (args[0] as List?)?.cast(); + final List? arg_x = (args[0] as List?)?.cast(); final List output = api.doit(arg_x); return output; }); diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/primitive.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/primitive.gen.dart index 227fb9d9051e..9137ef9e8745 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/primitive.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/primitive.gen.dart @@ -1,8 +1,8 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -287,8 +287,7 @@ abstract class PrimitiveFlutterApi { Map aStringIntMap(Map value); - static void setup(PrimitiveFlutterApi? api, - {BinaryMessenger? binaryMessenger}) { + static void setup(PrimitiveFlutterApi? api, {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.PrimitiveFlutterApi.anInt', codec, @@ -298,7 +297,7 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.anInt was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.anInt was null.'); final List args = (message as List?)!; final int? arg_value = (args[0] as int?); assert(arg_value != null, @@ -317,7 +316,7 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aBool was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aBool was null.'); final List args = (message as List?)!; final bool? arg_value = (args[0] as bool?); assert(arg_value != null, @@ -336,7 +335,7 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aString was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aString was null.'); final List args = (message as List?)!; final String? arg_value = (args[0] as String?); assert(arg_value != null, @@ -355,7 +354,7 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aDouble was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aDouble was null.'); final List args = (message as List?)!; final double? arg_value = (args[0] as double?); assert(arg_value != null, @@ -374,10 +373,9 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aMap was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aMap was null.'); final List args = (message as List?)!; - final Map? arg_value = - (args[0] as Map?); + final Map? arg_value = (args[0] as Map?); assert(arg_value != null, 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aMap was null, expected non-null Map.'); final Map output = api.aMap(arg_value!); @@ -394,7 +392,7 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aList was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aList was null.'); final List args = (message as List?)!; final List? arg_value = (args[0] as List?); assert(arg_value != null, @@ -413,7 +411,7 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.anInt32List was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.anInt32List was null.'); final List args = (message as List?)!; final Int32List? arg_value = (args[0] as Int32List?); assert(arg_value != null, @@ -432,10 +430,9 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aBoolList was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aBoolList was null.'); final List args = (message as List?)!; - final List? arg_value = - (args[0] as List?)?.cast(); + final List? arg_value = (args[0] as List?)?.cast(); assert(arg_value != null, 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aBoolList was null, expected non-null List.'); final List output = api.aBoolList(arg_value!); @@ -452,10 +449,9 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aStringIntMap was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aStringIntMap was null.'); final List args = (message as List?)!; - final Map? arg_value = - (args[0] as Map?)?.cast(); + final Map? arg_value = (args[0] as Map?)?.cast(); assert(arg_value != null, 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aStringIntMap was null, expected non-null Map.'); final Map output = api.aStringIntMap(arg_value!); diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/null_safe_test.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/null_safe_test.dart index a3094feb1c74..c321ebac787f 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/null_safe_test.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/test/null_safe_test.dart @@ -22,7 +22,8 @@ import 'test_util.dart'; NullableCollectionReturnFlutterApi, ]) void main() { - final TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized(); + final TestWidgetsFlutterBinding binding = + TestWidgetsFlutterBinding.ensureInitialized(); test('with values filled', () { final FlutterSearchReply reply = FlutterSearchReply() 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 a87b2844d6f9..fc2e678fe717 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 @@ -1,8 +1,8 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -177,12 +177,11 @@ class AllNullableTypes { aNullableList: result[8] as List?, aNullableMap: result[9] as Map?, nullableNestedList: (result[10] as List?)?.cast?>(), - nullableMapWithAnnotations: - (result[11] as Map?)?.cast(), - nullableMapWithObject: - (result[12] as Map?)?.cast(), - aNullableEnum: - result[13] != null ? AnEnum.values[result[13]! as int] : null, + nullableMapWithAnnotations: (result[11] as Map?)?.cast(), + nullableMapWithObject: (result[12] as Map?)?.cast(), + aNullableEnum: result[13] != null + ? AnEnum.values[result[13]! as int] + : null, aNullableString: result[14] as String?, ); } @@ -255,13 +254,13 @@ class _HostIntegrationCoreApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return AllNullableTypes.decode(readValue(buffer)!); - case 129: + case 129: return AllNullableTypesWrapper.decode(readValue(buffer)!); - case 130: + case 130: return AllTypes.decode(readValue(buffer)!); - case 131: + case 131: return TestMessage.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -287,7 +286,8 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.noop', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -337,7 +337,8 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.throwError', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -359,7 +360,8 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.throwErrorFromVoid', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -381,7 +383,8 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.throwFlutterError', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -623,8 +626,7 @@ class HostIntegrationCoreApi { } /// Returns the passed object, to test serialization and deserialization. - Future echoAllNullableTypes( - AllNullableTypes? arg_everything) async { + Future echoAllNullableTypes(AllNullableTypes? arg_everything) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAllNullableTypes', codec, binaryMessenger: _binaryMessenger); @@ -648,11 +650,9 @@ class HostIntegrationCoreApi { /// Returns the inner `aString` value from the wrapped object, to test /// sending of nested objects. - Future extractNestedNullableString( - AllNullableTypesWrapper arg_wrapper) async { + Future extractNestedNullableString(AllNullableTypesWrapper arg_wrapper) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_wrapper]) as List?; @@ -674,11 +674,9 @@ class HostIntegrationCoreApi { /// Returns the inner `aString` value from the wrapped object, to test /// sending of nested objects. - Future createNestedNullableString( - String? arg_nullableString) async { + Future createNestedNullableString(String? arg_nullableString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_nullableString]) as List?; @@ -704,15 +702,12 @@ class HostIntegrationCoreApi { } /// Returns passed in arguments of multiple types. - Future sendMultipleNullableTypes(bool? arg_aNullableBool, - int? arg_aNullableInt, String? arg_aNullableString) async { + Future sendMultipleNullableTypes(bool? arg_aNullableBool, int? arg_aNullableInt, String? arg_aNullableString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send( - [arg_aNullableBool, arg_aNullableInt, arg_aNullableString]) - as List?; + final List? replyList = + await channel.send([arg_aNullableBool, arg_aNullableInt, arg_aNullableString]) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -827,11 +822,9 @@ class HostIntegrationCoreApi { } /// Returns the passed in Uint8List. - Future echoNullableUint8List( - Uint8List? arg_aNullableUint8List) async { + Future echoNullableUint8List(Uint8List? arg_aNullableUint8List) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aNullableUint8List]) as List?; @@ -875,8 +868,7 @@ class HostIntegrationCoreApi { } /// Returns the passed list, to test serialization and deserialization. - Future?> echoNullableList( - List? arg_aNullableList) async { + Future?> echoNullableList(List? arg_aNullableList) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableList', codec, binaryMessenger: _binaryMessenger); @@ -899,8 +891,7 @@ class HostIntegrationCoreApi { } /// Returns the passed map, to test serialization and deserialization. - Future?> echoNullableMap( - Map? arg_aNullableMap) async { + Future?> echoNullableMap(Map? arg_aNullableMap) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableMap', codec, binaryMessenger: _binaryMessenger); @@ -928,7 +919,8 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.noopAsync', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1142,8 +1134,7 @@ class HostIntegrationCoreApi { } /// Returns the passed map, to test serialization and deserialization asynchronously. - Future> echoAsyncMap( - Map arg_aMap) async { + Future> echoAsyncMap(Map arg_aMap) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncMap', codec, binaryMessenger: _binaryMessenger); @@ -1175,7 +1166,8 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncError', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1195,10 +1187,10 @@ class HostIntegrationCoreApi { /// Responds with an error from an async void function. Future throwAsyncErrorFromVoid() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1218,10 +1210,10 @@ class HostIntegrationCoreApi { /// Responds with a Flutter error from an async function returning a value. Future throwAsyncFlutterError() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1267,11 +1259,9 @@ class HostIntegrationCoreApi { } /// Returns the passed object, to test serialization and deserialization. - Future echoAsyncNullableAllNullableTypes( - AllNullableTypes? arg_everything) async { + Future echoAsyncNullableAllNullableTypes(AllNullableTypes? arg_everything) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_everything]) as List?; @@ -1317,8 +1307,7 @@ class HostIntegrationCoreApi { /// Returns passed in double asynchronously. Future echoAsyncNullableDouble(double? arg_aDouble) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aDouble]) as List?; @@ -1341,8 +1330,7 @@ class HostIntegrationCoreApi { /// Returns the passed in boolean asynchronously. Future echoAsyncNullableBool(bool? arg_aBool) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aBool]) as List?; @@ -1365,8 +1353,7 @@ class HostIntegrationCoreApi { /// Returns the passed string asynchronously. Future echoAsyncNullableString(String? arg_aString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aString]) as List?; @@ -1387,11 +1374,9 @@ class HostIntegrationCoreApi { } /// Returns the passed in Uint8List asynchronously. - Future echoAsyncNullableUint8List( - Uint8List? arg_aUint8List) async { + Future echoAsyncNullableUint8List(Uint8List? arg_aUint8List) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aUint8List]) as List?; @@ -1414,8 +1399,7 @@ class HostIntegrationCoreApi { /// Returns the passed in generic Object asynchronously. Future echoAsyncNullableObject(Object? arg_anObject) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_anObject]) as List?; @@ -1438,8 +1422,7 @@ class HostIntegrationCoreApi { /// Returns the passed list, to test serialization and deserialization asynchronously. Future?> echoAsyncNullableList(List? arg_aList) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aList]) as List?; @@ -1460,8 +1443,7 @@ class HostIntegrationCoreApi { } /// Returns the passed map, to test serialization and deserialization asynchronously. - Future?> echoAsyncNullableMap( - Map? arg_aMap) async { + Future?> echoAsyncNullableMap(Map? arg_aMap) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableMap', codec, binaryMessenger: _binaryMessenger); @@ -1487,7 +1469,8 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterNoop', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1506,10 +1489,10 @@ class HostIntegrationCoreApi { Future callFlutterThrowError() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1528,10 +1511,10 @@ class HostIntegrationCoreApi { Future callFlutterThrowErrorFromVoid() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1550,8 +1533,7 @@ class HostIntegrationCoreApi { Future callFlutterEchoAllTypes(AllTypes arg_everything) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_everything]) as List?; @@ -1576,17 +1558,12 @@ class HostIntegrationCoreApi { } } - Future callFlutterSendMultipleNullableTypes( - bool? arg_aNullableBool, - int? arg_aNullableInt, - String? arg_aNullableString) async { + Future callFlutterSendMultipleNullableTypes(bool? arg_aNullableBool, int? arg_aNullableInt, String? arg_aNullableString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send( - [arg_aNullableBool, arg_aNullableInt, arg_aNullableString]) - as List?; + final List? replyList = + await channel.send([arg_aNullableBool, arg_aNullableInt, arg_aNullableString]) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1664,8 +1641,7 @@ class HostIntegrationCoreApi { Future callFlutterEchoDouble(double arg_aDouble) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aDouble]) as List?; @@ -1692,8 +1668,7 @@ class HostIntegrationCoreApi { Future callFlutterEchoString(String arg_aString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aString]) as List?; @@ -1720,8 +1695,7 @@ class HostIntegrationCoreApi { Future callFlutterEchoUint8List(Uint8List arg_aList) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aList]) as List?; @@ -1773,8 +1747,7 @@ class HostIntegrationCoreApi { } } - Future> callFlutterEchoMap( - Map arg_aMap) async { + Future> callFlutterEchoMap(Map arg_aMap) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoMap', codec, binaryMessenger: _binaryMessenger); @@ -1803,8 +1776,7 @@ class HostIntegrationCoreApi { Future callFlutterEchoNullableBool(bool? arg_aBool) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aBool]) as List?; @@ -1826,8 +1798,7 @@ class HostIntegrationCoreApi { Future callFlutterEchoNullableInt(int? arg_anInt) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_anInt]) as List?; @@ -1849,8 +1820,7 @@ class HostIntegrationCoreApi { Future callFlutterEchoNullableDouble(double? arg_aDouble) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aDouble]) as List?; @@ -1872,8 +1842,7 @@ class HostIntegrationCoreApi { Future callFlutterEchoNullableString(String? arg_aString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aString]) as List?; @@ -1893,11 +1862,9 @@ class HostIntegrationCoreApi { } } - Future callFlutterEchoNullableUint8List( - Uint8List? arg_aList) async { + Future callFlutterEchoNullableUint8List(Uint8List? arg_aList) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aList]) as List?; @@ -1917,11 +1884,9 @@ class HostIntegrationCoreApi { } } - Future?> callFlutterEchoNullableList( - List? arg_aList) async { + Future?> callFlutterEchoNullableList(List? arg_aList) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aList]) as List?; @@ -1941,11 +1906,9 @@ class HostIntegrationCoreApi { } } - Future?> callFlutterEchoNullableMap( - Map? arg_aMap) async { + Future?> callFlutterEchoNullableMap(Map? arg_aMap) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap', - codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap', codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aMap]) as List?; @@ -1990,13 +1953,13 @@ class _FlutterIntegrationCoreApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return AllNullableTypes.decode(readValue(buffer)!); - case 129: + case 129: return AllNullableTypesWrapper.decode(readValue(buffer)!); - case 130: + case 130: return AllTypes.decode(readValue(buffer)!); - case 131: + case 131: return TestMessage.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -2028,8 +1991,7 @@ abstract class FlutterIntegrationCoreApi { /// Returns passed in arguments of multiple types. /// /// Tests multiple-arity FlutterApi handling. - AllNullableTypes sendMultipleNullableTypes( - bool? aNullableBool, int? aNullableInt, String? aNullableString); + AllNullableTypes sendMultipleNullableTypes(bool? aNullableBool, int? aNullableInt, String? aNullableString); /// Returns the passed boolean, to test serialization and deserialization. bool echoBool(bool aBool); @@ -2080,8 +2042,7 @@ abstract class FlutterIntegrationCoreApi { /// Returns the passed in generic Object asynchronously. Future echoAsyncString(String aString); - static void setup(FlutterIntegrationCoreApi? api, - {BinaryMessenger? binaryMessenger}) { + static void setup(FlutterIntegrationCoreApi? api, {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.FlutterIntegrationCoreApi.noop', codec, @@ -2112,8 +2073,7 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid', - codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid', codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); @@ -2134,7 +2094,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes was null.'); final List args = (message as List?)!; final AllTypes? arg_everything = (args[0] as AllTypes?); assert(arg_everything != null, @@ -2146,43 +2106,38 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes', - codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes', codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes was null.'); final List args = (message as List?)!; - final AllNullableTypes? arg_everything = - (args[0] as AllNullableTypes?); + final AllNullableTypes? arg_everything = (args[0] as AllNullableTypes?); assert(arg_everything != null, 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes was null, expected non-null AllNullableTypes.'); - final AllNullableTypes output = - api.echoAllNullableTypes(arg_everything!); + final AllNullableTypes output = api.echoAllNullableTypes(arg_everything!); return output; }); } } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes', - codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes', codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes was null.'); 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?); - final AllNullableTypes output = api.sendMultipleNullableTypes( - arg_aNullableBool, arg_aNullableInt, arg_aNullableString); + final AllNullableTypes output = api.sendMultipleNullableTypes(arg_aNullableBool, arg_aNullableInt, arg_aNullableString); return output; }); } @@ -2196,7 +2151,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoBool was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoBool was null.'); final List args = (message as List?)!; final bool? arg_aBool = (args[0] as bool?); assert(arg_aBool != null, @@ -2215,7 +2170,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoInt was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoInt was null.'); final List args = (message as List?)!; final int? arg_anInt = (args[0] as int?); assert(arg_anInt != null, @@ -2234,7 +2189,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble was null.'); final List args = (message as List?)!; final double? arg_aDouble = (args[0] as double?); assert(arg_aDouble != null, @@ -2253,7 +2208,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString was null.'); final List args = (message as List?)!; final String? arg_aString = (args[0] as String?); assert(arg_aString != null, @@ -2272,7 +2227,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List was null.'); final List args = (message as List?)!; final Uint8List? arg_aList = (args[0] as Uint8List?); assert(arg_aList != null, @@ -2291,10 +2246,9 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList was null.'); final List args = (message as List?)!; - final List? arg_aList = - (args[0] as List?)?.cast(); + final List? arg_aList = (args[0] as List?)?.cast(); assert(arg_aList != null, 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList was null, expected non-null List.'); final List output = api.echoList(arg_aList!); @@ -2311,10 +2265,9 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap was null.'); final List args = (message as List?)!; - final Map? arg_aMap = - (args[0] as Map?)?.cast(); + final Map? arg_aMap = (args[0] as Map?)?.cast(); assert(arg_aMap != null, 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap was null, expected non-null Map.'); final Map output = api.echoMap(arg_aMap!); @@ -2324,15 +2277,14 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool', - codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool', codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool was null.'); final List args = (message as List?)!; final bool? arg_aBool = (args[0] as bool?); final bool? output = api.echoNullableBool(arg_aBool); @@ -2349,7 +2301,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt was null.'); final List args = (message as List?)!; final int? arg_anInt = (args[0] as int?); final int? output = api.echoNullableInt(arg_anInt); @@ -2359,15 +2311,14 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble', - codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble', codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble was null.'); final List args = (message as List?)!; final double? arg_aDouble = (args[0] as double?); final double? output = api.echoNullableDouble(arg_aDouble); @@ -2377,15 +2328,14 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString', - codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString', codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString was null.'); final List args = (message as List?)!; final String? arg_aString = (args[0] as String?); final String? output = api.echoNullableString(arg_aString); @@ -2395,15 +2345,14 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List', - codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List', codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List was null.'); final List args = (message as List?)!; final Uint8List? arg_aList = (args[0] as Uint8List?); final Uint8List? output = api.echoNullableUint8List(arg_aList); @@ -2413,18 +2362,16 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList', - codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList', codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList was null.'); final List args = (message as List?)!; - final List? arg_aList = - (args[0] as List?)?.cast(); + final List? arg_aList = (args[0] as List?)?.cast(); final List? output = api.echoNullableList(arg_aList); return output; }); @@ -2439,10 +2386,9 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap was null.'); final List args = (message as List?)!; - final Map? arg_aMap = - (args[0] as Map?)?.cast(); + final Map? arg_aMap = (args[0] as Map?)?.cast(); final Map? output = api.echoNullableMap(arg_aMap); return output; }); @@ -2471,7 +2417,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString was null.'); final List args = (message as List?)!; final String? arg_aString = (args[0] as String?); assert(arg_aString != null, @@ -2499,7 +2445,8 @@ class HostTrivialApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostTrivialApi.noop', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -2559,7 +2506,8 @@ class HostSmallApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostSmallApi.voidVoid', codec, binaryMessenger: _binaryMessenger); - final List? replyList = await channel.send(null) as List?; + final List? replyList = + await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -2592,7 +2540,7 @@ class _FlutterSmallApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return TestMessage.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -2616,7 +2564,7 @@ abstract class FlutterSmallApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterSmallApi.echoWrappedList was null.'); + 'Argument for dev.flutter.pigeon.FlutterSmallApi.echoWrappedList was null.'); final List args = (message as List?)!; final TestMessage? arg_msg = (args[0] as TestMessage?); assert(arg_msg != null, diff --git a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/CoreTests.gen.kt b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/CoreTests.gen.kt index 1b4b02915faf..e831d6bedc96 100644 --- a/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/CoreTests.gen.kt +++ b/packages/pigeon/platform_tests/test_plugin/android/src/main/kotlin/com/example/test_plugin/CoreTests.gen.kt @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon package com.example.test_plugin diff --git a/packages/pigeon/platform_tests/test_plugin/ios/Classes/CoreTests.gen.swift b/packages/pigeon/platform_tests/test_plugin/ios/Classes/CoreTests.gen.swift index da7bf02ad73b..9457c4640b46 100644 --- a/packages/pigeon/platform_tests/test_plugin/ios/Classes/CoreTests.gen.swift +++ b/packages/pigeon/platform_tests/test_plugin/ios/Classes/CoreTests.gen.swift @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation diff --git a/packages/pigeon/platform_tests/test_plugin/macos/Classes/CoreTests.gen.swift b/packages/pigeon/platform_tests/test_plugin/macos/Classes/CoreTests.gen.swift index da7bf02ad73b..9457c4640b46 100644 --- a/packages/pigeon/platform_tests/test_plugin/macos/Classes/CoreTests.gen.swift +++ b/packages/pigeon/platform_tests/test_plugin/macos/Classes/CoreTests.gen.swift @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon import Foundation diff --git a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp index fa06e6b67532..cbb5d0a8078e 100644 --- a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp +++ b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp @@ -1,8 +1,8 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon #undef _HAS_EXCEPTIONS @@ -27,25 +27,31 @@ using flutter::EncodableValue; // AllTypes -AllTypes::AllTypes(bool a_bool, int64_t an_int, int64_t an_int64, - double a_double, const std::vector& a_byte_array, - const std::vector& a4_byte_array, - const std::vector& a8_byte_array, - const std::vector& a_float_array, - const EncodableList& a_list, const EncodableMap& a_map, - const AnEnum& an_enum, const std::string& a_string) - : a_bool_(a_bool), - an_int_(an_int), - an_int64_(an_int64), - a_double_(a_double), - a_byte_array_(a_byte_array), - a4_byte_array_(a4_byte_array), - a8_byte_array_(a8_byte_array), - a_float_array_(a_float_array), - a_list_(a_list), - a_map_(a_map), - an_enum_(an_enum), - a_string_(a_string) {} +AllTypes::AllTypes( + bool a_bool, + int64_t an_int, + int64_t an_int64, + double a_double, + const std::vector& a_byte_array, + const std::vector& a4_byte_array, + const std::vector& a8_byte_array, + const std::vector& a_float_array, + const EncodableList& a_list, + const EncodableMap& a_map, + const AnEnum& an_enum, + const std::string& a_string +) : a_bool_(a_bool), + an_int_(an_int), + an_int64_(an_int64), + a_double_(a_double), + a_byte_array_(a_byte_array), + a4_byte_array_(a4_byte_array), + a8_byte_array_(a8_byte_array), + a_float_array_(a_float_array), + a_list_(a_list), + a_map_(a_map), + an_enum_(an_enum), + a_string_(a_string) {} bool AllTypes::a_bool() const { return a_bool_; } void AllTypes::set_a_bool(bool value_arg) { a_bool_ = value_arg; } @@ -59,38 +65,20 @@ void AllTypes::set_an_int64(int64_t value_arg) { an_int64_ = value_arg; } double AllTypes::a_double() const { return a_double_; } void AllTypes::set_a_double(double value_arg) { a_double_ = value_arg; } -const std::vector& AllTypes::a_byte_array() const { - return a_byte_array_; -} -void AllTypes::set_a_byte_array(const std::vector& value_arg) { - a_byte_array_ = value_arg; -} +const std::vector& AllTypes::a_byte_array() const { return a_byte_array_; } +void AllTypes::set_a_byte_array(const std::vector& value_arg) { a_byte_array_ = value_arg; } -const std::vector& AllTypes::a4_byte_array() const { - return a4_byte_array_; -} -void AllTypes::set_a4_byte_array(const std::vector& value_arg) { - a4_byte_array_ = value_arg; -} +const std::vector& AllTypes::a4_byte_array() const { return a4_byte_array_; } +void AllTypes::set_a4_byte_array(const std::vector& value_arg) { a4_byte_array_ = value_arg; } -const std::vector& AllTypes::a8_byte_array() const { - return a8_byte_array_; -} -void AllTypes::set_a8_byte_array(const std::vector& value_arg) { - a8_byte_array_ = value_arg; -} +const std::vector& AllTypes::a8_byte_array() const { return a8_byte_array_; } +void AllTypes::set_a8_byte_array(const std::vector& value_arg) { a8_byte_array_ = value_arg; } -const std::vector& AllTypes::a_float_array() const { - return a_float_array_; -} -void AllTypes::set_a_float_array(const std::vector& value_arg) { - a_float_array_ = value_arg; -} +const std::vector& AllTypes::a_float_array() const { return a_float_array_; } +void AllTypes::set_a_float_array(const std::vector& value_arg) { a_float_array_ = value_arg; } const EncodableList& AllTypes::a_list() const { return a_list_; } -void AllTypes::set_a_list(const EncodableList& value_arg) { - a_list_ = value_arg; -} +void AllTypes::set_a_list(const EncodableList& value_arg) { a_list_ = value_arg; } const EncodableMap& AllTypes::a_map() const { return a_map_; } void AllTypes::set_a_map(const EncodableMap& value_arg) { a_map_ = value_arg; } @@ -99,9 +87,7 @@ const AnEnum& AllTypes::an_enum() const { return an_enum_; } void AllTypes::set_an_enum(const AnEnum& value_arg) { an_enum_ = value_arg; } const std::string& AllTypes::a_string() const { return a_string_; } -void AllTypes::set_a_string(std::string_view value_arg) { - a_string_ = value_arg; -} +void AllTypes::set_a_string(std::string_view value_arg) { a_string_ = value_arg; } EncodableList AllTypes::ToEncodableList() const { EncodableList list; @@ -123,13 +109,18 @@ EncodableList AllTypes::ToEncodableList() const { AllTypes AllTypes::FromEncodableList(const EncodableList& list) { AllTypes decoded( - std::get(list[0]), list[1].LongValue(), list[2].LongValue(), - std::get(list[3]), std::get>(list[4]), - std::get>(list[5]), - std::get>(list[6]), - std::get>(list[7]), std::get(list[8]), - std::get(list[9]), (AnEnum)(std::get(list[10])), - std::get(list[11])); + std::get(list[0]), + list[1].LongValue(), + list[2].LongValue(), + std::get(list[3]), + std::get>(list[4]), + std::get>(list[5]), + std::get>(list[6]), + std::get>(list[7]), + std::get(list[8]), + std::get(list[9]), + (AnEnum)(std::get(list[10])), + std::get(list[11])); return decoded; } @@ -138,293 +129,119 @@ AllTypes AllTypes::FromEncodableList(const EncodableList& list) { AllNullableTypes::AllNullableTypes() {} AllNullableTypes::AllNullableTypes( - const bool* a_nullable_bool, const int64_t* a_nullable_int, - const int64_t* a_nullable_int64, const double* a_nullable_double, - const std::vector* a_nullable_byte_array, - const std::vector* a_nullable4_byte_array, - const std::vector* a_nullable8_byte_array, - const std::vector* a_nullable_float_array, - const EncodableList* a_nullable_list, const EncodableMap* a_nullable_map, - const EncodableList* nullable_nested_list, - const EncodableMap* nullable_map_with_annotations, - const EncodableMap* nullable_map_with_object, const AnEnum* a_nullable_enum, - const std::string* a_nullable_string) - : a_nullable_bool_(a_nullable_bool ? std::optional(*a_nullable_bool) - : std::nullopt), - a_nullable_int_(a_nullable_int ? std::optional(*a_nullable_int) - : std::nullopt), - a_nullable_int64_(a_nullable_int64 - ? std::optional(*a_nullable_int64) - : std::nullopt), - a_nullable_double_(a_nullable_double - ? std::optional(*a_nullable_double) - : std::nullopt), - a_nullable_byte_array_( - a_nullable_byte_array - ? std::optional>(*a_nullable_byte_array) - : std::nullopt), - a_nullable4_byte_array_( - a_nullable4_byte_array - ? std::optional>(*a_nullable4_byte_array) - : std::nullopt), - a_nullable8_byte_array_( - a_nullable8_byte_array - ? std::optional>(*a_nullable8_byte_array) - : std::nullopt), - a_nullable_float_array_( - a_nullable_float_array - ? std::optional>(*a_nullable_float_array) - : std::nullopt), - a_nullable_list_(a_nullable_list - ? std::optional(*a_nullable_list) - : std::nullopt), - a_nullable_map_(a_nullable_map - ? std::optional(*a_nullable_map) - : std::nullopt), - nullable_nested_list_(nullable_nested_list ? std::optional( - *nullable_nested_list) - : std::nullopt), - nullable_map_with_annotations_( - nullable_map_with_annotations - ? std::optional(*nullable_map_with_annotations) - : std::nullopt), - nullable_map_with_object_( - nullable_map_with_object - ? std::optional(*nullable_map_with_object) - : std::nullopt), - a_nullable_enum_(a_nullable_enum ? std::optional(*a_nullable_enum) - : std::nullopt), - a_nullable_string_(a_nullable_string - ? std::optional(*a_nullable_string) - : std::nullopt) {} - -const bool* AllNullableTypes::a_nullable_bool() const { - return a_nullable_bool_ ? &(*a_nullable_bool_) : nullptr; -} -void AllNullableTypes::set_a_nullable_bool(const bool* value_arg) { - a_nullable_bool_ = value_arg ? std::optional(*value_arg) : std::nullopt; -} -void AllNullableTypes::set_a_nullable_bool(bool value_arg) { - a_nullable_bool_ = value_arg; -} - -const int64_t* AllNullableTypes::a_nullable_int() const { - return a_nullable_int_ ? &(*a_nullable_int_) : nullptr; -} -void AllNullableTypes::set_a_nullable_int(const int64_t* value_arg) { - a_nullable_int_ = - value_arg ? std::optional(*value_arg) : std::nullopt; -} -void AllNullableTypes::set_a_nullable_int(int64_t value_arg) { - a_nullable_int_ = value_arg; -} - -const int64_t* AllNullableTypes::a_nullable_int64() const { - return a_nullable_int64_ ? &(*a_nullable_int64_) : nullptr; -} -void AllNullableTypes::set_a_nullable_int64(const int64_t* value_arg) { - a_nullable_int64_ = - value_arg ? std::optional(*value_arg) : std::nullopt; -} -void AllNullableTypes::set_a_nullable_int64(int64_t value_arg) { - a_nullable_int64_ = value_arg; -} - -const double* AllNullableTypes::a_nullable_double() const { - return a_nullable_double_ ? &(*a_nullable_double_) : nullptr; -} -void AllNullableTypes::set_a_nullable_double(const double* value_arg) { - a_nullable_double_ = - value_arg ? std::optional(*value_arg) : std::nullopt; -} -void AllNullableTypes::set_a_nullable_double(double value_arg) { - a_nullable_double_ = value_arg; -} - -const std::vector* AllNullableTypes::a_nullable_byte_array() const { - return a_nullable_byte_array_ ? &(*a_nullable_byte_array_) : nullptr; -} -void AllNullableTypes::set_a_nullable_byte_array( - const std::vector* value_arg) { - a_nullable_byte_array_ = value_arg - ? std::optional>(*value_arg) - : std::nullopt; -} -void AllNullableTypes::set_a_nullable_byte_array( - const std::vector& value_arg) { - a_nullable_byte_array_ = value_arg; -} - -const std::vector* AllNullableTypes::a_nullable4_byte_array() const { - return a_nullable4_byte_array_ ? &(*a_nullable4_byte_array_) : nullptr; -} -void AllNullableTypes::set_a_nullable4_byte_array( - const std::vector* value_arg) { - a_nullable4_byte_array_ = - value_arg ? std::optional>(*value_arg) - : std::nullopt; -} -void AllNullableTypes::set_a_nullable4_byte_array( - const std::vector& value_arg) { - a_nullable4_byte_array_ = value_arg; -} - -const std::vector* AllNullableTypes::a_nullable8_byte_array() const { - return a_nullable8_byte_array_ ? &(*a_nullable8_byte_array_) : nullptr; -} -void AllNullableTypes::set_a_nullable8_byte_array( - const std::vector* value_arg) { - a_nullable8_byte_array_ = - value_arg ? std::optional>(*value_arg) - : std::nullopt; -} -void AllNullableTypes::set_a_nullable8_byte_array( - const std::vector& value_arg) { - a_nullable8_byte_array_ = value_arg; -} - -const std::vector* AllNullableTypes::a_nullable_float_array() const { - return a_nullable_float_array_ ? &(*a_nullable_float_array_) : nullptr; -} -void AllNullableTypes::set_a_nullable_float_array( - const std::vector* value_arg) { - a_nullable_float_array_ = - value_arg ? std::optional>(*value_arg) : std::nullopt; -} -void AllNullableTypes::set_a_nullable_float_array( - const std::vector& value_arg) { - a_nullable_float_array_ = value_arg; -} - -const EncodableList* AllNullableTypes::a_nullable_list() const { - return a_nullable_list_ ? &(*a_nullable_list_) : nullptr; -} -void AllNullableTypes::set_a_nullable_list(const EncodableList* value_arg) { - a_nullable_list_ = - value_arg ? std::optional(*value_arg) : std::nullopt; -} -void AllNullableTypes::set_a_nullable_list(const EncodableList& value_arg) { - a_nullable_list_ = value_arg; -} - -const EncodableMap* AllNullableTypes::a_nullable_map() const { - return a_nullable_map_ ? &(*a_nullable_map_) : nullptr; -} -void AllNullableTypes::set_a_nullable_map(const EncodableMap* value_arg) { - a_nullable_map_ = - value_arg ? std::optional(*value_arg) : std::nullopt; -} -void AllNullableTypes::set_a_nullable_map(const EncodableMap& value_arg) { - a_nullable_map_ = value_arg; -} - -const EncodableList* AllNullableTypes::nullable_nested_list() const { - return nullable_nested_list_ ? &(*nullable_nested_list_) : nullptr; -} -void AllNullableTypes::set_nullable_nested_list( - const EncodableList* value_arg) { - nullable_nested_list_ = - value_arg ? std::optional(*value_arg) : std::nullopt; -} -void AllNullableTypes::set_nullable_nested_list( - const EncodableList& value_arg) { - nullable_nested_list_ = value_arg; -} - -const EncodableMap* AllNullableTypes::nullable_map_with_annotations() const { - return nullable_map_with_annotations_ ? &(*nullable_map_with_annotations_) - : nullptr; -} -void AllNullableTypes::set_nullable_map_with_annotations( - const EncodableMap* value_arg) { - nullable_map_with_annotations_ = - value_arg ? std::optional(*value_arg) : std::nullopt; -} -void AllNullableTypes::set_nullable_map_with_annotations( - const EncodableMap& value_arg) { - nullable_map_with_annotations_ = value_arg; -} - -const EncodableMap* AllNullableTypes::nullable_map_with_object() const { - return nullable_map_with_object_ ? &(*nullable_map_with_object_) : nullptr; -} -void AllNullableTypes::set_nullable_map_with_object( - const EncodableMap* value_arg) { - nullable_map_with_object_ = - value_arg ? std::optional(*value_arg) : std::nullopt; -} -void AllNullableTypes::set_nullable_map_with_object( - const EncodableMap& value_arg) { - nullable_map_with_object_ = value_arg; -} - -const AnEnum* AllNullableTypes::a_nullable_enum() const { - return a_nullable_enum_ ? &(*a_nullable_enum_) : nullptr; -} -void AllNullableTypes::set_a_nullable_enum(const AnEnum* value_arg) { - a_nullable_enum_ = - value_arg ? std::optional(*value_arg) : std::nullopt; -} -void AllNullableTypes::set_a_nullable_enum(const AnEnum& value_arg) { - a_nullable_enum_ = value_arg; -} - -const std::string* AllNullableTypes::a_nullable_string() const { - return a_nullable_string_ ? &(*a_nullable_string_) : nullptr; -} -void AllNullableTypes::set_a_nullable_string( - const std::string_view* value_arg) { - a_nullable_string_ = - value_arg ? std::optional(*value_arg) : std::nullopt; -} -void AllNullableTypes::set_a_nullable_string(std::string_view value_arg) { - a_nullable_string_ = value_arg; -} + const bool* a_nullable_bool, + const int64_t* a_nullable_int, + const int64_t* a_nullable_int64, + const double* a_nullable_double, + const std::vector* a_nullable_byte_array, + const std::vector* a_nullable4_byte_array, + const std::vector* a_nullable8_byte_array, + const std::vector* a_nullable_float_array, + const EncodableList* a_nullable_list, + const EncodableMap* a_nullable_map, + const EncodableList* nullable_nested_list, + const EncodableMap* nullable_map_with_annotations, + const EncodableMap* nullable_map_with_object, + const AnEnum* a_nullable_enum, + const std::string* a_nullable_string +) : a_nullable_bool_(a_nullable_bool ? std::optional(*a_nullable_bool) : std::nullopt), + a_nullable_int_(a_nullable_int ? std::optional(*a_nullable_int) : std::nullopt), + a_nullable_int64_(a_nullable_int64 ? std::optional(*a_nullable_int64) : std::nullopt), + a_nullable_double_(a_nullable_double ? std::optional(*a_nullable_double) : std::nullopt), + a_nullable_byte_array_(a_nullable_byte_array ? std::optional>(*a_nullable_byte_array) : std::nullopt), + a_nullable4_byte_array_(a_nullable4_byte_array ? std::optional>(*a_nullable4_byte_array) : std::nullopt), + a_nullable8_byte_array_(a_nullable8_byte_array ? std::optional>(*a_nullable8_byte_array) : std::nullopt), + a_nullable_float_array_(a_nullable_float_array ? std::optional>(*a_nullable_float_array) : std::nullopt), + a_nullable_list_(a_nullable_list ? std::optional(*a_nullable_list) : std::nullopt), + a_nullable_map_(a_nullable_map ? std::optional(*a_nullable_map) : std::nullopt), + nullable_nested_list_(nullable_nested_list ? std::optional(*nullable_nested_list) : std::nullopt), + nullable_map_with_annotations_(nullable_map_with_annotations ? std::optional(*nullable_map_with_annotations) : std::nullopt), + nullable_map_with_object_(nullable_map_with_object ? std::optional(*nullable_map_with_object) : std::nullopt), + a_nullable_enum_(a_nullable_enum ? std::optional(*a_nullable_enum) : std::nullopt), + a_nullable_string_(a_nullable_string ? std::optional(*a_nullable_string) : std::nullopt) {} + +const bool* AllNullableTypes::a_nullable_bool() const { return a_nullable_bool_ ? &(*a_nullable_bool_) : nullptr; } +void AllNullableTypes::set_a_nullable_bool(const bool* value_arg) { a_nullable_bool_ = value_arg ? std::optional(*value_arg) : std::nullopt; } +void AllNullableTypes::set_a_nullable_bool(bool value_arg) { a_nullable_bool_ = value_arg; } + +const int64_t* AllNullableTypes::a_nullable_int() const { return a_nullable_int_ ? &(*a_nullable_int_) : nullptr; } +void AllNullableTypes::set_a_nullable_int(const int64_t* value_arg) { a_nullable_int_ = value_arg ? std::optional(*value_arg) : std::nullopt; } +void AllNullableTypes::set_a_nullable_int(int64_t value_arg) { a_nullable_int_ = value_arg; } + +const int64_t* AllNullableTypes::a_nullable_int64() const { return a_nullable_int64_ ? &(*a_nullable_int64_) : nullptr; } +void AllNullableTypes::set_a_nullable_int64(const int64_t* value_arg) { a_nullable_int64_ = value_arg ? std::optional(*value_arg) : std::nullopt; } +void AllNullableTypes::set_a_nullable_int64(int64_t value_arg) { a_nullable_int64_ = value_arg; } + +const double* AllNullableTypes::a_nullable_double() const { return a_nullable_double_ ? &(*a_nullable_double_) : nullptr; } +void AllNullableTypes::set_a_nullable_double(const double* value_arg) { a_nullable_double_ = value_arg ? std::optional(*value_arg) : std::nullopt; } +void AllNullableTypes::set_a_nullable_double(double value_arg) { a_nullable_double_ = value_arg; } + +const std::vector* AllNullableTypes::a_nullable_byte_array() const { return a_nullable_byte_array_ ? &(*a_nullable_byte_array_) : nullptr; } +void AllNullableTypes::set_a_nullable_byte_array(const std::vector* value_arg) { a_nullable_byte_array_ = value_arg ? std::optional>(*value_arg) : std::nullopt; } +void AllNullableTypes::set_a_nullable_byte_array(const std::vector& value_arg) { a_nullable_byte_array_ = value_arg; } + +const std::vector* AllNullableTypes::a_nullable4_byte_array() const { return a_nullable4_byte_array_ ? &(*a_nullable4_byte_array_) : nullptr; } +void AllNullableTypes::set_a_nullable4_byte_array(const std::vector* value_arg) { a_nullable4_byte_array_ = value_arg ? std::optional>(*value_arg) : std::nullopt; } +void AllNullableTypes::set_a_nullable4_byte_array(const std::vector& value_arg) { a_nullable4_byte_array_ = value_arg; } + +const std::vector* AllNullableTypes::a_nullable8_byte_array() const { return a_nullable8_byte_array_ ? &(*a_nullable8_byte_array_) : nullptr; } +void AllNullableTypes::set_a_nullable8_byte_array(const std::vector* value_arg) { a_nullable8_byte_array_ = value_arg ? std::optional>(*value_arg) : std::nullopt; } +void AllNullableTypes::set_a_nullable8_byte_array(const std::vector& value_arg) { a_nullable8_byte_array_ = value_arg; } + +const std::vector* AllNullableTypes::a_nullable_float_array() const { return a_nullable_float_array_ ? &(*a_nullable_float_array_) : nullptr; } +void AllNullableTypes::set_a_nullable_float_array(const std::vector* value_arg) { a_nullable_float_array_ = value_arg ? std::optional>(*value_arg) : std::nullopt; } +void AllNullableTypes::set_a_nullable_float_array(const std::vector& value_arg) { a_nullable_float_array_ = value_arg; } + +const EncodableList* AllNullableTypes::a_nullable_list() const { return a_nullable_list_ ? &(*a_nullable_list_) : nullptr; } +void AllNullableTypes::set_a_nullable_list(const EncodableList* value_arg) { a_nullable_list_ = value_arg ? std::optional(*value_arg) : std::nullopt; } +void AllNullableTypes::set_a_nullable_list(const EncodableList& value_arg) { a_nullable_list_ = value_arg; } + +const EncodableMap* AllNullableTypes::a_nullable_map() const { return a_nullable_map_ ? &(*a_nullable_map_) : nullptr; } +void AllNullableTypes::set_a_nullable_map(const EncodableMap* value_arg) { a_nullable_map_ = value_arg ? std::optional(*value_arg) : std::nullopt; } +void AllNullableTypes::set_a_nullable_map(const EncodableMap& value_arg) { a_nullable_map_ = value_arg; } + +const EncodableList* AllNullableTypes::nullable_nested_list() const { return nullable_nested_list_ ? &(*nullable_nested_list_) : nullptr; } +void AllNullableTypes::set_nullable_nested_list(const EncodableList* value_arg) { nullable_nested_list_ = value_arg ? std::optional(*value_arg) : std::nullopt; } +void AllNullableTypes::set_nullable_nested_list(const EncodableList& value_arg) { nullable_nested_list_ = value_arg; } + +const EncodableMap* AllNullableTypes::nullable_map_with_annotations() const { return nullable_map_with_annotations_ ? &(*nullable_map_with_annotations_) : nullptr; } +void AllNullableTypes::set_nullable_map_with_annotations(const EncodableMap* value_arg) { nullable_map_with_annotations_ = value_arg ? std::optional(*value_arg) : std::nullopt; } +void AllNullableTypes::set_nullable_map_with_annotations(const EncodableMap& value_arg) { nullable_map_with_annotations_ = value_arg; } + +const EncodableMap* AllNullableTypes::nullable_map_with_object() const { return nullable_map_with_object_ ? &(*nullable_map_with_object_) : nullptr; } +void AllNullableTypes::set_nullable_map_with_object(const EncodableMap* value_arg) { nullable_map_with_object_ = value_arg ? std::optional(*value_arg) : std::nullopt; } +void AllNullableTypes::set_nullable_map_with_object(const EncodableMap& value_arg) { nullable_map_with_object_ = value_arg; } + +const AnEnum* AllNullableTypes::a_nullable_enum() const { return a_nullable_enum_ ? &(*a_nullable_enum_) : nullptr; } +void AllNullableTypes::set_a_nullable_enum(const AnEnum* value_arg) { a_nullable_enum_ = value_arg ? std::optional(*value_arg) : std::nullopt; } +void AllNullableTypes::set_a_nullable_enum(const AnEnum& value_arg) { a_nullable_enum_ = value_arg; } + +const std::string* AllNullableTypes::a_nullable_string() const { return a_nullable_string_ ? &(*a_nullable_string_) : nullptr; } +void AllNullableTypes::set_a_nullable_string(const std::string_view* value_arg) { a_nullable_string_ = value_arg ? std::optional(*value_arg) : std::nullopt; } +void AllNullableTypes::set_a_nullable_string(std::string_view value_arg) { a_nullable_string_ = value_arg; } EncodableList AllNullableTypes::ToEncodableList() const { EncodableList list; list.reserve(15); - list.push_back(a_nullable_bool_ ? EncodableValue(*a_nullable_bool_) - : EncodableValue()); - list.push_back(a_nullable_int_ ? EncodableValue(*a_nullable_int_) - : EncodableValue()); - list.push_back(a_nullable_int64_ ? EncodableValue(*a_nullable_int64_) - : EncodableValue()); - list.push_back(a_nullable_double_ ? EncodableValue(*a_nullable_double_) - : EncodableValue()); - list.push_back(a_nullable_byte_array_ - ? EncodableValue(*a_nullable_byte_array_) - : EncodableValue()); - list.push_back(a_nullable4_byte_array_ - ? EncodableValue(*a_nullable4_byte_array_) - : EncodableValue()); - list.push_back(a_nullable8_byte_array_ - ? EncodableValue(*a_nullable8_byte_array_) - : EncodableValue()); - list.push_back(a_nullable_float_array_ - ? EncodableValue(*a_nullable_float_array_) - : EncodableValue()); - list.push_back(a_nullable_list_ ? EncodableValue(*a_nullable_list_) - : EncodableValue()); - list.push_back(a_nullable_map_ ? EncodableValue(*a_nullable_map_) - : EncodableValue()); - list.push_back(nullable_nested_list_ ? EncodableValue(*nullable_nested_list_) - : EncodableValue()); - list.push_back(nullable_map_with_annotations_ - ? EncodableValue(*nullable_map_with_annotations_) - : EncodableValue()); - list.push_back(nullable_map_with_object_ - ? EncodableValue(*nullable_map_with_object_) - : EncodableValue()); - list.push_back(a_nullable_enum_ ? EncodableValue((int)(*a_nullable_enum_)) - : EncodableValue()); - list.push_back(a_nullable_string_ ? EncodableValue(*a_nullable_string_) - : EncodableValue()); + list.push_back(a_nullable_bool_ ? EncodableValue(*a_nullable_bool_) : EncodableValue()); + list.push_back(a_nullable_int_ ? EncodableValue(*a_nullable_int_) : EncodableValue()); + list.push_back(a_nullable_int64_ ? EncodableValue(*a_nullable_int64_) : EncodableValue()); + list.push_back(a_nullable_double_ ? EncodableValue(*a_nullable_double_) : EncodableValue()); + list.push_back(a_nullable_byte_array_ ? EncodableValue(*a_nullable_byte_array_) : EncodableValue()); + list.push_back(a_nullable4_byte_array_ ? EncodableValue(*a_nullable4_byte_array_) : EncodableValue()); + list.push_back(a_nullable8_byte_array_ ? EncodableValue(*a_nullable8_byte_array_) : EncodableValue()); + list.push_back(a_nullable_float_array_ ? EncodableValue(*a_nullable_float_array_) : EncodableValue()); + list.push_back(a_nullable_list_ ? EncodableValue(*a_nullable_list_) : EncodableValue()); + list.push_back(a_nullable_map_ ? EncodableValue(*a_nullable_map_) : EncodableValue()); + list.push_back(nullable_nested_list_ ? EncodableValue(*nullable_nested_list_) : EncodableValue()); + list.push_back(nullable_map_with_annotations_ ? EncodableValue(*nullable_map_with_annotations_) : EncodableValue()); + list.push_back(nullable_map_with_object_ ? EncodableValue(*nullable_map_with_object_) : EncodableValue()); + list.push_back(a_nullable_enum_ ? EncodableValue((int)(*a_nullable_enum_)) : EncodableValue()); + list.push_back(a_nullable_string_ ? EncodableValue(*a_nullable_string_) : EncodableValue()); return list; } -AllNullableTypes AllNullableTypes::FromEncodableList( - const EncodableList& list) { +AllNullableTypes AllNullableTypes::FromEncodableList(const EncodableList& list) { AllNullableTypes decoded; auto& encodable_a_nullable_bool = list[0]; if (!encodable_a_nullable_bool.IsNull()) { @@ -440,78 +257,63 @@ AllNullableTypes AllNullableTypes::FromEncodableList( } auto& encodable_a_nullable_double = list[3]; if (!encodable_a_nullable_double.IsNull()) { - decoded.set_a_nullable_double( - std::get(encodable_a_nullable_double)); + decoded.set_a_nullable_double(std::get(encodable_a_nullable_double)); } auto& encodable_a_nullable_byte_array = list[4]; if (!encodable_a_nullable_byte_array.IsNull()) { - decoded.set_a_nullable_byte_array( - std::get>(encodable_a_nullable_byte_array)); + decoded.set_a_nullable_byte_array(std::get>(encodable_a_nullable_byte_array)); } auto& encodable_a_nullable4_byte_array = list[5]; if (!encodable_a_nullable4_byte_array.IsNull()) { - decoded.set_a_nullable4_byte_array( - std::get>(encodable_a_nullable4_byte_array)); + decoded.set_a_nullable4_byte_array(std::get>(encodable_a_nullable4_byte_array)); } auto& encodable_a_nullable8_byte_array = list[6]; if (!encodable_a_nullable8_byte_array.IsNull()) { - decoded.set_a_nullable8_byte_array( - std::get>(encodable_a_nullable8_byte_array)); + decoded.set_a_nullable8_byte_array(std::get>(encodable_a_nullable8_byte_array)); } auto& encodable_a_nullable_float_array = list[7]; if (!encodable_a_nullable_float_array.IsNull()) { - decoded.set_a_nullable_float_array( - std::get>(encodable_a_nullable_float_array)); + decoded.set_a_nullable_float_array(std::get>(encodable_a_nullable_float_array)); } auto& encodable_a_nullable_list = list[8]; if (!encodable_a_nullable_list.IsNull()) { - decoded.set_a_nullable_list( - std::get(encodable_a_nullable_list)); + decoded.set_a_nullable_list(std::get(encodable_a_nullable_list)); } auto& encodable_a_nullable_map = list[9]; if (!encodable_a_nullable_map.IsNull()) { - decoded.set_a_nullable_map( - std::get(encodable_a_nullable_map)); + decoded.set_a_nullable_map(std::get(encodable_a_nullable_map)); } auto& encodable_nullable_nested_list = list[10]; if (!encodable_nullable_nested_list.IsNull()) { - decoded.set_nullable_nested_list( - std::get(encodable_nullable_nested_list)); + decoded.set_nullable_nested_list(std::get(encodable_nullable_nested_list)); } auto& encodable_nullable_map_with_annotations = list[11]; if (!encodable_nullable_map_with_annotations.IsNull()) { - decoded.set_nullable_map_with_annotations( - std::get(encodable_nullable_map_with_annotations)); + decoded.set_nullable_map_with_annotations(std::get(encodable_nullable_map_with_annotations)); } auto& encodable_nullable_map_with_object = list[12]; if (!encodable_nullable_map_with_object.IsNull()) { - decoded.set_nullable_map_with_object( - std::get(encodable_nullable_map_with_object)); + decoded.set_nullable_map_with_object(std::get(encodable_nullable_map_with_object)); } auto& encodable_a_nullable_enum = list[13]; if (!encodable_a_nullable_enum.IsNull()) { - decoded.set_a_nullable_enum( - (AnEnum)(std::get(encodable_a_nullable_enum))); + decoded.set_a_nullable_enum((AnEnum)(std::get(encodable_a_nullable_enum))); } auto& encodable_a_nullable_string = list[14]; if (!encodable_a_nullable_string.IsNull()) { - decoded.set_a_nullable_string( - std::get(encodable_a_nullable_string)); + decoded.set_a_nullable_string(std::get(encodable_a_nullable_string)); } return decoded; } // AllNullableTypesWrapper -AllNullableTypesWrapper::AllNullableTypesWrapper(const AllNullableTypes& values) - : values_(values) {} +AllNullableTypesWrapper::AllNullableTypesWrapper( + const AllNullableTypes& values +) : values_(values) {} -const AllNullableTypes& AllNullableTypesWrapper::values() const { - return values_; -} -void AllNullableTypesWrapper::set_values(const AllNullableTypes& value_arg) { - values_ = value_arg; -} +const AllNullableTypes& AllNullableTypesWrapper::values() const { return values_; } +void AllNullableTypesWrapper::set_values(const AllNullableTypes& value_arg) { values_ = value_arg; } EncodableList AllNullableTypesWrapper::ToEncodableList() const { EncodableList list; @@ -520,10 +322,9 @@ EncodableList AllNullableTypesWrapper::ToEncodableList() const { return list; } -AllNullableTypesWrapper AllNullableTypesWrapper::FromEncodableList( - const EncodableList& list) { +AllNullableTypesWrapper AllNullableTypesWrapper::FromEncodableList(const EncodableList& list) { AllNullableTypesWrapper decoded( - AllNullableTypes::FromEncodableList(std::get(list[0]))); + AllNullableTypes::FromEncodableList(std::get(list[0]))); return decoded; } @@ -531,20 +332,13 @@ AllNullableTypesWrapper AllNullableTypesWrapper::FromEncodableList( TestMessage::TestMessage() {} -TestMessage::TestMessage(const EncodableList* test_list) - : test_list_(test_list ? std::optional(*test_list) - : std::nullopt) {} +TestMessage::TestMessage( + const EncodableList* test_list +) : test_list_(test_list ? std::optional(*test_list) : std::nullopt) {} -const EncodableList* TestMessage::test_list() const { - return test_list_ ? &(*test_list_) : nullptr; -} -void TestMessage::set_test_list(const EncodableList* value_arg) { - test_list_ = - value_arg ? std::optional(*value_arg) : std::nullopt; -} -void TestMessage::set_test_list(const EncodableList& value_arg) { - test_list_ = value_arg; -} +const EncodableList* TestMessage::test_list() const { return test_list_ ? &(*test_list_) : nullptr; } +void TestMessage::set_test_list(const EncodableList* value_arg) { test_list_ = value_arg ? std::optional(*value_arg) : std::nullopt; } +void TestMessage::set_test_list(const EncodableList& value_arg) { test_list_ = value_arg; } EncodableList TestMessage::ToEncodableList() const { EncodableList list; @@ -562,61 +356,42 @@ TestMessage TestMessage::FromEncodableList(const EncodableList& list) { return decoded; } -HostIntegrationCoreApiCodecSerializer::HostIntegrationCoreApiCodecSerializer() { -} -EncodableValue HostIntegrationCoreApiCodecSerializer::ReadValueOfType( - uint8_t type, flutter::ByteStreamReader* stream) const { +HostIntegrationCoreApiCodecSerializer::HostIntegrationCoreApiCodecSerializer() {} +EncodableValue HostIntegrationCoreApiCodecSerializer::ReadValueOfType(uint8_t type, flutter::ByteStreamReader* stream) const { switch (type) { case 128: - return CustomEncodableValue(AllNullableTypes::FromEncodableList( - std::get(ReadValue(stream)))); + return CustomEncodableValue(AllNullableTypes::FromEncodableList(std::get(ReadValue(stream)))); case 129: - return CustomEncodableValue(AllNullableTypesWrapper::FromEncodableList( - std::get(ReadValue(stream)))); + return CustomEncodableValue(AllNullableTypesWrapper::FromEncodableList(std::get(ReadValue(stream)))); case 130: - return CustomEncodableValue(AllTypes::FromEncodableList( - std::get(ReadValue(stream)))); + return CustomEncodableValue(AllTypes::FromEncodableList(std::get(ReadValue(stream)))); case 131: - return CustomEncodableValue(TestMessage::FromEncodableList( - std::get(ReadValue(stream)))); + return CustomEncodableValue(TestMessage::FromEncodableList(std::get(ReadValue(stream)))); default: return flutter::StandardCodecSerializer::ReadValueOfType(type, stream); } } -void HostIntegrationCoreApiCodecSerializer::WriteValue( - const EncodableValue& value, flutter::ByteStreamWriter* stream) const { - if (const CustomEncodableValue* custom_value = - std::get_if(&value)) { +void HostIntegrationCoreApiCodecSerializer::WriteValue(const EncodableValue& value, flutter::ByteStreamWriter* stream) const { + if (const CustomEncodableValue* custom_value = std::get_if(&value)) { if (custom_value->type() == typeid(AllNullableTypes)) { stream->WriteByte(128); - WriteValue( - EncodableValue( - std::any_cast(*custom_value).ToEncodableList()), - stream); + WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); return; } if (custom_value->type() == typeid(AllNullableTypesWrapper)) { stream->WriteByte(129); - WriteValue( - EncodableValue(std::any_cast(*custom_value) - .ToEncodableList()), - stream); + WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); return; } if (custom_value->type() == typeid(AllTypes)) { stream->WriteByte(130); - WriteValue(EncodableValue( - std::any_cast(*custom_value).ToEncodableList()), - stream); + WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); return; } if (custom_value->type() == typeid(TestMessage)) { stream->WriteByte(131); - WriteValue( - EncodableValue( - std::any_cast(*custom_value).ToEncodableList()), - stream); + WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); return; } } @@ -625,2980 +400,2222 @@ void HostIntegrationCoreApiCodecSerializer::WriteValue( /// The codec used by HostIntegrationCoreApi. const flutter::StandardMessageCodec& HostIntegrationCoreApi::GetCodec() { - return flutter::StandardMessageCodec::GetInstance( - &HostIntegrationCoreApiCodecSerializer::GetInstance()); -} - -// Sets up an instance of `HostIntegrationCoreApi` to handle messages through -// the `binary_messenger`. -void HostIntegrationCoreApi::SetUp(flutter::BinaryMessenger* binary_messenger, - HostIntegrationCoreApi* api) { - { - auto channel = std::make_unique>( - binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.noop", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - std::optional output = api->Noop(); - if (output.has_value()) { - reply(WrapError(output.value())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue()); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + return flutter::StandardMessageCodec::GetInstance(&HostIntegrationCoreApiCodecSerializer::GetInstance()); +} + +// Sets up an instance of `HostIntegrationCoreApi` to handle messages through the `binary_messenger`. +void HostIntegrationCoreApi::SetUp(flutter::BinaryMessenger* binary_messenger, HostIntegrationCoreApi* api) { + { + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.noop", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + std::optional output = api->Noop(); + if (output.has_value()) { + reply(WrapError(output.value())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue()); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAllTypes", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_everything_arg = args.at(0); - if (encodable_everything_arg.IsNull()) { - reply(WrapError("everything_arg unexpectedly null.")); - return; - } - const auto& everything_arg = std::any_cast( - std::get(encodable_everything_arg)); - ErrorOr output = api->EchoAllTypes(everything_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - CustomEncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAllTypes", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_everything_arg = args.at(0); + if (encodable_everything_arg.IsNull()) { + reply(WrapError("everything_arg unexpectedly null.")); + return; + } + const auto& everything_arg = std::any_cast(std::get(encodable_everything_arg)); + ErrorOr output = api->EchoAllTypes(everything_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(CustomEncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.throwError", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - ErrorOr> output = api->ThrowError(); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwError", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + ErrorOr> output = api->ThrowError(); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.throwErrorFromVoid", - &GetCodec()); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwErrorFromVoid", &GetCodec()); if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - std::optional output = api->ThrowErrorFromVoid(); - if (output.has_value()) { - reply(WrapError(output.value())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue()); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + std::optional output = api->ThrowErrorFromVoid(); + if (output.has_value()) { + reply(WrapError(output.value())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue()); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.throwFlutterError", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - ErrorOr> output = - api->ThrowFlutterError(); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwFlutterError", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + ErrorOr> output = api->ThrowFlutterError(); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoInt", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_an_int_arg = args.at(0); - if (encodable_an_int_arg.IsNull()) { - reply(WrapError("an_int_arg unexpectedly null.")); - return; - } - const int64_t an_int_arg = encodable_an_int_arg.LongValue(); - ErrorOr output = api->EchoInt(an_int_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoInt", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_an_int_arg = args.at(0); + if (encodable_an_int_arg.IsNull()) { + reply(WrapError("an_int_arg unexpectedly null.")); + return; + } + const int64_t an_int_arg = encodable_an_int_arg.LongValue(); + ErrorOr output = api->EchoInt(an_int_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoDouble", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_double_arg = args.at(0); - if (encodable_a_double_arg.IsNull()) { - reply(WrapError("a_double_arg unexpectedly null.")); - return; - } - const auto& a_double_arg = - std::get(encodable_a_double_arg); - ErrorOr output = api->EchoDouble(a_double_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoDouble", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_double_arg = args.at(0); + if (encodable_a_double_arg.IsNull()) { + reply(WrapError("a_double_arg unexpectedly null.")); + return; + } + const auto& a_double_arg = std::get(encodable_a_double_arg); + ErrorOr output = api->EchoDouble(a_double_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoBool", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_bool_arg = args.at(0); - if (encodable_a_bool_arg.IsNull()) { - reply(WrapError("a_bool_arg unexpectedly null.")); - return; - } - const auto& a_bool_arg = std::get(encodable_a_bool_arg); - ErrorOr output = api->EchoBool(a_bool_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoBool", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_bool_arg = args.at(0); + if (encodable_a_bool_arg.IsNull()) { + reply(WrapError("a_bool_arg unexpectedly null.")); + return; + } + const auto& a_bool_arg = std::get(encodable_a_bool_arg); + ErrorOr output = api->EchoBool(a_bool_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoString", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_string_arg = args.at(0); - if (encodable_a_string_arg.IsNull()) { - reply(WrapError("a_string_arg unexpectedly null.")); - return; - } - const auto& a_string_arg = - std::get(encodable_a_string_arg); - ErrorOr output = api->EchoString(a_string_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoString", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_string_arg = args.at(0); + if (encodable_a_string_arg.IsNull()) { + reply(WrapError("a_string_arg unexpectedly null.")); + return; + } + const auto& a_string_arg = std::get(encodable_a_string_arg); + ErrorOr output = api->EchoString(a_string_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoUint8List", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_uint8_list_arg = args.at(0); - if (encodable_a_uint8_list_arg.IsNull()) { - reply(WrapError("a_uint8_list_arg unexpectedly null.")); - return; - } - const auto& a_uint8_list_arg = - std::get>(encodable_a_uint8_list_arg); - ErrorOr> output = - api->EchoUint8List(a_uint8_list_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoUint8List", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_uint8_list_arg = args.at(0); + if (encodable_a_uint8_list_arg.IsNull()) { + reply(WrapError("a_uint8_list_arg unexpectedly null.")); + return; + } + const auto& a_uint8_list_arg = std::get>(encodable_a_uint8_list_arg); + ErrorOr> output = api->EchoUint8List(a_uint8_list_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoObject", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_an_object_arg = args.at(0); - if (encodable_an_object_arg.IsNull()) { - reply(WrapError("an_object_arg unexpectedly null.")); - return; - } - const auto& an_object_arg = encodable_an_object_arg; - ErrorOr output = api->EchoObject(an_object_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoObject", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_an_object_arg = args.at(0); + if (encodable_an_object_arg.IsNull()) { + reply(WrapError("an_object_arg unexpectedly null.")); + return; + } + const auto& an_object_arg = encodable_an_object_arg; + ErrorOr output = api->EchoObject(an_object_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoList", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_list_arg = args.at(0); - if (encodable_a_list_arg.IsNull()) { - reply(WrapError("a_list_arg unexpectedly null.")); - return; - } - const auto& a_list_arg = - std::get(encodable_a_list_arg); - ErrorOr output = api->EchoList(a_list_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoList", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_list_arg = args.at(0); + if (encodable_a_list_arg.IsNull()) { + reply(WrapError("a_list_arg unexpectedly null.")); + return; + } + const auto& a_list_arg = std::get(encodable_a_list_arg); + ErrorOr output = api->EchoList(a_list_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoMap", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_map_arg = args.at(0); - if (encodable_a_map_arg.IsNull()) { - reply(WrapError("a_map_arg unexpectedly null.")); - return; - } - const auto& a_map_arg = - std::get(encodable_a_map_arg); - ErrorOr output = api->EchoMap(a_map_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoMap", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_map_arg = args.at(0); + if (encodable_a_map_arg.IsNull()) { + reply(WrapError("a_map_arg unexpectedly null.")); + return; + } + const auto& a_map_arg = std::get(encodable_a_map_arg); + ErrorOr output = api->EchoMap(a_map_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAllNullableTypes", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_everything_arg = args.at(0); - const auto* everything_arg = - &(std::any_cast( - std::get( - encodable_everything_arg))); - ErrorOr> output = - api->EchoAllNullableTypes(everything_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - CustomEncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAllNullableTypes", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_everything_arg = args.at(0); + const auto* everything_arg = &(std::any_cast(std::get(encodable_everything_arg))); + ErrorOr> output = api->EchoAllNullableTypes(everything_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(CustomEncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_wrapper_arg = args.at(0); - if (encodable_wrapper_arg.IsNull()) { - reply(WrapError("wrapper_arg unexpectedly null.")); - return; - } - const auto& wrapper_arg = - std::any_cast( - std::get(encodable_wrapper_arg)); - ErrorOr> output = - api->ExtractNestedNullableString(wrapper_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_wrapper_arg = args.at(0); + if (encodable_wrapper_arg.IsNull()) { + reply(WrapError("wrapper_arg unexpectedly null.")); + return; + } + const auto& wrapper_arg = std::any_cast(std::get(encodable_wrapper_arg)); + ErrorOr> output = api->ExtractNestedNullableString(wrapper_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_nullable_string_arg = args.at(0); - const auto* nullable_string_arg = - std::get_if(&encodable_nullable_string_arg); - ErrorOr output = - api->CreateNestedNullableString(nullable_string_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - CustomEncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_nullable_string_arg = args.at(0); + const auto* nullable_string_arg = std::get_if(&encodable_nullable_string_arg); + ErrorOr output = api->CreateNestedNullableString(nullable_string_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(CustomEncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_bool_arg = args.at(0); - const auto* a_nullable_bool_arg = - std::get_if(&encodable_a_nullable_bool_arg); - const auto& encodable_a_nullable_int_arg = args.at(1); - const int64_t a_nullable_int_arg_value = - encodable_a_nullable_int_arg.IsNull() - ? 0 - : encodable_a_nullable_int_arg.LongValue(); - const auto* a_nullable_int_arg = - encodable_a_nullable_int_arg.IsNull() - ? nullptr - : &a_nullable_int_arg_value; - const auto& encodable_a_nullable_string_arg = args.at(2); - const auto* a_nullable_string_arg = - std::get_if(&encodable_a_nullable_string_arg); - ErrorOr output = api->SendMultipleNullableTypes( - a_nullable_bool_arg, a_nullable_int_arg, - a_nullable_string_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - CustomEncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_bool_arg = args.at(0); + const auto* a_nullable_bool_arg = std::get_if(&encodable_a_nullable_bool_arg); + const auto& encodable_a_nullable_int_arg = args.at(1); + const int64_t a_nullable_int_arg_value = encodable_a_nullable_int_arg.IsNull() ? 0 : encodable_a_nullable_int_arg.LongValue(); + const auto* a_nullable_int_arg = encodable_a_nullable_int_arg.IsNull() ? nullptr : &a_nullable_int_arg_value; + const auto& encodable_a_nullable_string_arg = args.at(2); + const auto* a_nullable_string_arg = std::get_if(&encodable_a_nullable_string_arg); + ErrorOr output = api->SendMultipleNullableTypes(a_nullable_bool_arg, a_nullable_int_arg, a_nullable_string_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(CustomEncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableInt", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_int_arg = args.at(0); - const int64_t a_nullable_int_arg_value = - encodable_a_nullable_int_arg.IsNull() - ? 0 - : encodable_a_nullable_int_arg.LongValue(); - const auto* a_nullable_int_arg = - encodable_a_nullable_int_arg.IsNull() - ? nullptr - : &a_nullable_int_arg_value; - ErrorOr> output = - api->EchoNullableInt(a_nullable_int_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableInt", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_int_arg = args.at(0); + const int64_t a_nullable_int_arg_value = encodable_a_nullable_int_arg.IsNull() ? 0 : encodable_a_nullable_int_arg.LongValue(); + const auto* a_nullable_int_arg = encodable_a_nullable_int_arg.IsNull() ? nullptr : &a_nullable_int_arg_value; + ErrorOr> output = api->EchoNullableInt(a_nullable_int_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableDouble", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_double_arg = args.at(0); - const auto* a_nullable_double_arg = - std::get_if(&encodable_a_nullable_double_arg); - ErrorOr> output = - api->EchoNullableDouble(a_nullable_double_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableDouble", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_double_arg = args.at(0); + const auto* a_nullable_double_arg = std::get_if(&encodable_a_nullable_double_arg); + ErrorOr> output = api->EchoNullableDouble(a_nullable_double_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableBool", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_bool_arg = args.at(0); - const auto* a_nullable_bool_arg = - std::get_if(&encodable_a_nullable_bool_arg); - ErrorOr> output = - api->EchoNullableBool(a_nullable_bool_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableBool", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_bool_arg = args.at(0); + const auto* a_nullable_bool_arg = std::get_if(&encodable_a_nullable_bool_arg); + ErrorOr> output = api->EchoNullableBool(a_nullable_bool_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableString", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_string_arg = args.at(0); - const auto* a_nullable_string_arg = - std::get_if(&encodable_a_nullable_string_arg); - ErrorOr> output = - api->EchoNullableString(a_nullable_string_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableString", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_string_arg = args.at(0); + const auto* a_nullable_string_arg = std::get_if(&encodable_a_nullable_string_arg); + ErrorOr> output = api->EchoNullableString(a_nullable_string_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_uint8_list_arg = args.at(0); - const auto* a_nullable_uint8_list_arg = - std::get_if>( - &encodable_a_nullable_uint8_list_arg); - ErrorOr>> output = - api->EchoNullableUint8List(a_nullable_uint8_list_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_uint8_list_arg = args.at(0); + const auto* a_nullable_uint8_list_arg = std::get_if>(&encodable_a_nullable_uint8_list_arg); + ErrorOr>> output = api->EchoNullableUint8List(a_nullable_uint8_list_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableObject", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_object_arg = args.at(0); - const auto* a_nullable_object_arg = - &encodable_a_nullable_object_arg; - ErrorOr> output = - api->EchoNullableObject(a_nullable_object_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableObject", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_object_arg = args.at(0); + const auto* a_nullable_object_arg = &encodable_a_nullable_object_arg; + ErrorOr> output = api->EchoNullableObject(a_nullable_object_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableList", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_list_arg = args.at(0); - const auto* a_nullable_list_arg = - std::get_if(&encodable_a_nullable_list_arg); - ErrorOr> output = - api->EchoNullableList(a_nullable_list_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableList", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_list_arg = args.at(0); + const auto* a_nullable_list_arg = std::get_if(&encodable_a_nullable_list_arg); + ErrorOr> output = api->EchoNullableList(a_nullable_list_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableMap", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_map_arg = args.at(0); - const auto* a_nullable_map_arg = - std::get_if(&encodable_a_nullable_map_arg); - ErrorOr> output = - api->EchoNullableMap(a_nullable_map_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableMap", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_map_arg = args.at(0); + const auto* a_nullable_map_arg = std::get_if(&encodable_a_nullable_map_arg); + ErrorOr> output = api->EchoNullableMap(a_nullable_map_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.noopAsync", - &GetCodec()); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.noopAsync", &GetCodec()); if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - api->NoopAsync([reply](std::optional&& output) { - if (output.has_value()) { - reply(WrapError(output.value())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue()); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + api->NoopAsync([reply](std::optional&& output) { + if (output.has_value()) { + reply(WrapError(output.value())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue()); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncInt", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_an_int_arg = args.at(0); - if (encodable_an_int_arg.IsNull()) { - reply(WrapError("an_int_arg unexpectedly null.")); - return; - } - const int64_t an_int_arg = encodable_an_int_arg.LongValue(); - api->EchoAsyncInt(an_int_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncInt", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_an_int_arg = args.at(0); + if (encodable_an_int_arg.IsNull()) { + reply(WrapError("an_int_arg unexpectedly null.")); + return; + } + const int64_t an_int_arg = encodable_an_int_arg.LongValue(); + api->EchoAsyncInt(an_int_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncDouble", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_double_arg = args.at(0); - if (encodable_a_double_arg.IsNull()) { - reply(WrapError("a_double_arg unexpectedly null.")); - return; - } - const auto& a_double_arg = - std::get(encodable_a_double_arg); - api->EchoAsyncDouble( - a_double_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncDouble", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_double_arg = args.at(0); + if (encodable_a_double_arg.IsNull()) { + reply(WrapError("a_double_arg unexpectedly null.")); + return; + } + const auto& a_double_arg = std::get(encodable_a_double_arg); + api->EchoAsyncDouble(a_double_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncBool", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_bool_arg = args.at(0); - if (encodable_a_bool_arg.IsNull()) { - reply(WrapError("a_bool_arg unexpectedly null.")); - return; - } - const auto& a_bool_arg = std::get(encodable_a_bool_arg); - api->EchoAsyncBool(a_bool_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncBool", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_bool_arg = args.at(0); + if (encodable_a_bool_arg.IsNull()) { + reply(WrapError("a_bool_arg unexpectedly null.")); + return; + } + const auto& a_bool_arg = std::get(encodable_a_bool_arg); + api->EchoAsyncBool(a_bool_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncString", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_string_arg = args.at(0); - if (encodable_a_string_arg.IsNull()) { - reply(WrapError("a_string_arg unexpectedly null.")); - return; - } - const auto& a_string_arg = - std::get(encodable_a_string_arg); - api->EchoAsyncString( - a_string_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncString", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_string_arg = args.at(0); + if (encodable_a_string_arg.IsNull()) { + reply(WrapError("a_string_arg unexpectedly null.")); + return; + } + const auto& a_string_arg = std::get(encodable_a_string_arg); + api->EchoAsyncString(a_string_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncUint8List", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_uint8_list_arg = args.at(0); - if (encodable_a_uint8_list_arg.IsNull()) { - reply(WrapError("a_uint8_list_arg unexpectedly null.")); - return; - } - const auto& a_uint8_list_arg = - std::get>(encodable_a_uint8_list_arg); - api->EchoAsyncUint8List( - a_uint8_list_arg, - [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncUint8List", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_uint8_list_arg = args.at(0); + if (encodable_a_uint8_list_arg.IsNull()) { + reply(WrapError("a_uint8_list_arg unexpectedly null.")); + return; + } + const auto& a_uint8_list_arg = std::get>(encodable_a_uint8_list_arg); + api->EchoAsyncUint8List(a_uint8_list_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncObject", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_an_object_arg = args.at(0); - if (encodable_an_object_arg.IsNull()) { - reply(WrapError("an_object_arg unexpectedly null.")); - return; - } - const auto& an_object_arg = encodable_an_object_arg; - api->EchoAsyncObject( - an_object_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncObject", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_an_object_arg = args.at(0); + if (encodable_an_object_arg.IsNull()) { + reply(WrapError("an_object_arg unexpectedly null.")); + return; + } + const auto& an_object_arg = encodable_an_object_arg; + api->EchoAsyncObject(an_object_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncList", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_list_arg = args.at(0); - if (encodable_a_list_arg.IsNull()) { - reply(WrapError("a_list_arg unexpectedly null.")); - return; - } - const auto& a_list_arg = - std::get(encodable_a_list_arg); - api->EchoAsyncList( - a_list_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncList", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_list_arg = args.at(0); + if (encodable_a_list_arg.IsNull()) { + reply(WrapError("a_list_arg unexpectedly null.")); + return; + } + const auto& a_list_arg = std::get(encodable_a_list_arg); + api->EchoAsyncList(a_list_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncMap", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_map_arg = args.at(0); - if (encodable_a_map_arg.IsNull()) { - reply(WrapError("a_map_arg unexpectedly null.")); - return; - } - const auto& a_map_arg = - std::get(encodable_a_map_arg); - api->EchoAsyncMap( - a_map_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncMap", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_map_arg = args.at(0); + if (encodable_a_map_arg.IsNull()) { + reply(WrapError("a_map_arg unexpectedly null.")); + return; + } + const auto& a_map_arg = std::get(encodable_a_map_arg); + api->EchoAsyncMap(a_map_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncError", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - api->ThrowAsyncError( - [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncError", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + api->ThrowAsyncError([reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid", - &GetCodec()); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid", &GetCodec()); if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - api->ThrowAsyncErrorFromVoid( - [reply](std::optional&& output) { - if (output.has_value()) { - reply(WrapError(output.value())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue()); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + api->ThrowAsyncErrorFromVoid([reply](std::optional&& output) { + if (output.has_value()) { + reply(WrapError(output.value())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue()); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - api->ThrowAsyncFlutterError( - [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + api->ThrowAsyncFlutterError([reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncAllTypes", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_everything_arg = args.at(0); - if (encodable_everything_arg.IsNull()) { - reply(WrapError("everything_arg unexpectedly null.")); - return; - } - const auto& everything_arg = std::any_cast( - std::get(encodable_everything_arg)); - api->EchoAsyncAllTypes( - everything_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - CustomEncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncAllTypes", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_everything_arg = args.at(0); + if (encodable_everything_arg.IsNull()) { + reply(WrapError("everything_arg unexpectedly null.")); + return; + } + const auto& everything_arg = std::any_cast(std::get(encodable_everything_arg)); + api->EchoAsyncAllTypes(everything_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(CustomEncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi." - "echoAsyncNullableAllNullableTypes", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_everything_arg = args.at(0); - const auto* everything_arg = - &(std::any_cast( - std::get( - encodable_everything_arg))); - api->EchoAsyncNullableAllNullableTypes( - everything_arg, - [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(CustomEncodableValue( - std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_everything_arg = args.at(0); + const auto* everything_arg = &(std::any_cast(std::get(encodable_everything_arg))); + api->EchoAsyncNullableAllNullableTypes(everything_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(CustomEncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableInt", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_an_int_arg = args.at(0); - const int64_t an_int_arg_value = - encodable_an_int_arg.IsNull() - ? 0 - : encodable_an_int_arg.LongValue(); - const auto* an_int_arg = - encodable_an_int_arg.IsNull() ? nullptr : &an_int_arg_value; - api->EchoAsyncNullableInt( - an_int_arg, - [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableInt", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_an_int_arg = args.at(0); + const int64_t an_int_arg_value = encodable_an_int_arg.IsNull() ? 0 : encodable_an_int_arg.LongValue(); + const auto* an_int_arg = encodable_an_int_arg.IsNull() ? nullptr : &an_int_arg_value; + api->EchoAsyncNullableInt(an_int_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_double_arg = args.at(0); - const auto* a_double_arg = - std::get_if(&encodable_a_double_arg); - api->EchoAsyncNullableDouble( - a_double_arg, - [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_double_arg = args.at(0); + const auto* a_double_arg = std::get_if(&encodable_a_double_arg); + api->EchoAsyncNullableDouble(a_double_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_bool_arg = args.at(0); - const auto* a_bool_arg = std::get_if(&encodable_a_bool_arg); - api->EchoAsyncNullableBool( - a_bool_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_bool_arg = args.at(0); + const auto* a_bool_arg = std::get_if(&encodable_a_bool_arg); + api->EchoAsyncNullableBool(a_bool_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_string_arg = args.at(0); - const auto* a_string_arg = - std::get_if(&encodable_a_string_arg); - api->EchoAsyncNullableString( - a_string_arg, - [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_string_arg = args.at(0); + const auto* a_string_arg = std::get_if(&encodable_a_string_arg); + api->EchoAsyncNullableString(a_string_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_uint8_list_arg = args.at(0); - const auto* a_uint8_list_arg = std::get_if>( - &encodable_a_uint8_list_arg); - api->EchoAsyncNullableUint8List( - a_uint8_list_arg, - [reply]( - ErrorOr>>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_uint8_list_arg = args.at(0); + const auto* a_uint8_list_arg = std::get_if>(&encodable_a_uint8_list_arg); + api->EchoAsyncNullableUint8List(a_uint8_list_arg, [reply](ErrorOr>>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_an_object_arg = args.at(0); - const auto* an_object_arg = &encodable_an_object_arg; - api->EchoAsyncNullableObject( - an_object_arg, - [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_an_object_arg = args.at(0); + const auto* an_object_arg = &encodable_an_object_arg; + api->EchoAsyncNullableObject(an_object_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_list_arg = args.at(0); - const auto* a_list_arg = - std::get_if(&encodable_a_list_arg); - api->EchoAsyncNullableList( - a_list_arg, - [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_list_arg = args.at(0); + const auto* a_list_arg = std::get_if(&encodable_a_list_arg); + api->EchoAsyncNullableList(a_list_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableMap", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_map_arg = args.at(0); - const auto* a_map_arg = - std::get_if(&encodable_a_map_arg); - api->EchoAsyncNullableMap( - a_map_arg, - [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableMap", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_map_arg = args.at(0); + const auto* a_map_arg = std::get_if(&encodable_a_map_arg); + api->EchoAsyncNullableMap(a_map_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterNoop", - &GetCodec()); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterNoop", &GetCodec()); if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - api->CallFlutterNoop( - [reply](std::optional&& output) { - if (output.has_value()) { - reply(WrapError(output.value())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue()); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + api->CallFlutterNoop([reply](std::optional&& output) { + if (output.has_value()) { + reply(WrapError(output.value())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue()); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - api->CallFlutterThrowError( - [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + api->CallFlutterThrowError([reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi." - "callFlutterThrowErrorFromVoid", - &GetCodec()); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid", &GetCodec()); if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - api->CallFlutterThrowErrorFromVoid( - [reply](std::optional&& output) { - if (output.has_value()) { - reply(WrapError(output.value())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue()); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + api->CallFlutterThrowErrorFromVoid([reply](std::optional&& output) { + if (output.has_value()) { + reply(WrapError(output.value())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue()); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_everything_arg = args.at(0); - if (encodable_everything_arg.IsNull()) { - reply(WrapError("everything_arg unexpectedly null.")); - return; - } - const auto& everything_arg = std::any_cast( - std::get(encodable_everything_arg)); - api->CallFlutterEchoAllTypes( - everything_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - CustomEncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_everything_arg = args.at(0); + if (encodable_everything_arg.IsNull()) { + reply(WrapError("everything_arg unexpectedly null.")); + return; + } + const auto& everything_arg = std::any_cast(std::get(encodable_everything_arg)); + api->CallFlutterEchoAllTypes(everything_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(CustomEncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi." - "callFlutterSendMultipleNullableTypes", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_bool_arg = args.at(0); - const auto* a_nullable_bool_arg = - std::get_if(&encodable_a_nullable_bool_arg); - const auto& encodable_a_nullable_int_arg = args.at(1); - const int64_t a_nullable_int_arg_value = - encodable_a_nullable_int_arg.IsNull() - ? 0 - : encodable_a_nullable_int_arg.LongValue(); - const auto* a_nullable_int_arg = - encodable_a_nullable_int_arg.IsNull() - ? nullptr - : &a_nullable_int_arg_value; - const auto& encodable_a_nullable_string_arg = args.at(2); - const auto* a_nullable_string_arg = - std::get_if(&encodable_a_nullable_string_arg); - api->CallFlutterSendMultipleNullableTypes( - a_nullable_bool_arg, a_nullable_int_arg, - a_nullable_string_arg, - [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - CustomEncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_bool_arg = args.at(0); + const auto* a_nullable_bool_arg = std::get_if(&encodable_a_nullable_bool_arg); + const auto& encodable_a_nullable_int_arg = args.at(1); + const int64_t a_nullable_int_arg_value = encodable_a_nullable_int_arg.IsNull() ? 0 : encodable_a_nullable_int_arg.LongValue(); + const auto* a_nullable_int_arg = encodable_a_nullable_int_arg.IsNull() ? nullptr : &a_nullable_int_arg_value; + const auto& encodable_a_nullable_string_arg = args.at(2); + const auto* a_nullable_string_arg = std::get_if(&encodable_a_nullable_string_arg); + api->CallFlutterSendMultipleNullableTypes(a_nullable_bool_arg, a_nullable_int_arg, a_nullable_string_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(CustomEncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoBool", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_bool_arg = args.at(0); - if (encodable_a_bool_arg.IsNull()) { - reply(WrapError("a_bool_arg unexpectedly null.")); - return; - } - const auto& a_bool_arg = std::get(encodable_a_bool_arg); - api->CallFlutterEchoBool( - a_bool_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoBool", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_bool_arg = args.at(0); + if (encodable_a_bool_arg.IsNull()) { + reply(WrapError("a_bool_arg unexpectedly null.")); + return; + } + const auto& a_bool_arg = std::get(encodable_a_bool_arg); + api->CallFlutterEchoBool(a_bool_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoInt", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_an_int_arg = args.at(0); - if (encodable_an_int_arg.IsNull()) { - reply(WrapError("an_int_arg unexpectedly null.")); - return; - } - const int64_t an_int_arg = encodable_an_int_arg.LongValue(); - api->CallFlutterEchoInt( - an_int_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoInt", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_an_int_arg = args.at(0); + if (encodable_an_int_arg.IsNull()) { + reply(WrapError("an_int_arg unexpectedly null.")); + return; + } + const int64_t an_int_arg = encodable_an_int_arg.LongValue(); + api->CallFlutterEchoInt(an_int_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_double_arg = args.at(0); - if (encodable_a_double_arg.IsNull()) { - reply(WrapError("a_double_arg unexpectedly null.")); - return; - } - const auto& a_double_arg = - std::get(encodable_a_double_arg); - api->CallFlutterEchoDouble( - a_double_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_double_arg = args.at(0); + if (encodable_a_double_arg.IsNull()) { + reply(WrapError("a_double_arg unexpectedly null.")); + return; + } + const auto& a_double_arg = std::get(encodable_a_double_arg); + api->CallFlutterEchoDouble(a_double_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_string_arg = args.at(0); - if (encodable_a_string_arg.IsNull()) { - reply(WrapError("a_string_arg unexpectedly null.")); - return; - } - const auto& a_string_arg = - std::get(encodable_a_string_arg); - api->CallFlutterEchoString( - a_string_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_string_arg = args.at(0); + if (encodable_a_string_arg.IsNull()) { + reply(WrapError("a_string_arg unexpectedly null.")); + return; + } + const auto& a_string_arg = std::get(encodable_a_string_arg); + api->CallFlutterEchoString(a_string_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_list_arg = args.at(0); - if (encodable_a_list_arg.IsNull()) { - reply(WrapError("a_list_arg unexpectedly null.")); - return; - } - const auto& a_list_arg = - std::get>(encodable_a_list_arg); - api->CallFlutterEchoUint8List( - a_list_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_list_arg = args.at(0); + if (encodable_a_list_arg.IsNull()) { + reply(WrapError("a_list_arg unexpectedly null.")); + return; + } + const auto& a_list_arg = std::get>(encodable_a_list_arg); + api->CallFlutterEchoUint8List(a_list_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoList", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_list_arg = args.at(0); - if (encodable_a_list_arg.IsNull()) { - reply(WrapError("a_list_arg unexpectedly null.")); - return; - } - const auto& a_list_arg = - std::get(encodable_a_list_arg); - api->CallFlutterEchoList( - a_list_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoList", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_list_arg = args.at(0); + if (encodable_a_list_arg.IsNull()) { + reply(WrapError("a_list_arg unexpectedly null.")); + return; + } + const auto& a_list_arg = std::get(encodable_a_list_arg); + api->CallFlutterEchoList(a_list_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoMap", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_map_arg = args.at(0); - if (encodable_a_map_arg.IsNull()) { - reply(WrapError("a_map_arg unexpectedly null.")); - return; - } - const auto& a_map_arg = - std::get(encodable_a_map_arg); - api->CallFlutterEchoMap( - a_map_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoMap", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_map_arg = args.at(0); + if (encodable_a_map_arg.IsNull()) { + reply(WrapError("a_map_arg unexpectedly null.")); + return; + } + const auto& a_map_arg = std::get(encodable_a_map_arg); + api->CallFlutterEchoMap(a_map_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_bool_arg = args.at(0); - const auto* a_bool_arg = std::get_if(&encodable_a_bool_arg); - api->CallFlutterEchoNullableBool( - a_bool_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_bool_arg = args.at(0); + const auto* a_bool_arg = std::get_if(&encodable_a_bool_arg); + api->CallFlutterEchoNullableBool(a_bool_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_an_int_arg = args.at(0); - const int64_t an_int_arg_value = - encodable_an_int_arg.IsNull() - ? 0 - : encodable_an_int_arg.LongValue(); - const auto* an_int_arg = - encodable_an_int_arg.IsNull() ? nullptr : &an_int_arg_value; - api->CallFlutterEchoNullableInt( - an_int_arg, - [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_an_int_arg = args.at(0); + const int64_t an_int_arg_value = encodable_an_int_arg.IsNull() ? 0 : encodable_an_int_arg.LongValue(); + const auto* an_int_arg = encodable_an_int_arg.IsNull() ? nullptr : &an_int_arg_value; + api->CallFlutterEchoNullableInt(an_int_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi." - "callFlutterEchoNullableDouble", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_double_arg = args.at(0); - const auto* a_double_arg = - std::get_if(&encodable_a_double_arg); - api->CallFlutterEchoNullableDouble( - a_double_arg, - [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_double_arg = args.at(0); + const auto* a_double_arg = std::get_if(&encodable_a_double_arg); + api->CallFlutterEchoNullableDouble(a_double_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi." - "callFlutterEchoNullableString", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_string_arg = args.at(0); - const auto* a_string_arg = - std::get_if(&encodable_a_string_arg); - api->CallFlutterEchoNullableString( - a_string_arg, - [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_string_arg = args.at(0); + const auto* a_string_arg = std::get_if(&encodable_a_string_arg); + api->CallFlutterEchoNullableString(a_string_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi." - "callFlutterEchoNullableUint8List", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_list_arg = args.at(0); - const auto* a_list_arg = - std::get_if>(&encodable_a_list_arg); - api->CallFlutterEchoNullableUint8List( - a_list_arg, - [reply]( - ErrorOr>>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_list_arg = args.at(0); + const auto* a_list_arg = std::get_if>(&encodable_a_list_arg); + api->CallFlutterEchoNullableUint8List(a_list_arg, [reply](ErrorOr>>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_list_arg = args.at(0); - const auto* a_list_arg = - std::get_if(&encodable_a_list_arg); - api->CallFlutterEchoNullableList( - a_list_arg, - [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_list_arg = args.at(0); + const auto* a_list_arg = std::get_if(&encodable_a_list_arg); + api->CallFlutterEchoNullableList(a_list_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, - "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_map_arg = args.at(0); - const auto* a_map_arg = - std::get_if(&encodable_a_map_arg); - api->CallFlutterEchoNullableMap( - a_map_arg, - [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back( - EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_map_arg = args.at(0); + const auto* a_map_arg = std::get_if(&encodable_a_map_arg); + api->CallFlutterEchoNullableMap(a_map_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); } + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } } -EncodableValue HostIntegrationCoreApi::WrapError( - std::string_view error_message) { - return EncodableValue( - EncodableList{EncodableValue(std::string(error_message)), - EncodableValue("Error"), EncodableValue()}); +EncodableValue HostIntegrationCoreApi::WrapError(std::string_view error_message) { + return EncodableValue(EncodableList{ + EncodableValue(std::string(error_message)), + EncodableValue("Error"), + EncodableValue() + }); } EncodableValue HostIntegrationCoreApi::WrapError(const FlutterError& error) { - return EncodableValue(EncodableList{EncodableValue(error.code()), - EncodableValue(error.message()), - error.details()}); + return EncodableValue(EncodableList{ + EncodableValue(error.code()), + EncodableValue(error.message()), + error.details() + }); } -FlutterIntegrationCoreApiCodecSerializer:: - FlutterIntegrationCoreApiCodecSerializer() {} -EncodableValue FlutterIntegrationCoreApiCodecSerializer::ReadValueOfType( - uint8_t type, flutter::ByteStreamReader* stream) const { + +FlutterIntegrationCoreApiCodecSerializer::FlutterIntegrationCoreApiCodecSerializer() {} +EncodableValue FlutterIntegrationCoreApiCodecSerializer::ReadValueOfType(uint8_t type, flutter::ByteStreamReader* stream) const { switch (type) { case 128: - return CustomEncodableValue(AllNullableTypes::FromEncodableList( - std::get(ReadValue(stream)))); + return CustomEncodableValue(AllNullableTypes::FromEncodableList(std::get(ReadValue(stream)))); case 129: - return CustomEncodableValue(AllNullableTypesWrapper::FromEncodableList( - std::get(ReadValue(stream)))); + return CustomEncodableValue(AllNullableTypesWrapper::FromEncodableList(std::get(ReadValue(stream)))); case 130: - return CustomEncodableValue(AllTypes::FromEncodableList( - std::get(ReadValue(stream)))); + return CustomEncodableValue(AllTypes::FromEncodableList(std::get(ReadValue(stream)))); case 131: - return CustomEncodableValue(TestMessage::FromEncodableList( - std::get(ReadValue(stream)))); + return CustomEncodableValue(TestMessage::FromEncodableList(std::get(ReadValue(stream)))); default: return flutter::StandardCodecSerializer::ReadValueOfType(type, stream); } } -void FlutterIntegrationCoreApiCodecSerializer::WriteValue( - const EncodableValue& value, flutter::ByteStreamWriter* stream) const { - if (const CustomEncodableValue* custom_value = - std::get_if(&value)) { +void FlutterIntegrationCoreApiCodecSerializer::WriteValue(const EncodableValue& value, flutter::ByteStreamWriter* stream) const { + if (const CustomEncodableValue* custom_value = std::get_if(&value)) { if (custom_value->type() == typeid(AllNullableTypes)) { stream->WriteByte(128); - WriteValue( - EncodableValue( - std::any_cast(*custom_value).ToEncodableList()), - stream); + WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); return; } if (custom_value->type() == typeid(AllNullableTypesWrapper)) { stream->WriteByte(129); - WriteValue( - EncodableValue(std::any_cast(*custom_value) - .ToEncodableList()), - stream); + WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); return; } if (custom_value->type() == typeid(AllTypes)) { stream->WriteByte(130); - WriteValue(EncodableValue( - std::any_cast(*custom_value).ToEncodableList()), - stream); + WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); return; } if (custom_value->type() == typeid(TestMessage)) { stream->WriteByte(131); - WriteValue( - EncodableValue( - std::any_cast(*custom_value).ToEncodableList()), - stream); + WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); return; } } flutter::StandardCodecSerializer::WriteValue(value, stream); } -// Generated class from Pigeon that represents Flutter messages that can be -// called from C++. -FlutterIntegrationCoreApi::FlutterIntegrationCoreApi( - flutter::BinaryMessenger* binary_messenger) { +// Generated class from Pigeon that represents Flutter messages that can be called from C++. +FlutterIntegrationCoreApi::FlutterIntegrationCoreApi(flutter::BinaryMessenger* binary_messenger) { this->binary_messenger_ = binary_messenger; } const flutter::StandardMessageCodec& FlutterIntegrationCoreApi::GetCodec() { - return flutter::StandardMessageCodec::GetInstance( - &FlutterIntegrationCoreApiCodecSerializer::GetInstance()); + return flutter::StandardMessageCodec::GetInstance(&FlutterIntegrationCoreApiCodecSerializer::GetInstance()); } -void FlutterIntegrationCoreApi::Noop( - std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.noop", - &GetCodec()); +void FlutterIntegrationCoreApi::Noop(std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.noop", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { on_success(); }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + on_success(); + }); } -void FlutterIntegrationCoreApi::ThrowError( - std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.throwError", &GetCodec()); +void FlutterIntegrationCoreApi::ThrowError(std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.throwError", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto* return_value = &encodable_return_value; - on_success(return_value); - }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto* return_value = &encodable_return_value; + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::ThrowErrorFromVoid( - std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid", - &GetCodec()); +void FlutterIntegrationCoreApi::ThrowErrorFromVoid(std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { on_success(); }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + on_success(); + }); } -void FlutterIntegrationCoreApi::EchoAllTypes( - const AllTypes& everything_arg, - std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes", &GetCodec()); +void FlutterIntegrationCoreApi::EchoAllTypes(const AllTypes& everything_arg, std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - CustomEncodableValue(everything_arg), + CustomEncodableValue(everything_arg), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = std::any_cast(std::get(encodable_return_value)); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = std::any_cast( - std::get(encodable_return_value)); - on_success(return_value); - }); } -void FlutterIntegrationCoreApi::EchoAllNullableTypes( - const AllNullableTypes& everything_arg, - std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes", - &GetCodec()); +void FlutterIntegrationCoreApi::EchoAllNullableTypes(const AllNullableTypes& everything_arg, std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - CustomEncodableValue(everything_arg), + CustomEncodableValue(everything_arg), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = std::any_cast(std::get(encodable_return_value)); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = std::any_cast( - std::get(encodable_return_value)); - on_success(return_value); - }); } -void FlutterIntegrationCoreApi::SendMultipleNullableTypes( - const bool* a_nullable_bool_arg, const int64_t* a_nullable_int_arg, - const std::string* a_nullable_string_arg, - std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes", - &GetCodec()); +void FlutterIntegrationCoreApi::SendMultipleNullableTypes(const bool* a_nullable_bool_arg, const int64_t* a_nullable_int_arg, const std::string* a_nullable_string_arg, std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - a_nullable_bool_arg ? EncodableValue(*a_nullable_bool_arg) - : EncodableValue(), - a_nullable_int_arg ? EncodableValue(*a_nullable_int_arg) - : EncodableValue(), - a_nullable_string_arg ? EncodableValue(*a_nullable_string_arg) - : EncodableValue(), + a_nullable_bool_arg ? EncodableValue(*a_nullable_bool_arg) : EncodableValue(), + a_nullable_int_arg ? EncodableValue(*a_nullable_int_arg) : EncodableValue(), + a_nullable_string_arg ? EncodableValue(*a_nullable_string_arg) : EncodableValue(), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = std::any_cast(std::get(encodable_return_value)); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = std::any_cast( - std::get(encodable_return_value)); - on_success(return_value); - }); } -void FlutterIntegrationCoreApi::EchoBool( - bool a_bool_arg, std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoBool", &GetCodec()); +void FlutterIntegrationCoreApi::EchoBool(bool a_bool_arg, std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoBool", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - EncodableValue(a_bool_arg), + EncodableValue(a_bool_arg), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = std::get(encodable_return_value); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = std::get(encodable_return_value); - on_success(return_value); - }); } -void FlutterIntegrationCoreApi::EchoInt( - int64_t an_int_arg, std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoInt", - &GetCodec()); +void FlutterIntegrationCoreApi::EchoInt(int64_t an_int_arg, std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoInt", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - EncodableValue(an_int_arg), + EncodableValue(an_int_arg), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const int64_t return_value = encodable_return_value.LongValue(); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const int64_t return_value = encodable_return_value.LongValue(); - on_success(return_value); - }); } -void FlutterIntegrationCoreApi::EchoDouble( - double a_double_arg, std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble", &GetCodec()); +void FlutterIntegrationCoreApi::EchoDouble(double a_double_arg, std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - EncodableValue(a_double_arg), + EncodableValue(a_double_arg), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = std::get(encodable_return_value); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = std::get(encodable_return_value); - on_success(return_value); - }); } -void FlutterIntegrationCoreApi::EchoString( - const std::string& a_string_arg, - std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString", &GetCodec()); +void FlutterIntegrationCoreApi::EchoString(const std::string& a_string_arg, std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - EncodableValue(a_string_arg), + EncodableValue(a_string_arg), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = std::get(encodable_return_value); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = - std::get(encodable_return_value); - on_success(return_value); - }); } -void FlutterIntegrationCoreApi::EchoUint8List( - const std::vector& a_list_arg, - std::function&)>&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List", - &GetCodec()); +void FlutterIntegrationCoreApi::EchoUint8List(const std::vector& a_list_arg, std::function&)>&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - EncodableValue(a_list_arg), + EncodableValue(a_list_arg), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = std::get>(encodable_return_value); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = - std::get>(encodable_return_value); - on_success(return_value); - }); } -void FlutterIntegrationCoreApi::EchoList( - const EncodableList& a_list_arg, - std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList", &GetCodec()); +void FlutterIntegrationCoreApi::EchoList(const EncodableList& a_list_arg, std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - EncodableValue(a_list_arg), + EncodableValue(a_list_arg), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = std::get(encodable_return_value); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = - std::get(encodable_return_value); - on_success(return_value); - }); } -void FlutterIntegrationCoreApi::EchoMap( - const EncodableMap& a_map_arg, - std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap", - &GetCodec()); +void FlutterIntegrationCoreApi::EchoMap(const EncodableMap& a_map_arg, std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - EncodableValue(a_map_arg), + EncodableValue(a_map_arg), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = std::get(encodable_return_value); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = - std::get(encodable_return_value); - on_success(return_value); - }); } -void FlutterIntegrationCoreApi::EchoNullableBool( - const bool* a_bool_arg, std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool", - &GetCodec()); +void FlutterIntegrationCoreApi::EchoNullableBool(const bool* a_bool_arg, std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - a_bool_arg ? EncodableValue(*a_bool_arg) : EncodableValue(), + a_bool_arg ? EncodableValue(*a_bool_arg) : EncodableValue(), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto* return_value = std::get_if(&encodable_return_value); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto* return_value = std::get_if(&encodable_return_value); - on_success(return_value); - }); } -void FlutterIntegrationCoreApi::EchoNullableInt( - const int64_t* an_int_arg, std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt", - &GetCodec()); +void FlutterIntegrationCoreApi::EchoNullableInt(const int64_t* an_int_arg, std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - an_int_arg ? EncodableValue(*an_int_arg) : EncodableValue(), + an_int_arg ? EncodableValue(*an_int_arg) : EncodableValue(), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const int64_t return_value_value = encodable_return_value.IsNull() ? 0 : encodable_return_value.LongValue(); + const auto* return_value = encodable_return_value.IsNull() ? nullptr : &return_value_value; + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const int64_t return_value_value = - encodable_return_value.IsNull() - ? 0 - : encodable_return_value.LongValue(); - const auto* return_value = - encodable_return_value.IsNull() ? nullptr : &return_value_value; - on_success(return_value); - }); } -void FlutterIntegrationCoreApi::EchoNullableDouble( - const double* a_double_arg, std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble", - &GetCodec()); +void FlutterIntegrationCoreApi::EchoNullableDouble(const double* a_double_arg, std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - a_double_arg ? EncodableValue(*a_double_arg) : EncodableValue(), + a_double_arg ? EncodableValue(*a_double_arg) : EncodableValue(), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto* return_value = std::get_if(&encodable_return_value); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto* return_value = std::get_if(&encodable_return_value); - on_success(return_value); - }); } -void FlutterIntegrationCoreApi::EchoNullableString( - const std::string* a_string_arg, - std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString", - &GetCodec()); +void FlutterIntegrationCoreApi::EchoNullableString(const std::string* a_string_arg, std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - a_string_arg ? EncodableValue(*a_string_arg) : EncodableValue(), + a_string_arg ? EncodableValue(*a_string_arg) : EncodableValue(), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto* return_value = std::get_if(&encodable_return_value); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto* return_value = - std::get_if(&encodable_return_value); - on_success(return_value); - }); } -void FlutterIntegrationCoreApi::EchoNullableUint8List( - const std::vector* a_list_arg, - std::function*)>&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List", - &GetCodec()); +void FlutterIntegrationCoreApi::EchoNullableUint8List(const std::vector* a_list_arg, std::function*)>&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - a_list_arg ? EncodableValue(*a_list_arg) : EncodableValue(), + a_list_arg ? EncodableValue(*a_list_arg) : EncodableValue(), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto* return_value = std::get_if>(&encodable_return_value); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto* return_value = - std::get_if>(&encodable_return_value); - on_success(return_value); - }); } -void FlutterIntegrationCoreApi::EchoNullableList( - const EncodableList* a_list_arg, - std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList", - &GetCodec()); +void FlutterIntegrationCoreApi::EchoNullableList(const EncodableList* a_list_arg, std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - a_list_arg ? EncodableValue(*a_list_arg) : EncodableValue(), + a_list_arg ? EncodableValue(*a_list_arg) : EncodableValue(), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto* return_value = std::get_if(&encodable_return_value); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto* return_value = - std::get_if(&encodable_return_value); - on_success(return_value); - }); } -void FlutterIntegrationCoreApi::EchoNullableMap( - const EncodableMap* a_map_arg, - std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap", - &GetCodec()); +void FlutterIntegrationCoreApi::EchoNullableMap(const EncodableMap* a_map_arg, std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - a_map_arg ? EncodableValue(*a_map_arg) : EncodableValue(), + a_map_arg ? EncodableValue(*a_map_arg) : EncodableValue(), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto* return_value = std::get_if(&encodable_return_value); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto* return_value = - std::get_if(&encodable_return_value); - on_success(return_value); - }); } -void FlutterIntegrationCoreApi::NoopAsync( - std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.noopAsync", &GetCodec()); +void FlutterIntegrationCoreApi::NoopAsync(std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.noopAsync", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { on_success(); }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + on_success(); + }); } -void FlutterIntegrationCoreApi::EchoAsyncString( - const std::string& a_string_arg, - std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, - "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString", - &GetCodec()); +void FlutterIntegrationCoreApi::EchoAsyncString(const std::string& a_string_arg, std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - EncodableValue(a_string_arg), + EncodableValue(a_string_arg), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = std::get(encodable_return_value); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = - std::get(encodable_return_value); - on_success(return_value); - }); } /// The codec used by HostTrivialApi. const flutter::StandardMessageCodec& HostTrivialApi::GetCodec() { - return flutter::StandardMessageCodec::GetInstance( - &flutter::StandardCodecSerializer::GetInstance()); -} - -// Sets up an instance of `HostTrivialApi` to handle messages through the -// `binary_messenger`. -void HostTrivialApi::SetUp(flutter::BinaryMessenger* binary_messenger, - HostTrivialApi* api) { - { - auto channel = std::make_unique>( - binary_messenger, "dev.flutter.pigeon.HostTrivialApi.noop", - &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - std::optional output = api->Noop(); - if (output.has_value()) { - reply(WrapError(output.value())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue()); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + return flutter::StandardMessageCodec::GetInstance(&flutter::StandardCodecSerializer::GetInstance()); +} + +// Sets up an instance of `HostTrivialApi` to handle messages through the `binary_messenger`. +void HostTrivialApi::SetUp(flutter::BinaryMessenger* binary_messenger, HostTrivialApi* api) { + { + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostTrivialApi.noop", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + std::optional output = api->Noop(); + if (output.has_value()) { + reply(WrapError(output.value())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue()); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } @@ -3606,82 +2623,74 @@ void HostTrivialApi::SetUp(flutter::BinaryMessenger* binary_messenger, } EncodableValue HostTrivialApi::WrapError(std::string_view error_message) { - return EncodableValue( - EncodableList{EncodableValue(std::string(error_message)), - EncodableValue("Error"), EncodableValue()}); + return EncodableValue(EncodableList{ + EncodableValue(std::string(error_message)), + EncodableValue("Error"), + EncodableValue() + }); } EncodableValue HostTrivialApi::WrapError(const FlutterError& error) { - return EncodableValue(EncodableList{EncodableValue(error.code()), - EncodableValue(error.message()), - error.details()}); + return EncodableValue(EncodableList{ + EncodableValue(error.code()), + EncodableValue(error.message()), + error.details() + }); } /// The codec used by HostSmallApi. const flutter::StandardMessageCodec& HostSmallApi::GetCodec() { - return flutter::StandardMessageCodec::GetInstance( - &flutter::StandardCodecSerializer::GetInstance()); -} - -// Sets up an instance of `HostSmallApi` to handle messages through the -// `binary_messenger`. -void HostSmallApi::SetUp(flutter::BinaryMessenger* binary_messenger, - HostSmallApi* api) { - { - auto channel = std::make_unique>( - binary_messenger, "dev.flutter.pigeon.HostSmallApi.echo", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_string_arg = args.at(0); - if (encodable_a_string_arg.IsNull()) { - reply(WrapError("a_string_arg unexpectedly null.")); - return; - } - const auto& a_string_arg = - std::get(encodable_a_string_arg); - api->Echo(a_string_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back( - EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + return flutter::StandardMessageCodec::GetInstance(&flutter::StandardCodecSerializer::GetInstance()); +} + +// Sets up an instance of `HostSmallApi` to handle messages through the `binary_messenger`. +void HostSmallApi::SetUp(flutter::BinaryMessenger* binary_messenger, HostSmallApi* api) { + { + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostSmallApi.echo", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_string_arg = args.at(0); + if (encodable_a_string_arg.IsNull()) { + reply(WrapError("a_string_arg unexpectedly null.")); + return; + } + const auto& a_string_arg = std::get(encodable_a_string_arg); + api->Echo(a_string_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>( - binary_messenger, "dev.flutter.pigeon.HostSmallApi.voidVoid", - &GetCodec()); + auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostSmallApi.voidVoid", &GetCodec()); if (api != nullptr) { - channel->SetMessageHandler( - [api](const EncodableValue& message, - const flutter::MessageReply& reply) { - try { - api->VoidVoid([reply](std::optional&& output) { - if (output.has_value()) { - reply(WrapError(output.value())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue()); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); + channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { + try { + api->VoidVoid([reply](std::optional&& output) { + if (output.has_value()) { + reply(WrapError(output.value())); + return; } + EncodableList wrapped; + wrapped.push_back(EncodableValue()); + reply(EncodableValue(std::move(wrapped))); }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } @@ -3689,75 +2698,61 @@ void HostSmallApi::SetUp(flutter::BinaryMessenger* binary_messenger, } EncodableValue HostSmallApi::WrapError(std::string_view error_message) { - return EncodableValue( - EncodableList{EncodableValue(std::string(error_message)), - EncodableValue("Error"), EncodableValue()}); + return EncodableValue(EncodableList{ + EncodableValue(std::string(error_message)), + EncodableValue("Error"), + EncodableValue() + }); } EncodableValue HostSmallApi::WrapError(const FlutterError& error) { - return EncodableValue(EncodableList{EncodableValue(error.code()), - EncodableValue(error.message()), - error.details()}); + return EncodableValue(EncodableList{ + EncodableValue(error.code()), + EncodableValue(error.message()), + error.details() + }); } + FlutterSmallApiCodecSerializer::FlutterSmallApiCodecSerializer() {} -EncodableValue FlutterSmallApiCodecSerializer::ReadValueOfType( - uint8_t type, flutter::ByteStreamReader* stream) const { +EncodableValue FlutterSmallApiCodecSerializer::ReadValueOfType(uint8_t type, flutter::ByteStreamReader* stream) const { switch (type) { case 128: - return CustomEncodableValue(TestMessage::FromEncodableList( - std::get(ReadValue(stream)))); + return CustomEncodableValue(TestMessage::FromEncodableList(std::get(ReadValue(stream)))); default: return flutter::StandardCodecSerializer::ReadValueOfType(type, stream); } } -void FlutterSmallApiCodecSerializer::WriteValue( - const EncodableValue& value, flutter::ByteStreamWriter* stream) const { - if (const CustomEncodableValue* custom_value = - std::get_if(&value)) { +void FlutterSmallApiCodecSerializer::WriteValue(const EncodableValue& value, flutter::ByteStreamWriter* stream) const { + if (const CustomEncodableValue* custom_value = std::get_if(&value)) { if (custom_value->type() == typeid(TestMessage)) { stream->WriteByte(128); - WriteValue( - EncodableValue( - std::any_cast(*custom_value).ToEncodableList()), - stream); + WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); return; } } flutter::StandardCodecSerializer::WriteValue(value, stream); } -// Generated class from Pigeon that represents Flutter messages that can be -// called from C++. +// Generated class from Pigeon that represents Flutter messages that can be called from C++. FlutterSmallApi::FlutterSmallApi(flutter::BinaryMessenger* binary_messenger) { this->binary_messenger_ = binary_messenger; } const flutter::StandardMessageCodec& FlutterSmallApi::GetCodec() { - return flutter::StandardMessageCodec::GetInstance( - &FlutterSmallApiCodecSerializer::GetInstance()); + return flutter::StandardMessageCodec::GetInstance(&FlutterSmallApiCodecSerializer::GetInstance()); } -void FlutterSmallApi::EchoWrappedList( - const TestMessage& msg_arg, - std::function&& on_success, - std::function&& on_error) { - auto channel = std::make_unique>( - binary_messenger_, "dev.flutter.pigeon.FlutterSmallApi.echoWrappedList", - &GetCodec()); +void FlutterSmallApi::EchoWrappedList(const TestMessage& msg_arg, std::function&& on_success, std::function&& on_error) { + auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterSmallApi.echoWrappedList", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - CustomEncodableValue(msg_arg), + CustomEncodableValue(msg_arg), + }); + channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = std::any_cast(std::get(encodable_return_value)); + on_success(return_value); }); - channel->Send( - encoded_api_arguments, - [on_success = std::move(on_success), on_error = std::move(on_error)]( - const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = - GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = std::any_cast( - std::get(encodable_return_value)); - on_success(return_value); - }); } } // namespace core_tests_pigeontest diff --git a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h index 2910f1857950..a8d0669e3fce 100644 --- a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h +++ b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h @@ -1,8 +1,8 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// -// Autogenerated from Pigeon (v9.1.3), do not edit directly. +// +// Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon #ifndef PIGEON_CORE_TESTS_GEN_H_ @@ -24,12 +24,12 @@ class CoreTestsTest; class FlutterError { public: - explicit FlutterError(const std::string& code) : code_(code) {} + explicit FlutterError(const std::string& code) + : code_(code) {} explicit FlutterError(const std::string& code, const std::string& message) - : code_(code), message_(message) {} - explicit FlutterError(const std::string& code, const std::string& message, - const flutter::EncodableValue& details) - : code_(code), message_(message), details_(details) {} + : code_(code), message_(message) {} + explicit FlutterError(const std::string& code, const std::string& message, const flutter::EncodableValue& details) + : code_(code), message_(message), details_(details) {} const std::string& code() const { return code_; } const std::string& message() const { return message_; } @@ -41,8 +41,7 @@ class FlutterError { flutter::EncodableValue details_; }; -template -class ErrorOr { +template class ErrorOr { public: ErrorOr(const T& rhs) : v_(rhs) {} ErrorOr(const T&& rhs) : v_(std::move(rhs)) {} @@ -65,20 +64,30 @@ class ErrorOr { std::variant v_; }; -enum class AnEnum { one = 0, two = 1, three = 2 }; + +enum class AnEnum { + one = 0, + two = 1, + three = 2 +}; // Generated class from Pigeon that represents data sent in messages. class AllTypes { public: // Constructs an object setting all fields. - explicit AllTypes(bool a_bool, int64_t an_int, int64_t an_int64, - double a_double, const std::vector& a_byte_array, - const std::vector& a4_byte_array, - const std::vector& a8_byte_array, - const std::vector& a_float_array, - const flutter::EncodableList& a_list, - const flutter::EncodableMap& a_map, const AnEnum& an_enum, - const std::string& a_string); + explicit AllTypes( + bool a_bool, + int64_t an_int, + int64_t an_int64, + double a_double, + const std::vector& a_byte_array, + const std::vector& a4_byte_array, + const std::vector& a8_byte_array, + const std::vector& a_float_array, + const flutter::EncodableList& a_list, + const flutter::EncodableMap& a_map, + const AnEnum& an_enum, + const std::string& a_string); bool a_bool() const; void set_a_bool(bool value_arg); @@ -116,6 +125,7 @@ class AllTypes { const std::string& a_string() const; void set_a_string(std::string_view value_arg); + private: static AllTypes FromEncodableList(const flutter::EncodableList& list); flutter::EncodableList ToEncodableList() const; @@ -142,8 +152,10 @@ class AllTypes { flutter::EncodableMap a_map_; AnEnum an_enum_; std::string a_string_; + }; + // Generated class from Pigeon that represents data sent in messages. class AllNullableTypes { public: @@ -152,18 +164,21 @@ class AllNullableTypes { // Constructs an object setting all fields. explicit AllNullableTypes( - const bool* a_nullable_bool, const int64_t* a_nullable_int, - const int64_t* a_nullable_int64, const double* a_nullable_double, - const std::vector* a_nullable_byte_array, - const std::vector* a_nullable4_byte_array, - const std::vector* a_nullable8_byte_array, - const std::vector* a_nullable_float_array, - const flutter::EncodableList* a_nullable_list, - const flutter::EncodableMap* a_nullable_map, - const flutter::EncodableList* nullable_nested_list, - const flutter::EncodableMap* nullable_map_with_annotations, - const flutter::EncodableMap* nullable_map_with_object, - const AnEnum* a_nullable_enum, const std::string* a_nullable_string); + const bool* a_nullable_bool, + const int64_t* a_nullable_int, + const int64_t* a_nullable_int64, + const double* a_nullable_double, + const std::vector* a_nullable_byte_array, + const std::vector* a_nullable4_byte_array, + const std::vector* a_nullable8_byte_array, + const std::vector* a_nullable_float_array, + const flutter::EncodableList* a_nullable_list, + const flutter::EncodableMap* a_nullable_map, + const flutter::EncodableList* nullable_nested_list, + const flutter::EncodableMap* nullable_map_with_annotations, + const flutter::EncodableMap* nullable_map_with_object, + const AnEnum* a_nullable_enum, + const std::string* a_nullable_string); const bool* a_nullable_bool() const; void set_a_nullable_bool(const bool* value_arg); @@ -210,10 +225,8 @@ class AllNullableTypes { void set_nullable_nested_list(const flutter::EncodableList& value_arg); const flutter::EncodableMap* nullable_map_with_annotations() const; - void set_nullable_map_with_annotations( - const flutter::EncodableMap* value_arg); - void set_nullable_map_with_annotations( - const flutter::EncodableMap& value_arg); + void set_nullable_map_with_annotations(const flutter::EncodableMap* value_arg); + void set_nullable_map_with_annotations(const flutter::EncodableMap& value_arg); const flutter::EncodableMap* nullable_map_with_object() const; void set_nullable_map_with_object(const flutter::EncodableMap* value_arg); @@ -227,6 +240,7 @@ class AllNullableTypes { void set_a_nullable_string(const std::string_view* value_arg); void set_a_nullable_string(std::string_view value_arg); + private: static AllNullableTypes FromEncodableList(const flutter::EncodableList& list); flutter::EncodableList ToEncodableList() const; @@ -257,20 +271,23 @@ class AllNullableTypes { std::optional nullable_map_with_object_; std::optional a_nullable_enum_; std::optional a_nullable_string_; + }; + // Generated class from Pigeon that represents data sent in messages. class AllNullableTypesWrapper { public: // Constructs an object setting all fields. - explicit AllNullableTypesWrapper(const AllNullableTypes& values); + explicit AllNullableTypesWrapper( + const AllNullableTypes& values); const AllNullableTypes& values() const; void set_values(const AllNullableTypes& value_arg); + private: - static AllNullableTypesWrapper FromEncodableList( - const flutter::EncodableList& list); + static AllNullableTypesWrapper FromEncodableList(const flutter::EncodableList& list); flutter::EncodableList ToEncodableList() const; friend class HostIntegrationCoreApi; friend class HostIntegrationCoreApiCodecSerializer; @@ -284,8 +301,10 @@ class AllNullableTypesWrapper { friend class FlutterSmallApiCodecSerializer; friend class CoreTestsTest; AllNullableTypes values_; + }; + // A data class containing a List, used in unit tests. // // Generated class from Pigeon that represents data sent in messages. @@ -295,12 +314,14 @@ class TestMessage { TestMessage(); // Constructs an object setting all fields. - explicit TestMessage(const flutter::EncodableList* test_list); + explicit TestMessage( + const flutter::EncodableList* test_list); const flutter::EncodableList* test_list() const; void set_test_list(const flutter::EncodableList* value_arg); void set_test_list(const flutter::EncodableList& value_arg); + private: static TestMessage FromEncodableList(const flutter::EncodableList& list); flutter::EncodableList ToEncodableList() const; @@ -316,11 +337,12 @@ class TestMessage { friend class FlutterSmallApiCodecSerializer; friend class CoreTestsTest; std::optional test_list_; + }; -class HostIntegrationCoreApiCodecSerializer - : public flutter::StandardCodecSerializer { +class HostIntegrationCoreApiCodecSerializer : public flutter::StandardCodecSerializer { public: + inline static HostIntegrationCoreApiCodecSerializer& GetInstance() { static HostIntegrationCoreApiCodecSerializer sInstance; return sInstance; @@ -329,19 +351,17 @@ class HostIntegrationCoreApiCodecSerializer HostIntegrationCoreApiCodecSerializer(); public: - void WriteValue(const flutter::EncodableValue& value, - flutter::ByteStreamWriter* stream) const override; + void WriteValue(const flutter::EncodableValue& value, flutter::ByteStreamWriter* stream) const override; protected: - flutter::EncodableValue ReadValueOfType( - uint8_t type, flutter::ByteStreamReader* stream) const override; + flutter::EncodableValue ReadValueOfType(uint8_t type, flutter::ByteStreamReader* stream) const override; + }; // The core interface that each host language plugin must implement in // platform_test integration tests. // -// Generated interface from Pigeon that represents a handler of messages from -// Flutter. +// Generated interface from Pigeon that represents a handler of messages from Flutter. class HostIntegrationCoreApi { public: HostIntegrationCoreApi(const HostIntegrationCoreApi&) = delete; @@ -357,8 +377,7 @@ class HostIntegrationCoreApi { // Returns an error from a void function, to test error handling. virtual std::optional ThrowErrorFromVoid() = 0; // Returns a Flutter error, to test error handling. - virtual ErrorOr> - ThrowFlutterError() = 0; + virtual ErrorOr> ThrowFlutterError() = 0; // Returns passed in int. virtual ErrorOr EchoInt(int64_t an_int) = 0; // Returns passed in double. @@ -368,223 +387,118 @@ class HostIntegrationCoreApi { // Returns the passed in string. virtual ErrorOr EchoString(const std::string& a_string) = 0; // Returns the passed in Uint8List. - virtual ErrorOr> EchoUint8List( - const std::vector& a_uint8_list) = 0; + virtual ErrorOr> EchoUint8List(const std::vector& a_uint8_list) = 0; // Returns the passed in generic Object. - virtual ErrorOr EchoObject( - const flutter::EncodableValue& an_object) = 0; + virtual ErrorOr EchoObject(const flutter::EncodableValue& an_object) = 0; // Returns the passed list, to test serialization and deserialization. - virtual ErrorOr EchoList( - const flutter::EncodableList& a_list) = 0; + virtual ErrorOr EchoList(const flutter::EncodableList& a_list) = 0; // Returns the passed map, to test serialization and deserialization. - virtual ErrorOr EchoMap( - const flutter::EncodableMap& a_map) = 0; + virtual ErrorOr EchoMap(const flutter::EncodableMap& a_map) = 0; // Returns the passed object, to test serialization and deserialization. - virtual ErrorOr> EchoAllNullableTypes( - const AllNullableTypes* everything) = 0; + virtual ErrorOr> EchoAllNullableTypes(const AllNullableTypes* everything) = 0; // Returns the inner `aString` value from the wrapped object, to test // sending of nested objects. - virtual ErrorOr> ExtractNestedNullableString( - const AllNullableTypesWrapper& wrapper) = 0; + virtual ErrorOr> ExtractNestedNullableString(const AllNullableTypesWrapper& wrapper) = 0; // Returns the inner `aString` value from the wrapped object, to test // sending of nested objects. - virtual ErrorOr CreateNestedNullableString( - const std::string* nullable_string) = 0; + virtual ErrorOr CreateNestedNullableString(const std::string* nullable_string) = 0; // Returns passed in arguments of multiple types. - virtual ErrorOr SendMultipleNullableTypes( - const bool* a_nullable_bool, const int64_t* a_nullable_int, - const std::string* a_nullable_string) = 0; + virtual ErrorOr SendMultipleNullableTypes(const bool* a_nullable_bool, const int64_t* a_nullable_int, const std::string* a_nullable_string) = 0; // Returns passed in int. - virtual ErrorOr> EchoNullableInt( - const int64_t* a_nullable_int) = 0; + virtual ErrorOr> EchoNullableInt(const int64_t* a_nullable_int) = 0; // Returns passed in double. - virtual ErrorOr> EchoNullableDouble( - const double* a_nullable_double) = 0; + virtual ErrorOr> EchoNullableDouble(const double* a_nullable_double) = 0; // Returns the passed in boolean. - virtual ErrorOr> EchoNullableBool( - const bool* a_nullable_bool) = 0; + virtual ErrorOr> EchoNullableBool(const bool* a_nullable_bool) = 0; // Returns the passed in string. - virtual ErrorOr> EchoNullableString( - const std::string* a_nullable_string) = 0; + virtual ErrorOr> EchoNullableString(const std::string* a_nullable_string) = 0; // Returns the passed in Uint8List. - virtual ErrorOr>> EchoNullableUint8List( - const std::vector* a_nullable_uint8_list) = 0; + virtual ErrorOr>> EchoNullableUint8List(const std::vector* a_nullable_uint8_list) = 0; // Returns the passed in generic Object. - virtual ErrorOr> EchoNullableObject( - const flutter::EncodableValue* a_nullable_object) = 0; + virtual ErrorOr> EchoNullableObject(const flutter::EncodableValue* a_nullable_object) = 0; // Returns the passed list, to test serialization and deserialization. - virtual ErrorOr> EchoNullableList( - const flutter::EncodableList* a_nullable_list) = 0; + virtual ErrorOr> EchoNullableList(const flutter::EncodableList* a_nullable_list) = 0; // Returns the passed map, to test serialization and deserialization. - virtual ErrorOr> EchoNullableMap( - const flutter::EncodableMap* a_nullable_map) = 0; + virtual ErrorOr> EchoNullableMap(const flutter::EncodableMap* a_nullable_map) = 0; // A no-op function taking no arguments and returning no value, to sanity // test basic asynchronous calling. - virtual void NoopAsync( - std::function reply)> result) = 0; + virtual void NoopAsync(std::function reply)> result) = 0; // Returns passed in int asynchronously. - virtual void EchoAsyncInt( - int64_t an_int, std::function reply)> result) = 0; + virtual void EchoAsyncInt(int64_t an_int, std::function reply)> result) = 0; // Returns passed in double asynchronously. - virtual void EchoAsyncDouble( - double a_double, std::function reply)> result) = 0; + virtual void EchoAsyncDouble(double a_double, std::function reply)> result) = 0; // Returns the passed in boolean asynchronously. - virtual void EchoAsyncBool( - bool a_bool, std::function reply)> result) = 0; + virtual void EchoAsyncBool(bool a_bool, std::function reply)> result) = 0; // Returns the passed string asynchronously. - virtual void EchoAsyncString( - const std::string& a_string, - std::function reply)> result) = 0; + virtual void EchoAsyncString(const std::string& a_string, std::function reply)> result) = 0; // Returns the passed in Uint8List asynchronously. - virtual void EchoAsyncUint8List( - const std::vector& a_uint8_list, - std::function> reply)> result) = 0; + virtual void EchoAsyncUint8List(const std::vector& a_uint8_list, std::function> reply)> result) = 0; // Returns the passed in generic Object asynchronously. - virtual void EchoAsyncObject( - const flutter::EncodableValue& an_object, - std::function reply)> result) = 0; - // Returns the passed list, to test serialization and deserialization - // asynchronously. - virtual void EchoAsyncList( - const flutter::EncodableList& a_list, - std::function reply)> result) = 0; - // Returns the passed map, to test serialization and deserialization - // asynchronously. - virtual void EchoAsyncMap( - const flutter::EncodableMap& a_map, - std::function reply)> result) = 0; + virtual void EchoAsyncObject(const flutter::EncodableValue& an_object, std::function reply)> result) = 0; + // Returns the passed list, to test serialization and deserialization asynchronously. + virtual void EchoAsyncList(const flutter::EncodableList& a_list, std::function reply)> result) = 0; + // Returns the passed map, to test serialization and deserialization asynchronously. + virtual void EchoAsyncMap(const flutter::EncodableMap& a_map, std::function reply)> result) = 0; // Responds with an error from an async function returning a value. - virtual void ThrowAsyncError( - std::function> reply)> - result) = 0; + virtual void ThrowAsyncError(std::function> reply)> result) = 0; // Responds with an error from an async void function. - virtual void ThrowAsyncErrorFromVoid( - std::function reply)> result) = 0; + virtual void ThrowAsyncErrorFromVoid(std::function reply)> result) = 0; // Responds with a Flutter error from an async function returning a value. - virtual void ThrowAsyncFlutterError( - std::function> reply)> - result) = 0; + virtual void ThrowAsyncFlutterError(std::function> reply)> result) = 0; // Returns the passed object, to test async serialization and deserialization. - virtual void EchoAsyncAllTypes( - const AllTypes& everything, - std::function reply)> result) = 0; + virtual void EchoAsyncAllTypes(const AllTypes& everything, std::function reply)> result) = 0; // Returns the passed object, to test serialization and deserialization. - virtual void EchoAsyncNullableAllNullableTypes( - const AllNullableTypes* everything, - std::function> reply)> - result) = 0; + virtual void EchoAsyncNullableAllNullableTypes(const AllNullableTypes* everything, std::function> reply)> result) = 0; // Returns passed in int asynchronously. - virtual void EchoAsyncNullableInt( - const int64_t* an_int, - std::function> reply)> result) = 0; + virtual void EchoAsyncNullableInt(const int64_t* an_int, std::function> reply)> result) = 0; // Returns passed in double asynchronously. - virtual void EchoAsyncNullableDouble( - const double* a_double, - std::function> reply)> result) = 0; + virtual void EchoAsyncNullableDouble(const double* a_double, std::function> reply)> result) = 0; // Returns the passed in boolean asynchronously. - virtual void EchoAsyncNullableBool( - const bool* a_bool, - std::function> reply)> result) = 0; + virtual void EchoAsyncNullableBool(const bool* a_bool, std::function> reply)> result) = 0; // Returns the passed string asynchronously. - virtual void EchoAsyncNullableString( - const std::string* a_string, - std::function> reply)> - result) = 0; + virtual void EchoAsyncNullableString(const std::string* a_string, std::function> reply)> result) = 0; // Returns the passed in Uint8List asynchronously. - virtual void EchoAsyncNullableUint8List( - const std::vector* a_uint8_list, - std::function>> reply)> - result) = 0; + virtual void EchoAsyncNullableUint8List(const std::vector* a_uint8_list, std::function>> reply)> result) = 0; // Returns the passed in generic Object asynchronously. - virtual void EchoAsyncNullableObject( - const flutter::EncodableValue* an_object, - std::function> reply)> - result) = 0; - // Returns the passed list, to test serialization and deserialization - // asynchronously. - virtual void EchoAsyncNullableList( - const flutter::EncodableList* a_list, - std::function> reply)> - result) = 0; - // Returns the passed map, to test serialization and deserialization - // asynchronously. - virtual void EchoAsyncNullableMap( - const flutter::EncodableMap* a_map, - std::function> reply)> - result) = 0; - virtual void CallFlutterNoop( - std::function reply)> result) = 0; - virtual void CallFlutterThrowError( - std::function> reply)> - result) = 0; - virtual void CallFlutterThrowErrorFromVoid( - std::function reply)> result) = 0; - virtual void CallFlutterEchoAllTypes( - const AllTypes& everything, - std::function reply)> result) = 0; - virtual void CallFlutterSendMultipleNullableTypes( - const bool* a_nullable_bool, const int64_t* a_nullable_int, - const std::string* a_nullable_string, - std::function reply)> result) = 0; - virtual void CallFlutterEchoBool( - bool a_bool, std::function reply)> result) = 0; - virtual void CallFlutterEchoInt( - int64_t an_int, std::function reply)> result) = 0; - virtual void CallFlutterEchoDouble( - double a_double, std::function reply)> result) = 0; - virtual void CallFlutterEchoString( - const std::string& a_string, - std::function reply)> result) = 0; - virtual void CallFlutterEchoUint8List( - const std::vector& a_list, - std::function> reply)> result) = 0; - virtual void CallFlutterEchoList( - const flutter::EncodableList& a_list, - std::function reply)> result) = 0; - virtual void CallFlutterEchoMap( - const flutter::EncodableMap& a_map, - std::function reply)> result) = 0; - virtual void CallFlutterEchoNullableBool( - const bool* a_bool, - std::function> reply)> result) = 0; - virtual void CallFlutterEchoNullableInt( - const int64_t* an_int, - std::function> reply)> result) = 0; - virtual void CallFlutterEchoNullableDouble( - const double* a_double, - std::function> reply)> result) = 0; - virtual void CallFlutterEchoNullableString( - const std::string* a_string, - std::function> reply)> - result) = 0; - virtual void CallFlutterEchoNullableUint8List( - const std::vector* a_list, - std::function>> reply)> - result) = 0; - virtual void CallFlutterEchoNullableList( - const flutter::EncodableList* a_list, - std::function> reply)> - result) = 0; - virtual void CallFlutterEchoNullableMap( - const flutter::EncodableMap* a_map, - std::function> reply)> - result) = 0; + virtual void EchoAsyncNullableObject(const flutter::EncodableValue* an_object, std::function> reply)> result) = 0; + // Returns the passed list, to test serialization and deserialization asynchronously. + virtual void EchoAsyncNullableList(const flutter::EncodableList* a_list, std::function> reply)> result) = 0; + // Returns the passed map, to test serialization and deserialization asynchronously. + virtual void EchoAsyncNullableMap(const flutter::EncodableMap* a_map, std::function> reply)> result) = 0; + virtual void CallFlutterNoop(std::function reply)> result) = 0; + virtual void CallFlutterThrowError(std::function> reply)> result) = 0; + virtual void CallFlutterThrowErrorFromVoid(std::function reply)> result) = 0; + virtual void CallFlutterEchoAllTypes(const AllTypes& everything, std::function reply)> result) = 0; + virtual void CallFlutterSendMultipleNullableTypes(const bool* a_nullable_bool, const int64_t* a_nullable_int, const std::string* a_nullable_string, std::function reply)> result) = 0; + virtual void CallFlutterEchoBool(bool a_bool, std::function reply)> result) = 0; + virtual void CallFlutterEchoInt(int64_t an_int, std::function reply)> result) = 0; + virtual void CallFlutterEchoDouble(double a_double, std::function reply)> result) = 0; + virtual void CallFlutterEchoString(const std::string& a_string, std::function reply)> result) = 0; + virtual void CallFlutterEchoUint8List(const std::vector& a_list, std::function> reply)> result) = 0; + virtual void CallFlutterEchoList(const flutter::EncodableList& a_list, std::function reply)> result) = 0; + virtual void CallFlutterEchoMap(const flutter::EncodableMap& a_map, std::function reply)> result) = 0; + virtual void CallFlutterEchoNullableBool(const bool* a_bool, std::function> reply)> result) = 0; + virtual void CallFlutterEchoNullableInt(const int64_t* an_int, std::function> reply)> result) = 0; + virtual void CallFlutterEchoNullableDouble(const double* a_double, std::function> reply)> result) = 0; + virtual void CallFlutterEchoNullableString(const std::string* a_string, std::function> reply)> result) = 0; + virtual void CallFlutterEchoNullableUint8List(const std::vector* a_list, std::function>> reply)> result) = 0; + virtual void CallFlutterEchoNullableList(const flutter::EncodableList* a_list, std::function> reply)> result) = 0; + virtual void CallFlutterEchoNullableMap(const flutter::EncodableMap* a_map, std::function> reply)> result) = 0; // The codec used by HostIntegrationCoreApi. static const flutter::StandardMessageCodec& GetCodec(); - // Sets up an instance of `HostIntegrationCoreApi` to handle messages through - // the `binary_messenger`. - static void SetUp(flutter::BinaryMessenger* binary_messenger, - HostIntegrationCoreApi* api); + // Sets up an instance of `HostIntegrationCoreApi` to handle messages through the `binary_messenger`. + static void SetUp(flutter::BinaryMessenger* binary_messenger, HostIntegrationCoreApi* api); static flutter::EncodableValue WrapError(std::string_view error_message); static flutter::EncodableValue WrapError(const FlutterError& error); protected: HostIntegrationCoreApi() = default; + }; -class FlutterIntegrationCoreApiCodecSerializer - : public flutter::StandardCodecSerializer { +class FlutterIntegrationCoreApiCodecSerializer : public flutter::StandardCodecSerializer { public: + inline static FlutterIntegrationCoreApiCodecSerializer& GetInstance() { static FlutterIntegrationCoreApiCodecSerializer sInstance; return sInstance; @@ -593,19 +507,17 @@ class FlutterIntegrationCoreApiCodecSerializer FlutterIntegrationCoreApiCodecSerializer(); public: - void WriteValue(const flutter::EncodableValue& value, - flutter::ByteStreamWriter* stream) const override; + void WriteValue(const flutter::EncodableValue& value, flutter::ByteStreamWriter* stream) const override; protected: - flutter::EncodableValue ReadValueOfType( - uint8_t type, flutter::ByteStreamReader* stream) const override; + flutter::EncodableValue ReadValueOfType(uint8_t type, flutter::ByteStreamReader* stream) const override; + }; // 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 C++. +// Generated class from Pigeon that represents Flutter messages that can be called from C++. class FlutterIntegrationCoreApi { private: flutter::BinaryMessenger* binary_messenger_; @@ -615,103 +527,58 @@ class FlutterIntegrationCoreApi { static const flutter::StandardMessageCodec& GetCodec(); // A no-op function taking no arguments and returning no value, to sanity // test basic calling. - void Noop(std::function&& on_success, - std::function&& on_error); + void Noop(std::function&& on_success, std::function&& on_error); // Responds with an error from an async function returning a value. - void ThrowError( - std::function&& on_success, - std::function&& on_error); + void ThrowError(std::function&& on_success, std::function&& on_error); // Responds with an error from an async void function. - void ThrowErrorFromVoid(std::function&& on_success, - std::function&& on_error); + void ThrowErrorFromVoid(std::function&& on_success, std::function&& on_error); // Returns the passed object, to test serialization and deserialization. - void EchoAllTypes(const AllTypes& everything, - std::function&& on_success, - std::function&& on_error); + void EchoAllTypes(const AllTypes& everything, std::function&& on_success, std::function&& on_error); // Returns the passed object, to test serialization and deserialization. - void EchoAllNullableTypes( - const AllNullableTypes& everything, - std::function&& on_success, - std::function&& on_error); + void EchoAllNullableTypes(const AllNullableTypes& everything, std::function&& on_success, std::function&& on_error); // Returns passed in arguments of multiple types. // // Tests multiple-arity FlutterApi handling. - void SendMultipleNullableTypes( - const bool* a_nullable_bool, const int64_t* a_nullable_int, - const std::string* a_nullable_string, - std::function&& on_success, - std::function&& on_error); + void SendMultipleNullableTypes(const bool* a_nullable_bool, const int64_t* a_nullable_int, const std::string* a_nullable_string, std::function&& on_success, std::function&& on_error); // Returns the passed boolean, to test serialization and deserialization. - void EchoBool(bool a_bool, std::function&& on_success, - std::function&& on_error); + void EchoBool(bool a_bool, std::function&& on_success, std::function&& on_error); // Returns the passed int, to test serialization and deserialization. - void EchoInt(int64_t an_int, std::function&& on_success, - std::function&& on_error); + void EchoInt(int64_t an_int, std::function&& on_success, std::function&& on_error); // Returns the passed double, to test serialization and deserialization. - void EchoDouble(double a_double, std::function&& on_success, - std::function&& on_error); + void EchoDouble(double a_double, std::function&& on_success, std::function&& on_error); // Returns the passed string, to test serialization and deserialization. - void EchoString(const std::string& a_string, - std::function&& on_success, - std::function&& on_error); + void EchoString(const std::string& a_string, std::function&& on_success, std::function&& on_error); // Returns the passed byte list, to test serialization and deserialization. - void EchoUint8List( - const std::vector& a_list, - std::function&)>&& on_success, - std::function&& on_error); + void EchoUint8List(const std::vector& a_list, std::function&)>&& on_success, std::function&& on_error); // Returns the passed list, to test serialization and deserialization. - void EchoList(const flutter::EncodableList& a_list, - std::function&& on_success, - std::function&& on_error); + void EchoList(const flutter::EncodableList& a_list, std::function&& on_success, std::function&& on_error); // Returns the passed map, to test serialization and deserialization. - void EchoMap(const flutter::EncodableMap& a_map, - std::function&& on_success, - std::function&& on_error); + void EchoMap(const flutter::EncodableMap& a_map, std::function&& on_success, std::function&& on_error); // Returns the passed boolean, to test serialization and deserialization. - void EchoNullableBool(const bool* a_bool, - std::function&& on_success, - std::function&& on_error); + void EchoNullableBool(const bool* a_bool, std::function&& on_success, std::function&& on_error); // Returns the passed int, to test serialization and deserialization. - void EchoNullableInt(const int64_t* an_int, - std::function&& on_success, - std::function&& on_error); + void EchoNullableInt(const int64_t* an_int, std::function&& on_success, std::function&& on_error); // Returns the passed double, to test serialization and deserialization. - void EchoNullableDouble(const double* a_double, - std::function&& on_success, - std::function&& on_error); + void EchoNullableDouble(const double* a_double, std::function&& on_success, std::function&& on_error); // Returns the passed string, to test serialization and deserialization. - void EchoNullableString(const std::string* a_string, - std::function&& on_success, - std::function&& on_error); + void EchoNullableString(const std::string* a_string, std::function&& on_success, std::function&& on_error); // Returns the passed byte list, to test serialization and deserialization. - void EchoNullableUint8List( - const std::vector* a_list, - std::function*)>&& on_success, - std::function&& on_error); + void EchoNullableUint8List(const std::vector* a_list, std::function*)>&& on_success, std::function&& on_error); // Returns the passed list, to test serialization and deserialization. - void EchoNullableList( - const flutter::EncodableList* a_list, - std::function&& on_success, - std::function&& on_error); + void EchoNullableList(const flutter::EncodableList* a_list, std::function&& on_success, std::function&& on_error); // Returns the passed map, to test serialization and deserialization. - void EchoNullableMap( - const flutter::EncodableMap* a_map, - std::function&& on_success, - std::function&& on_error); + void EchoNullableMap(const flutter::EncodableMap* a_map, std::function&& on_success, std::function&& on_error); // A no-op function taking no arguments and returning no value, to sanity // test basic asynchronous calling. - void NoopAsync(std::function&& on_success, - std::function&& on_error); + void NoopAsync(std::function&& on_success, std::function&& on_error); // Returns the passed in generic Object asynchronously. - void EchoAsyncString(const std::string& a_string, - std::function&& on_success, - std::function&& on_error); + void EchoAsyncString(const std::string& a_string, std::function&& on_success, std::function&& on_error); + }; // An API that can be implemented for minimal, compile-only tests. // -// Generated interface from Pigeon that represents a handler of messages from -// Flutter. +// Generated interface from Pigeon that represents a handler of messages from Flutter. class HostTrivialApi { public: HostTrivialApi(const HostTrivialApi&) = delete; @@ -721,44 +588,40 @@ class HostTrivialApi { // The codec used by HostTrivialApi. static const flutter::StandardMessageCodec& GetCodec(); - // Sets up an instance of `HostTrivialApi` to handle messages through the - // `binary_messenger`. - static void SetUp(flutter::BinaryMessenger* binary_messenger, - HostTrivialApi* api); + // Sets up an instance of `HostTrivialApi` to handle messages through the `binary_messenger`. + static void SetUp(flutter::BinaryMessenger* binary_messenger, HostTrivialApi* api); static flutter::EncodableValue WrapError(std::string_view error_message); static flutter::EncodableValue WrapError(const FlutterError& error); protected: HostTrivialApi() = default; + }; // A simple API implemented in some unit tests. // -// Generated interface from Pigeon that represents a handler of messages from -// Flutter. +// Generated interface from Pigeon that represents a handler of messages from Flutter. class HostSmallApi { public: HostSmallApi(const HostSmallApi&) = delete; HostSmallApi& operator=(const HostSmallApi&) = delete; virtual ~HostSmallApi() {} - virtual void Echo(const std::string& a_string, - std::function reply)> result) = 0; - virtual void VoidVoid( - std::function reply)> result) = 0; + virtual void Echo(const std::string& a_string, std::function reply)> result) = 0; + virtual void VoidVoid(std::function reply)> result) = 0; // The codec used by HostSmallApi. static const flutter::StandardMessageCodec& GetCodec(); - // Sets up an instance of `HostSmallApi` to handle messages through the - // `binary_messenger`. - static void SetUp(flutter::BinaryMessenger* binary_messenger, - HostSmallApi* api); + // Sets up an instance of `HostSmallApi` to handle messages through the `binary_messenger`. + static void SetUp(flutter::BinaryMessenger* binary_messenger, HostSmallApi* api); static flutter::EncodableValue WrapError(std::string_view error_message); static flutter::EncodableValue WrapError(const FlutterError& error); protected: HostSmallApi() = default; + }; class FlutterSmallApiCodecSerializer : public flutter::StandardCodecSerializer { public: + inline static FlutterSmallApiCodecSerializer& GetInstance() { static FlutterSmallApiCodecSerializer sInstance; return sInstance; @@ -767,18 +630,16 @@ class FlutterSmallApiCodecSerializer : public flutter::StandardCodecSerializer { FlutterSmallApiCodecSerializer(); public: - void WriteValue(const flutter::EncodableValue& value, - flutter::ByteStreamWriter* stream) const override; + void WriteValue(const flutter::EncodableValue& value, flutter::ByteStreamWriter* stream) const override; protected: - flutter::EncodableValue ReadValueOfType( - uint8_t type, flutter::ByteStreamReader* stream) const override; + flutter::EncodableValue ReadValueOfType(uint8_t type, flutter::ByteStreamReader* stream) const override; + }; // A simple API called in some unit tests. // -// Generated class from Pigeon that represents Flutter messages that can be -// called from C++. +// Generated class from Pigeon that represents Flutter messages that can be called from C++. class FlutterSmallApi { private: flutter::BinaryMessenger* binary_messenger_; @@ -786,9 +647,8 @@ class FlutterSmallApi { public: FlutterSmallApi(flutter::BinaryMessenger* binary_messenger); static const flutter::StandardMessageCodec& GetCodec(); - void EchoWrappedList(const TestMessage& msg, - std::function&& on_success, - std::function&& on_error); + void EchoWrappedList(const TestMessage& msg, std::function&& on_success, std::function&& on_error); + }; } // namespace core_tests_pigeontest From 4e2732c79ca7d0d6843aae015add2c9ab76fa70a Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Thu, 30 Mar 2023 16:25:41 -0700 Subject: [PATCH 3/6] formatting --- .../mock_handler_tester/test/message.dart | 27 +- .../pigeon/mock_handler_tester/test/test.dart | 40 +- .../CoreTests.java | 605 +- .../ios/Classes/CoreTests.gen.h | 370 +- .../ios/Classes/CoreTests.gen.m | 1627 +++--- .../lib/core_tests.gen.dart | 300 +- .../lib/flutter_unittests.gen.dart | 16 +- .../lib/multiple_arity.gen.dart | 7 +- .../lib/non_null_fields.gen.dart | 25 +- .../lib/null_fields.gen.dart | 21 +- .../lib/nullable_returns.gen.dart | 27 +- .../lib/primitive.gen.dart | 32 +- .../lib/src/generated/core_tests.gen.dart | 300 +- .../windows/pigeon/core_tests.gen.cpp | 4937 ++++++++++------- .../windows/pigeon/core_tests.gen.h | 492 +- 15 files changed, 5302 insertions(+), 3524 deletions(-) diff --git a/packages/pigeon/mock_handler_tester/test/message.dart b/packages/pigeon/mock_handler_tester/test/message.dart index 77f409337bb8..b6809821dfe6 100644 --- a/packages/pigeon/mock_handler_tester/test/message.dart +++ b/packages/pigeon/mock_handler_tester/test/message.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// +// // Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -144,9 +144,9 @@ class _MessageApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return MessageSearchReply.decode(readValue(buffer)!); - case 129: + case 129: return MessageSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -174,8 +174,7 @@ class MessageApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.MessageApi.initialize', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -242,11 +241,11 @@ class _MessageNestedApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return MessageNested.decode(readValue(buffer)!); - case 129: + case 129: return MessageSearchReply.decode(readValue(buffer)!); - case 130: + case 130: return MessageSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -314,9 +313,9 @@ class _MessageFlutterSearchApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return MessageSearchReply.decode(readValue(buffer)!); - case 129: + case 129: return MessageSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -331,7 +330,8 @@ abstract class MessageFlutterSearchApi { /// This comment is to test method documentation comments. MessageSearchReply search(MessageSearchRequest request); - static void setup(MessageFlutterSearchApi? api, {BinaryMessenger? binaryMessenger}) { + static void setup(MessageFlutterSearchApi? api, + {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.MessageFlutterSearchApi.search', codec, @@ -341,9 +341,10 @@ abstract class MessageFlutterSearchApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.MessageFlutterSearchApi.search was null.'); + 'Argument for dev.flutter.pigeon.MessageFlutterSearchApi.search was null.'); final List args = (message as List?)!; - final MessageSearchRequest? arg_request = (args[0] as MessageSearchRequest?); + final MessageSearchRequest? arg_request = + (args[0] as MessageSearchRequest?); assert(arg_request != null, 'Argument for dev.flutter.pigeon.MessageFlutterSearchApi.search was null, expected non-null MessageSearchRequest.'); final MessageSearchReply output = api.search(arg_request!); diff --git a/packages/pigeon/mock_handler_tester/test/test.dart b/packages/pigeon/mock_handler_tester/test/test.dart index 00a6f1aa48db..b5cae089112d 100644 --- a/packages/pigeon/mock_handler_tester/test/test.dart +++ b/packages/pigeon/mock_handler_tester/test/test.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// +// // Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, unnecessary_import @@ -32,9 +32,9 @@ class _TestHostApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return MessageSearchReply.decode(readValue(buffer)!); - case 129: + case 129: return MessageSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -62,9 +62,12 @@ abstract class TestHostApi { 'dev.flutter.pigeon.MessageApi.initialize', codec, binaryMessenger: binaryMessenger); if (api == null) { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, null); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockDecodedMessageHandler(channel, null); } else { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, (Object? message) async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockDecodedMessageHandler(channel, + (Object? message) async { // ignore message api.initialize(); return []; @@ -76,13 +79,17 @@ abstract class TestHostApi { 'dev.flutter.pigeon.MessageApi.search', codec, binaryMessenger: binaryMessenger); if (api == null) { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, null); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockDecodedMessageHandler(channel, null); } else { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, (Object? message) async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockDecodedMessageHandler(channel, + (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.MessageApi.search was null.'); + 'Argument for dev.flutter.pigeon.MessageApi.search was null.'); final List args = (message as List?)!; - final MessageSearchRequest? arg_request = (args[0] as MessageSearchRequest?); + final MessageSearchRequest? arg_request = + (args[0] as MessageSearchRequest?); assert(arg_request != null, 'Argument for dev.flutter.pigeon.MessageApi.search was null, expected non-null MessageSearchRequest.'); final MessageSearchReply output = api.search(arg_request!); @@ -114,11 +121,11 @@ class _TestNestedApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return MessageNested.decode(readValue(buffer)!); - case 129: + case 129: return MessageSearchReply.decode(readValue(buffer)!); - case 130: + case 130: return MessageSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -141,11 +148,14 @@ abstract class TestNestedApi { 'dev.flutter.pigeon.MessageNestedApi.search', codec, binaryMessenger: binaryMessenger); if (api == null) { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, null); + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockDecodedMessageHandler(channel, null); } else { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, (Object? message) async { + TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + .setMockDecodedMessageHandler(channel, + (Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.MessageNestedApi.search was null.'); + 'Argument for dev.flutter.pigeon.MessageNestedApi.search was null.'); final List args = (message as List?)!; final MessageNested? arg_nested = (args[0] as MessageNested?); assert(arg_nested != null, diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java b/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java index 9c1629fa5006..6d0b062b6da6 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/android/src/main/java/com/example/alternate_language_test_plugin/CoreTests.java @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// +// // Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon @@ -19,7 +19,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; -import java.util.HashMap; import java.util.List; import java.util.Map; @@ -36,8 +35,7 @@ public static class FlutterError extends RuntimeException { /** The error details. Must be a datatype supported by the api codec. */ public final Object details; - public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) - { + public FlutterError(@NonNull String code, @Nullable String message, @Nullable Object details) { super(message); this.code = code; this.details = details; @@ -56,7 +54,7 @@ private static ArrayList wrapError(@NonNull Throwable exception) { errorList.add(exception.toString()); errorList.add(exception.getClass().getSimpleName()); errorList.add( - "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); + "Cause: " + exception.getCause() + ", Stacktrace: " + Log.getStackTraceString(exception)); } return errorList; } @@ -361,9 +359,13 @@ ArrayList toList() { Object aBool = list.get(0); pigeonResult.setABool((Boolean) aBool); Object anInt = list.get(1); - pigeonResult.setAnInt((anInt == null) ? null : ((anInt instanceof Integer) ? (Integer) anInt : (Long) anInt)); + pigeonResult.setAnInt( + (anInt == null) ? null : ((anInt instanceof Integer) ? (Integer) anInt : (Long) anInt)); Object anInt64 = list.get(2); - pigeonResult.setAnInt64((anInt64 == null) ? null : ((anInt64 instanceof Integer) ? (Integer) anInt64 : (Long) anInt64)); + pigeonResult.setAnInt64( + (anInt64 == null) + ? null + : ((anInt64 instanceof Integer) ? (Integer) anInt64 : (Long) anInt64)); Object aDouble = list.get(3); pigeonResult.setADouble((Double) aDouble); Object aByteArray = list.get(4); @@ -619,7 +621,8 @@ public static final class Builder { private @Nullable Map nullableMapWithAnnotations; - public @NonNull Builder setNullableMapWithAnnotations(@Nullable Map setterArg) { + public @NonNull Builder setNullableMapWithAnnotations( + @Nullable Map setterArg) { this.nullableMapWithAnnotations = setterArg; return this; } @@ -692,9 +695,17 @@ ArrayList toList() { Object aNullableBool = list.get(0); pigeonResult.setANullableBool((Boolean) aNullableBool); Object aNullableInt = list.get(1); - pigeonResult.setANullableInt((aNullableInt == null) ? null : ((aNullableInt instanceof Integer) ? (Integer) aNullableInt : (Long) aNullableInt)); + pigeonResult.setANullableInt( + (aNullableInt == null) + ? null + : ((aNullableInt instanceof Integer) ? (Integer) aNullableInt : (Long) aNullableInt)); Object aNullableInt64 = list.get(2); - pigeonResult.setANullableInt64((aNullableInt64 == null) ? null : ((aNullableInt64 instanceof Integer) ? (Integer) aNullableInt64 : (Long) aNullableInt64)); + pigeonResult.setANullableInt64( + (aNullableInt64 == null) + ? null + : ((aNullableInt64 instanceof Integer) + ? (Integer) aNullableInt64 + : (Long) aNullableInt64)); Object aNullableDouble = list.get(3); pigeonResult.setANullableDouble((Double) aNullableDouble); Object aNullableByteArray = list.get(4); @@ -716,7 +727,8 @@ ArrayList toList() { Object nullableMapWithObject = list.get(12); pigeonResult.setNullableMapWithObject((Map) nullableMapWithObject); Object aNullableEnum = list.get(13); - pigeonResult.setANullableEnum(aNullableEnum == null ? null : AnEnum.values()[(int) aNullableEnum]); + pigeonResult.setANullableEnum( + aNullableEnum == null ? null : AnEnum.values()[(int) aNullableEnum]); Object aNullableString = list.get(14); pigeonResult.setANullableString((String) aNullableString); return pigeonResult; @@ -767,7 +779,8 @@ ArrayList toList() { static @NonNull AllNullableTypesWrapper fromList(@NonNull ArrayList list) { AllNullableTypesWrapper pigeonResult = new AllNullableTypesWrapper(); Object values = list.get(0); - pigeonResult.setValues((values == null) ? null : AllNullableTypes.fromList((ArrayList) values)); + pigeonResult.setValues( + (values == null) ? null : AllNullableTypes.fromList((ArrayList) values)); return pigeonResult; } } @@ -775,7 +788,7 @@ ArrayList toList() { /** * A data class containing a List, used in unit tests. * - * Generated class from Pigeon that represents data sent in messages. + *

Generated class from Pigeon that represents data sent in messages. */ public static final class TestMessage { private @Nullable List testList; @@ -867,97 +880,97 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) { } /** - * The core interface that each host language plugin must implement in - * platform_test integration tests. + * The core interface that each host language plugin must implement in platform_test integration + * tests. * - * Generated interface from Pigeon that represents a handler of messages from Flutter. + *

Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface HostIntegrationCoreApi { /** - * A no-op function taking no arguments and returning no value, to sanity - * test basic calling. + * 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. */ - @NonNull + @NonNull AllTypes echoAllTypes(@NonNull AllTypes everything); /** Returns an error, to test error handling. */ - @Nullable + @Nullable Object throwError(); /** Returns an error from a void function, to test error handling. */ void throwErrorFromVoid(); /** Returns a Flutter error, to test error handling. */ - @Nullable + @Nullable Object throwFlutterError(); /** Returns passed in int. */ - @NonNull + @NonNull Long echoInt(@NonNull Long anInt); /** Returns passed in double. */ - @NonNull + @NonNull Double echoDouble(@NonNull Double aDouble); /** Returns the passed in boolean. */ - @NonNull + @NonNull Boolean echoBool(@NonNull Boolean aBool); /** Returns the passed in string. */ - @NonNull + @NonNull String echoString(@NonNull String aString); /** Returns the passed in Uint8List. */ - @NonNull + @NonNull byte[] echoUint8List(@NonNull byte[] aUint8List); /** Returns the passed in generic Object. */ - @NonNull + @NonNull Object echoObject(@NonNull Object anObject); /** Returns the passed list, to test serialization and deserialization. */ - @NonNull + @NonNull List echoList(@NonNull List aList); /** Returns the passed map, to test serialization and deserialization. */ - @NonNull + @NonNull Map echoMap(@NonNull Map aMap); /** Returns the passed object, to test serialization and deserialization. */ - @Nullable + @Nullable AllNullableTypes echoAllNullableTypes(@Nullable AllNullableTypes everything); /** - * Returns the inner `aString` value from the wrapped object, to test - * sending of nested objects. + * Returns the inner `aString` value from the wrapped object, to test sending of nested objects. */ - @Nullable + @Nullable String extractNestedNullableString(@NonNull AllNullableTypesWrapper wrapper); /** - * Returns the inner `aString` value from the wrapped object, to test - * sending of nested objects. + * Returns the inner `aString` value from the wrapped object, to test sending of nested objects. */ - @NonNull + @NonNull AllNullableTypesWrapper createNestedNullableString(@Nullable String nullableString); /** Returns passed in arguments of multiple types. */ - @NonNull - AllNullableTypes sendMultipleNullableTypes(@Nullable Boolean aNullableBool, @Nullable Long aNullableInt, @Nullable String aNullableString); + @NonNull + AllNullableTypes sendMultipleNullableTypes( + @Nullable Boolean aNullableBool, + @Nullable Long aNullableInt, + @Nullable String aNullableString); /** Returns passed in int. */ - @Nullable + @Nullable Long echoNullableInt(@Nullable Long aNullableInt); /** Returns passed in double. */ - @Nullable + @Nullable Double echoNullableDouble(@Nullable Double aNullableDouble); /** Returns the passed in boolean. */ - @Nullable + @Nullable Boolean echoNullableBool(@Nullable Boolean aNullableBool); /** Returns the passed in string. */ - @Nullable + @Nullable String echoNullableString(@Nullable String aNullableString); /** Returns the passed in Uint8List. */ - @Nullable + @Nullable byte[] echoNullableUint8List(@Nullable byte[] aNullableUint8List); /** Returns the passed in generic Object. */ - @Nullable + @Nullable Object echoNullableObject(@Nullable Object aNullableObject); /** Returns the passed list, to test serialization and deserialization. */ - @Nullable + @Nullable List echoNullableList(@Nullable List aNullableList); /** Returns the passed map, to test serialization and deserialization. */ - @Nullable + @Nullable Map echoNullableMap(@Nullable Map aNullableMap); /** - * A no-op function taking no arguments and returning no value, to sanity - * test basic asynchronous calling. + * A no-op function taking no arguments and returning no value, to sanity test basic + * asynchronous calling. */ void noopAsync(Result result); /** Returns passed in int asynchronously. */ @@ -985,7 +998,8 @@ public interface HostIntegrationCoreApi { /** Returns the passed object, to test async serialization and deserialization. */ void echoAsyncAllTypes(@NonNull AllTypes everything, Result result); /** Returns the passed object, to test serialization and deserialization. */ - void echoAsyncNullableAllNullableTypes(@Nullable AllNullableTypes everything, Result result); + void echoAsyncNullableAllNullableTypes( + @Nullable AllNullableTypes everything, Result result); /** Returns passed in int asynchronously. */ void echoAsyncNullableInt(@Nullable Long anInt, Result result); /** Returns passed in double asynchronously. */ @@ -1001,7 +1015,8 @@ public interface HostIntegrationCoreApi { /** Returns the passed list, to test serialization and deserialization asynchronously. */ void echoAsyncNullableList(@Nullable List aList, Result> result); /** Returns the passed map, to test serialization and deserialization asynchronously. */ - void echoAsyncNullableMap(@Nullable Map aMap, Result> result); + void echoAsyncNullableMap( + @Nullable Map aMap, Result> result); void callFlutterNoop(Result result); @@ -1011,7 +1026,11 @@ public interface HostIntegrationCoreApi { void callFlutterEchoAllTypes(@NonNull AllTypes everything, Result result); - void callFlutterSendMultipleNullableTypes(@Nullable Boolean aNullableBool, @Nullable Long aNullableInt, @Nullable String aNullableString, Result result); + void callFlutterSendMultipleNullableTypes( + @Nullable Boolean aNullableBool, + @Nullable Long aNullableInt, + @Nullable String aNullableString, + Result result); void callFlutterEchoBool(@NonNull Boolean aBool, Result result); @@ -1039,13 +1058,17 @@ public interface HostIntegrationCoreApi { void callFlutterEchoNullableList(@Nullable List aList, Result> result); - void callFlutterEchoNullableMap(@Nullable Map aMap, Result> result); + void callFlutterEchoNullableMap( + @Nullable Map aMap, Result> result); /** The codec used by HostIntegrationCoreApi. */ static MessageCodec getCodec() { return HostIntegrationCoreApiCodec.INSTANCE; } - /**Sets up an instance of `HostIntegrationCoreApi` to handle messages through the `binaryMessenger`. */ + /** + * Sets up an instance of `HostIntegrationCoreApi` to handle messages through the + * `binaryMessenger`. + */ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = @@ -1058,8 +1081,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { api.noop(); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1072,7 +1094,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAllTypes", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAllTypes", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1082,8 +1106,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { AllTypes output = api.echoAllTypes(everythingArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1096,7 +1119,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwError", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.throwError", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1104,8 +1129,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Object output = api.throwError(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1118,7 +1142,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwErrorFromVoid", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.throwErrorFromVoid", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1126,8 +1152,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { api.throwErrorFromVoid(); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1140,7 +1165,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwFlutterError", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.throwFlutterError", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1148,8 +1175,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Object output = api.throwFlutterError(); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1172,8 +1198,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Long output = api.echoInt((anIntArg == null) ? null : anIntArg.longValue()); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1186,7 +1211,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoDouble", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoDouble", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1196,8 +1223,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Double output = api.echoDouble(aDoubleArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1220,8 +1246,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Boolean output = api.echoBool(aBoolArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1234,7 +1259,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoString", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoString", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1244,8 +1271,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { String output = api.echoString(aStringArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1258,7 +1284,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoUint8List", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoUint8List", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1268,8 +1296,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { byte[] output = api.echoUint8List(aUint8ListArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1282,7 +1309,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoObject", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoObject", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1292,8 +1321,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Object output = api.echoObject(anObjectArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1316,8 +1344,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { List output = api.echoList(aListArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1340,8 +1367,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Map output = api.echoMap(aMapArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1354,7 +1380,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAllNullableTypes", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAllNullableTypes", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1364,8 +1392,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { AllNullableTypes output = api.echoAllNullableTypes(everythingArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1378,7 +1405,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1388,8 +1417,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { String output = api.extractNestedNullableString(wrapperArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1402,7 +1430,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1410,10 +1440,10 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { ArrayList args = (ArrayList) message; String nullableStringArg = (String) args.get(0); try { - AllNullableTypesWrapper output = api.createNestedNullableString(nullableStringArg); + AllNullableTypesWrapper output = + api.createNestedNullableString(nullableStringArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1426,7 +1456,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1436,10 +1468,13 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { Number aNullableIntArg = (Number) args.get(1); String aNullableStringArg = (String) args.get(2); try { - AllNullableTypes output = api.sendMultipleNullableTypes(aNullableBoolArg, (aNullableIntArg == null) ? null : aNullableIntArg.longValue(), aNullableStringArg); + AllNullableTypes output = + api.sendMultipleNullableTypes( + aNullableBoolArg, + (aNullableIntArg == null) ? null : aNullableIntArg.longValue(), + aNullableStringArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1452,7 +1487,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableInt", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableInt", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1460,10 +1497,11 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { ArrayList args = (ArrayList) message; Number aNullableIntArg = (Number) args.get(0); try { - Long output = api.echoNullableInt((aNullableIntArg == null) ? null : aNullableIntArg.longValue()); + Long output = + api.echoNullableInt( + (aNullableIntArg == null) ? null : aNullableIntArg.longValue()); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1476,7 +1514,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableDouble", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableDouble", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1486,8 +1526,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Double output = api.echoNullableDouble(aNullableDoubleArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1500,7 +1539,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableBool", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableBool", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1510,8 +1551,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Boolean output = api.echoNullableBool(aNullableBoolArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1524,7 +1564,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableString", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableString", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1534,8 +1576,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { String output = api.echoNullableString(aNullableStringArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1548,7 +1589,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1558,8 +1601,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { byte[] output = api.echoNullableUint8List(aNullableUint8ListArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1572,7 +1614,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableObject", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableObject", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1582,8 +1626,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Object output = api.echoNullableObject(aNullableObjectArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1596,7 +1639,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableList", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableList", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1606,8 +1651,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { List output = api.echoNullableList(aNullableListArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1620,7 +1664,9 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableMap", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableMap", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1630,8 +1676,7 @@ static void setup(BinaryMessenger binaryMessenger, HostIntegrationCoreApi api) { try { Map output = api.echoNullableMap(aNullableMapArg); wrapped.add(0, output); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -1671,7 +1716,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncInt", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncInt", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1700,7 +1747,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncDouble", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncDouble", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1729,7 +1778,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncBool", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncBool", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1758,7 +1809,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncString", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncString", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1787,7 +1840,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncUint8List", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncUint8List", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1816,7 +1871,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncObject", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncObject", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1845,7 +1902,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncList", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncList", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1874,7 +1933,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncMap", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncMap", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1903,7 +1964,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncError", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncError", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1930,7 +1993,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1957,7 +2022,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -1984,7 +2051,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncAllTypes", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncAllTypes", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2013,7 +2082,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2042,7 +2113,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableInt", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableInt", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2062,7 +2135,8 @@ public void error(Throwable error) { } }; - api.echoAsyncNullableInt((anIntArg == null) ? null : anIntArg.longValue(), resultCallback); + api.echoAsyncNullableInt( + (anIntArg == null) ? null : anIntArg.longValue(), resultCallback); }); } else { channel.setMessageHandler(null); @@ -2071,7 +2145,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2100,7 +2176,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2129,7 +2207,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2158,7 +2238,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2187,7 +2269,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2216,7 +2300,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2245,7 +2331,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableMap", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableMap", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2274,7 +2362,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterNoop", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterNoop", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2301,7 +2391,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2328,7 +2420,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2355,7 +2449,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2384,7 +2480,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2406,7 +2504,11 @@ public void error(Throwable error) { } }; - api.callFlutterSendMultipleNullableTypes(aNullableBoolArg, (aNullableIntArg == null) ? null : aNullableIntArg.longValue(), aNullableStringArg, resultCallback); + api.callFlutterSendMultipleNullableTypes( + aNullableBoolArg, + (aNullableIntArg == null) ? null : aNullableIntArg.longValue(), + aNullableStringArg, + resultCallback); }); } else { channel.setMessageHandler(null); @@ -2415,7 +2517,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoBool", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoBool", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2444,7 +2548,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoInt", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoInt", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2464,7 +2570,8 @@ public void error(Throwable error) { } }; - api.callFlutterEchoInt((anIntArg == null) ? null : anIntArg.longValue(), resultCallback); + api.callFlutterEchoInt( + (anIntArg == null) ? null : anIntArg.longValue(), resultCallback); }); } else { channel.setMessageHandler(null); @@ -2473,7 +2580,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2502,7 +2611,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2531,7 +2642,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2560,7 +2673,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoList", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoList", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2589,7 +2704,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoMap", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoMap", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2618,7 +2735,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2647,7 +2766,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2667,7 +2788,8 @@ public void error(Throwable error) { } }; - api.callFlutterEchoNullableInt((anIntArg == null) ? null : anIntArg.longValue(), resultCallback); + api.callFlutterEchoNullableInt( + (anIntArg == null) ? null : anIntArg.longValue(), resultCallback); }); } else { channel.setMessageHandler(null); @@ -2676,7 +2798,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2705,7 +2829,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2734,7 +2860,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2763,7 +2891,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2792,7 +2922,9 @@ public void error(Throwable error) { { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap", + getCodec()); if (api != null) { channel.setMessageHandler( (message, reply) -> { @@ -2822,7 +2954,8 @@ public void error(Throwable error) { } private static class FlutterIntegrationCoreApiCodec extends StandardMessageCodec { - public static final FlutterIntegrationCoreApiCodec INSTANCE = new FlutterIntegrationCoreApiCodec(); + public static final FlutterIntegrationCoreApiCodec INSTANCE = + new FlutterIntegrationCoreApiCodec(); private FlutterIntegrationCoreApiCodec() {} @@ -2863,10 +2996,10 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) { } /** - * The core interface that the Dart platform_test code implements for host - * integration tests to call into. + * 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 Java. + *

Generated class from Pigeon that represents Flutter messages that can be called from Java. */ public static class FlutterIntegrationCoreApi { private final BinaryMessenger binaryMessenger; @@ -2875,7 +3008,8 @@ public FlutterIntegrationCoreApi(BinaryMessenger argBinaryMessenger) { this.binaryMessenger = argBinaryMessenger; } - /** Public interface for sending reply. */ public interface Reply { + /** Public interface for sending reply. */ + public interface Reply { void reply(T reply); } /** The codec used by FlutterIntegrationCoreApi. */ @@ -2883,22 +3017,21 @@ static MessageCodec getCodec() { return FlutterIntegrationCoreApiCodec.INSTANCE; } /** - * A no-op function taking no arguments and returning no value, to sanity - * test basic calling. + * A no-op function taking no arguments and returning no value, to sanity test basic calling. */ public void noop(Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.noop", getCodec()); - channel.send( - null, - channelReply -> callback.reply(null)); + channel.send(null, channelReply -> callback.reply(null)); } /** Responds with an error from an async function returning a value. */ public void throwError(Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.throwError", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.throwError", + getCodec()); channel.send( null, channelReply -> { @@ -2911,16 +3044,18 @@ public void throwError(Reply callback) { public void throwErrorFromVoid(Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid", getCodec()); - channel.send( - null, - channelReply -> callback.reply(null)); + binaryMessenger, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid", + getCodec()); + channel.send(null, channelReply -> callback.reply(null)); } /** Returns the passed object, to test serialization and deserialization. */ public void echoAllTypes(@NonNull AllTypes everythingArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes", + getCodec()); channel.send( new ArrayList(Collections.singletonList(everythingArg)), channelReply -> { @@ -2930,10 +3065,13 @@ public void echoAllTypes(@NonNull AllTypes everythingArg, Reply callba }); } /** Returns the passed object, to test serialization and deserialization. */ - public void echoAllNullableTypes(@NonNull AllNullableTypes everythingArg, Reply callback) { + public void echoAllNullableTypes( + @NonNull AllNullableTypes everythingArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes", + getCodec()); channel.send( new ArrayList(Collections.singletonList(everythingArg)), channelReply -> { @@ -2945,14 +3083,21 @@ public void echoAllNullableTypes(@NonNull AllNullableTypes everythingArg, Reply< /** * Returns passed in arguments of multiple types. * - * Tests multiple-arity FlutterApi handling. + *

Tests multiple-arity FlutterApi handling. */ - public void sendMultipleNullableTypes(@Nullable Boolean aNullableBoolArg, @Nullable Long aNullableIntArg, @Nullable String aNullableStringArg, Reply callback) { + public void sendMultipleNullableTypes( + @Nullable Boolean aNullableBoolArg, + @Nullable Long aNullableIntArg, + @Nullable String aNullableStringArg, + Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes", + getCodec()); channel.send( - new ArrayList(Arrays.asList(aNullableBoolArg, aNullableIntArg, aNullableStringArg)), + new ArrayList( + Arrays.asList(aNullableBoolArg, aNullableIntArg, aNullableStringArg)), channelReply -> { @SuppressWarnings("ConstantConditions") AllNullableTypes output = (AllNullableTypes) channelReply; @@ -2989,7 +3134,9 @@ public void echoInt(@NonNull Long anIntArg, Reply callback) { public void echoDouble(@NonNull Double aDoubleArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble", + getCodec()); channel.send( new ArrayList(Collections.singletonList(aDoubleArg)), channelReply -> { @@ -3002,7 +3149,9 @@ public void echoDouble(@NonNull Double aDoubleArg, Reply callback) { public void echoString(@NonNull String aStringArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString", + getCodec()); channel.send( new ArrayList(Collections.singletonList(aStringArg)), channelReply -> { @@ -3015,7 +3164,9 @@ public void echoString(@NonNull String aStringArg, Reply callback) { public void echoUint8List(@NonNull byte[] aListArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List", + getCodec()); channel.send( new ArrayList(Collections.singletonList(aListArg)), channelReply -> { @@ -3054,7 +3205,9 @@ public void echoMap(@NonNull Map aMapArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool", + getCodec()); channel.send( new ArrayList(Collections.singletonList(aBoolArg)), channelReply -> { @@ -3067,7 +3220,9 @@ public void echoNullableBool(@Nullable Boolean aBoolArg, Reply callback public void echoNullableInt(@Nullable Long anIntArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt", + getCodec()); channel.send( new ArrayList(Collections.singletonList(anIntArg)), channelReply -> { @@ -3080,7 +3235,9 @@ public void echoNullableInt(@Nullable Long anIntArg, Reply callback) { public void echoNullableDouble(@Nullable Double aDoubleArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble", + getCodec()); channel.send( new ArrayList(Collections.singletonList(aDoubleArg)), channelReply -> { @@ -3093,7 +3250,9 @@ public void echoNullableDouble(@Nullable Double aDoubleArg, Reply callba public void echoNullableString(@Nullable String aStringArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString", + getCodec()); channel.send( new ArrayList(Collections.singletonList(aStringArg)), channelReply -> { @@ -3106,7 +3265,9 @@ public void echoNullableString(@Nullable String aStringArg, Reply callba public void echoNullableUint8List(@Nullable byte[] aListArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List", + getCodec()); channel.send( new ArrayList(Collections.singletonList(aListArg)), channelReply -> { @@ -3119,7 +3280,9 @@ public void echoNullableUint8List(@Nullable byte[] aListArg, Reply callb public void echoNullableList(@Nullable List aListArg, Reply> callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList", + getCodec()); channel.send( new ArrayList(Collections.singletonList(aListArg)), channelReply -> { @@ -3129,10 +3292,13 @@ public void echoNullableList(@Nullable List aListArg, Reply }); } /** Returns the passed map, to test serialization and deserialization. */ - public void echoNullableMap(@Nullable Map aMapArg, Reply> callback) { + public void echoNullableMap( + @Nullable Map aMapArg, Reply> callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap", + getCodec()); channel.send( new ArrayList(Collections.singletonList(aMapArg)), channelReply -> { @@ -3142,22 +3308,24 @@ public void echoNullableMap(@Nullable Map aMapArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.noopAsync", getCodec()); - channel.send( - null, - channelReply -> callback.reply(null)); + binaryMessenger, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.noopAsync", + getCodec()); + channel.send(null, channelReply -> callback.reply(null)); } /** Returns the passed in generic Object asynchronously. */ public void echoAsyncString(@NonNull String aStringArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( - binaryMessenger, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString", getCodec()); + binaryMessenger, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString", + getCodec()); channel.send( new ArrayList(Collections.singletonList(aStringArg)), channelReply -> { @@ -3170,7 +3338,7 @@ public void echoAsyncString(@NonNull String aStringArg, Reply callback) /** * An API that can be implemented for minimal, compile-only tests. * - * Generated interface from Pigeon that represents a handler of messages from Flutter. + *

Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface HostTrivialApi { @@ -3180,7 +3348,7 @@ public interface HostTrivialApi { static MessageCodec getCodec() { return new StandardMessageCodec(); } - /**Sets up an instance of `HostTrivialApi` to handle messages through the `binaryMessenger`. */ + /** Sets up an instance of `HostTrivialApi` to handle messages through the `binaryMessenger`. */ static void setup(BinaryMessenger binaryMessenger, HostTrivialApi api) { { BasicMessageChannel channel = @@ -3193,8 +3361,7 @@ static void setup(BinaryMessenger binaryMessenger, HostTrivialApi api) { try { api.noop(); wrapped.add(0, null); - } - catch (Throwable exception) { + } catch (Throwable exception) { ArrayList wrappedError = wrapError(exception); wrapped = wrappedError; } @@ -3209,7 +3376,7 @@ static void setup(BinaryMessenger binaryMessenger, HostTrivialApi api) { /** * A simple API implemented in some unit tests. * - * Generated interface from Pigeon that represents a handler of messages from Flutter. + *

Generated interface from Pigeon that represents a handler of messages from Flutter. */ public interface HostSmallApi { @@ -3221,7 +3388,7 @@ public interface HostSmallApi { static MessageCodec getCodec() { return new StandardMessageCodec(); } - /**Sets up an instance of `HostSmallApi` to handle messages through the `binaryMessenger`. */ + /** Sets up an instance of `HostSmallApi` to handle messages through the `binaryMessenger`. */ static void setup(BinaryMessenger binaryMessenger, HostSmallApi api) { { BasicMessageChannel channel = @@ -3311,7 +3478,7 @@ protected void writeValue(@NonNull ByteArrayOutputStream stream, Object value) { /** * A simple API called in some unit tests. * - * Generated class from Pigeon that represents Flutter messages that can be called from Java. + *

Generated class from Pigeon that represents Flutter messages that can be called from Java. */ public static class FlutterSmallApi { private final BinaryMessenger binaryMessenger; @@ -3320,13 +3487,15 @@ public FlutterSmallApi(BinaryMessenger argBinaryMessenger) { this.binaryMessenger = argBinaryMessenger; } - /** Public interface for sending reply. */ public interface Reply { + /** Public interface for sending reply. */ + public interface Reply { void reply(T reply); } /** The codec used by FlutterSmallApi. */ static MessageCodec getCodec() { return FlutterSmallApiCodec.INSTANCE; } + public void echoWrappedList(@NonNull TestMessage msgArg, Reply callback) { BasicMessageChannel channel = new BasicMessageChannel<>( diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h index 923196c5c3c3..56451e824079 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.h @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// +// // Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon @@ -29,75 +29,77 @@ typedef NS_ENUM(NSUInteger, AnEnum) { /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithABool:(NSNumber *)aBool - anInt:(NSNumber *)anInt - anInt64:(NSNumber *)anInt64 - aDouble:(NSNumber *)aDouble - aByteArray:(FlutterStandardTypedData *)aByteArray - a4ByteArray:(FlutterStandardTypedData *)a4ByteArray - a8ByteArray:(FlutterStandardTypedData *)a8ByteArray - aFloatArray:(FlutterStandardTypedData *)aFloatArray - aList:(NSArray *)aList - aMap:(NSDictionary *)aMap - anEnum:(AnEnum)anEnum - aString:(NSString *)aString; -@property(nonatomic, strong) NSNumber * aBool; -@property(nonatomic, strong) NSNumber * anInt; -@property(nonatomic, strong) NSNumber * anInt64; -@property(nonatomic, strong) NSNumber * aDouble; -@property(nonatomic, strong) FlutterStandardTypedData * aByteArray; -@property(nonatomic, strong) FlutterStandardTypedData * a4ByteArray; -@property(nonatomic, strong) FlutterStandardTypedData * a8ByteArray; -@property(nonatomic, strong) FlutterStandardTypedData * aFloatArray; -@property(nonatomic, strong) NSArray * aList; -@property(nonatomic, strong) NSDictionary * aMap; + anInt:(NSNumber *)anInt + anInt64:(NSNumber *)anInt64 + aDouble:(NSNumber *)aDouble + aByteArray:(FlutterStandardTypedData *)aByteArray + a4ByteArray:(FlutterStandardTypedData *)a4ByteArray + a8ByteArray:(FlutterStandardTypedData *)a8ByteArray + aFloatArray:(FlutterStandardTypedData *)aFloatArray + aList:(NSArray *)aList + aMap:(NSDictionary *)aMap + anEnum:(AnEnum)anEnum + aString:(NSString *)aString; +@property(nonatomic, strong) NSNumber *aBool; +@property(nonatomic, strong) NSNumber *anInt; +@property(nonatomic, strong) NSNumber *anInt64; +@property(nonatomic, strong) NSNumber *aDouble; +@property(nonatomic, strong) FlutterStandardTypedData *aByteArray; +@property(nonatomic, strong) FlutterStandardTypedData *a4ByteArray; +@property(nonatomic, strong) FlutterStandardTypedData *a8ByteArray; +@property(nonatomic, strong) FlutterStandardTypedData *aFloatArray; +@property(nonatomic, strong) NSArray *aList; +@property(nonatomic, strong) NSDictionary *aMap; @property(nonatomic, assign) AnEnum anEnum; -@property(nonatomic, copy) NSString * aString; +@property(nonatomic, copy) NSString *aString; @end @interface AllNullableTypes : NSObject + (instancetype)makeWithANullableBool:(nullable NSNumber *)aNullableBool - aNullableInt:(nullable NSNumber *)aNullableInt - aNullableInt64:(nullable NSNumber *)aNullableInt64 - aNullableDouble:(nullable NSNumber *)aNullableDouble - aNullableByteArray:(nullable FlutterStandardTypedData *)aNullableByteArray - aNullable4ByteArray:(nullable FlutterStandardTypedData *)aNullable4ByteArray - aNullable8ByteArray:(nullable FlutterStandardTypedData *)aNullable8ByteArray - aNullableFloatArray:(nullable FlutterStandardTypedData *)aNullableFloatArray - aNullableList:(nullable NSArray *)aNullableList - aNullableMap:(nullable NSDictionary *)aNullableMap - nullableNestedList:(nullable NSArray *> *)nullableNestedList - nullableMapWithAnnotations:(nullable NSDictionary *)nullableMapWithAnnotations - nullableMapWithObject:(nullable NSDictionary *)nullableMapWithObject - aNullableEnum:(AnEnum)aNullableEnum - aNullableString:(nullable NSString *)aNullableString; -@property(nonatomic, strong, nullable) NSNumber * aNullableBool; -@property(nonatomic, strong, nullable) NSNumber * aNullableInt; -@property(nonatomic, strong, nullable) NSNumber * aNullableInt64; -@property(nonatomic, strong, nullable) NSNumber * aNullableDouble; -@property(nonatomic, strong, nullable) FlutterStandardTypedData * aNullableByteArray; -@property(nonatomic, strong, nullable) FlutterStandardTypedData * aNullable4ByteArray; -@property(nonatomic, strong, nullable) FlutterStandardTypedData * aNullable8ByteArray; -@property(nonatomic, strong, nullable) FlutterStandardTypedData * aNullableFloatArray; -@property(nonatomic, strong, nullable) NSArray * aNullableList; -@property(nonatomic, strong, nullable) NSDictionary * aNullableMap; -@property(nonatomic, strong, nullable) NSArray *> * nullableNestedList; -@property(nonatomic, strong, nullable) NSDictionary * nullableMapWithAnnotations; -@property(nonatomic, strong, nullable) NSDictionary * nullableMapWithObject; + aNullableInt:(nullable NSNumber *)aNullableInt + aNullableInt64:(nullable NSNumber *)aNullableInt64 + aNullableDouble:(nullable NSNumber *)aNullableDouble + aNullableByteArray:(nullable FlutterStandardTypedData *)aNullableByteArray + aNullable4ByteArray:(nullable FlutterStandardTypedData *)aNullable4ByteArray + aNullable8ByteArray:(nullable FlutterStandardTypedData *)aNullable8ByteArray + aNullableFloatArray:(nullable FlutterStandardTypedData *)aNullableFloatArray + aNullableList:(nullable NSArray *)aNullableList + aNullableMap:(nullable NSDictionary *)aNullableMap + nullableNestedList:(nullable NSArray *> *)nullableNestedList + nullableMapWithAnnotations: + (nullable NSDictionary *)nullableMapWithAnnotations + nullableMapWithObject:(nullable NSDictionary *)nullableMapWithObject + aNullableEnum:(AnEnum)aNullableEnum + aNullableString:(nullable NSString *)aNullableString; +@property(nonatomic, strong, nullable) NSNumber *aNullableBool; +@property(nonatomic, strong, nullable) NSNumber *aNullableInt; +@property(nonatomic, strong, nullable) NSNumber *aNullableInt64; +@property(nonatomic, strong, nullable) NSNumber *aNullableDouble; +@property(nonatomic, strong, nullable) FlutterStandardTypedData *aNullableByteArray; +@property(nonatomic, strong, nullable) FlutterStandardTypedData *aNullable4ByteArray; +@property(nonatomic, strong, nullable) FlutterStandardTypedData *aNullable8ByteArray; +@property(nonatomic, strong, nullable) FlutterStandardTypedData *aNullableFloatArray; +@property(nonatomic, strong, nullable) NSArray *aNullableList; +@property(nonatomic, strong, nullable) NSDictionary *aNullableMap; +@property(nonatomic, strong, nullable) NSArray *> *nullableNestedList; +@property(nonatomic, strong, nullable) + NSDictionary *nullableMapWithAnnotations; +@property(nonatomic, strong, nullable) NSDictionary *nullableMapWithObject; @property(nonatomic, assign) AnEnum aNullableEnum; -@property(nonatomic, copy, nullable) NSString * aNullableString; +@property(nonatomic, copy, nullable) NSString *aNullableString; @end @interface AllNullableTypesWrapper : NSObject /// `init` unavailable to enforce nonnull fields, see the `make` class method. - (instancetype)init NS_UNAVAILABLE; + (instancetype)makeWithValues:(AllNullableTypes *)values; -@property(nonatomic, strong) AllNullableTypes * values; +@property(nonatomic, strong) AllNullableTypes *values; @end /// A data class containing a List, used in unit tests. @interface TestMessage : NSObject + (instancetype)makeWithTestList:(nullable NSArray *)testList; -@property(nonatomic, strong, nullable) NSArray * testList; +@property(nonatomic, strong, nullable) NSArray *testList; @end /// The codec used by HostIntegrationCoreApi. @@ -112,7 +114,8 @@ NSObject *HostIntegrationCoreApiGetCodec(void); /// Returns the passed object, to test serialization and deserialization. /// /// @return `nil` only when `error != nil`. -- (nullable AllTypes *)echoAllTypes:(AllTypes *)everything error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable AllTypes *)echoAllTypes:(AllTypes *)everything + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns an error, to test error handling. - (nullable id)throwErrorWithError:(FlutterError *_Nullable *_Nonnull)error; /// Returns an error from a void function, to test error handling. @@ -126,7 +129,8 @@ NSObject *HostIntegrationCoreApiGetCodec(void); /// Returns passed in double. /// /// @return `nil` only when `error != nil`. -- (nullable NSNumber *)echoDouble:(NSNumber *)aDouble error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSNumber *)echoDouble:(NSNumber *)aDouble + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed in boolean. /// /// @return `nil` only when `error != nil`. @@ -134,11 +138,13 @@ NSObject *HostIntegrationCoreApiGetCodec(void); /// Returns the passed in string. /// /// @return `nil` only when `error != nil`. -- (nullable NSString *)echoString:(NSString *)aString error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSString *)echoString:(NSString *)aString + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed in Uint8List. /// /// @return `nil` only when `error != nil`. -- (nullable FlutterStandardTypedData *)echoUint8List:(FlutterStandardTypedData *)aUint8List error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FlutterStandardTypedData *)echoUint8List:(FlutterStandardTypedData *)aUint8List + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed in generic Object. /// /// @return `nil` only when `error != nil`. @@ -146,108 +152,182 @@ NSObject *HostIntegrationCoreApiGetCodec(void); /// Returns the passed list, to test serialization and deserialization. /// /// @return `nil` only when `error != nil`. -- (nullable NSArray *)echoList:(NSArray *)aList error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSArray *)echoList:(NSArray *)aList + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed map, to test serialization and deserialization. /// /// @return `nil` only when `error != nil`. -- (nullable NSDictionary *)echoMap:(NSDictionary *)aMap error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSDictionary *)echoMap:(NSDictionary *)aMap + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed object, to test serialization and deserialization. -- (nullable AllNullableTypes *)echoAllNullableTypes:(nullable AllNullableTypes *)everything error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable AllNullableTypes *)echoAllNullableTypes:(nullable AllNullableTypes *)everything + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the inner `aString` value from the wrapped object, to test /// sending of nested objects. -- (nullable NSString *)extractNestedNullableStringFrom:(AllNullableTypesWrapper *)wrapper error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSString *)extractNestedNullableStringFrom:(AllNullableTypesWrapper *)wrapper + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the inner `aString` value from the wrapped object, to test /// sending of nested objects. /// /// @return `nil` only when `error != nil`. -- (nullable AllNullableTypesWrapper *)createNestedObjectWithNullableString:(nullable NSString *)nullableString error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable AllNullableTypesWrapper *) + createNestedObjectWithNullableString:(nullable NSString *)nullableString + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns passed in arguments of multiple types. /// /// @return `nil` only when `error != nil`. -- (nullable AllNullableTypes *)sendMultipleNullableTypesABool:(nullable NSNumber *)aNullableBool anInt:(nullable NSNumber *)aNullableInt aString:(nullable NSString *)aNullableString error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable AllNullableTypes *)sendMultipleNullableTypesABool:(nullable NSNumber *)aNullableBool + anInt:(nullable NSNumber *)aNullableInt + aString:(nullable NSString *)aNullableString + error:(FlutterError *_Nullable *_Nonnull) + error; /// Returns passed in int. -- (nullable NSNumber *)echoNullableInt:(nullable NSNumber *)aNullableInt error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSNumber *)echoNullableInt:(nullable NSNumber *)aNullableInt + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns passed in double. -- (nullable NSNumber *)echoNullableDouble:(nullable NSNumber *)aNullableDouble error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSNumber *)echoNullableDouble:(nullable NSNumber *)aNullableDouble + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed in boolean. -- (nullable NSNumber *)echoNullableBool:(nullable NSNumber *)aNullableBool error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSNumber *)echoNullableBool:(nullable NSNumber *)aNullableBool + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed in string. -- (nullable NSString *)echoNullableString:(nullable NSString *)aNullableString error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSString *)echoNullableString:(nullable NSString *)aNullableString + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed in Uint8List. -- (nullable FlutterStandardTypedData *)echoNullableUint8List:(nullable FlutterStandardTypedData *)aNullableUint8List error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable FlutterStandardTypedData *) + echoNullableUint8List:(nullable FlutterStandardTypedData *)aNullableUint8List + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed in generic Object. -- (nullable id)echoNullableObject:(nullable id)aNullableObject error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable id)echoNullableObject:(nullable id)aNullableObject + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed list, to test serialization and deserialization. -- (nullable NSArray *)echoNullableList:(nullable NSArray *)aNullableList error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSArray *)echoNullableList:(nullable NSArray *)aNullableList + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed map, to test serialization and deserialization. -- (nullable NSDictionary *)echoNullableMap:(nullable NSDictionary *)aNullableMap error:(FlutterError *_Nullable *_Nonnull)error; +- (nullable NSDictionary *)echoNullableMap: + (nullable NSDictionary *)aNullableMap + error:(FlutterError *_Nullable *_Nonnull)error; /// A no-op function taking no arguments and returning no value, to sanity /// test basic asynchronous calling. - (void)noopAsyncWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Returns passed in int asynchronously. -- (void)echoAsyncInt:(NSNumber *)anInt completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncInt:(NSNumber *)anInt + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns passed in double asynchronously. -- (void)echoAsyncDouble:(NSNumber *)aDouble completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncDouble:(NSNumber *)aDouble + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed in boolean asynchronously. -- (void)echoAsyncBool:(NSNumber *)aBool completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncBool:(NSNumber *)aBool + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed string asynchronously. -- (void)echoAsyncString:(NSString *)aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncString:(NSString *)aString + completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed in Uint8List asynchronously. -- (void)echoAsyncUint8List:(FlutterStandardTypedData *)aUint8List completion:(void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncUint8List:(FlutterStandardTypedData *)aUint8List + completion:(void (^)(FlutterStandardTypedData *_Nullable, + FlutterError *_Nullable))completion; /// Returns the passed in generic Object asynchronously. -- (void)echoAsyncObject:(id)anObject completion:(void (^)(id _Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncObject:(id)anObject + completion:(void (^)(id _Nullable, FlutterError *_Nullable))completion; /// Returns the passed list, to test serialization and deserialization asynchronously. -- (void)echoAsyncList:(NSArray *)aList completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncList:(NSArray *)aList + completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed map, to test serialization and deserialization asynchronously. -- (void)echoAsyncMap:(NSDictionary *)aMap completion:(void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncMap:(NSDictionary *)aMap + completion:(void (^)(NSDictionary *_Nullable, + FlutterError *_Nullable))completion; /// Responds with an error from an async function returning a value. - (void)throwAsyncErrorWithCompletion:(void (^)(id _Nullable, FlutterError *_Nullable))completion; /// Responds with an error from an async void function. - (void)throwAsyncErrorFromVoidWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Responds with a Flutter error from an async function returning a value. -- (void)throwAsyncFlutterErrorWithCompletion:(void (^)(id _Nullable, FlutterError *_Nullable))completion; +- (void)throwAsyncFlutterErrorWithCompletion:(void (^)(id _Nullable, + FlutterError *_Nullable))completion; /// Returns the passed object, to test async serialization and deserialization. -- (void)echoAsyncAllTypes:(AllTypes *)everything completion:(void (^)(AllTypes *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncAllTypes:(AllTypes *)everything + completion:(void (^)(AllTypes *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed object, to test serialization and deserialization. -- (void)echoAsyncNullableAllNullableTypes:(nullable AllNullableTypes *)everything completion:(void (^)(AllNullableTypes *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncNullableAllNullableTypes:(nullable AllNullableTypes *)everything + completion:(void (^)(AllNullableTypes *_Nullable, + FlutterError *_Nullable))completion; /// Returns passed in int asynchronously. -- (void)echoAsyncNullableInt:(nullable NSNumber *)anInt completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncNullableInt:(nullable NSNumber *)anInt + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns passed in double asynchronously. -- (void)echoAsyncNullableDouble:(nullable NSNumber *)aDouble completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncNullableDouble:(nullable NSNumber *)aDouble + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed in boolean asynchronously. -- (void)echoAsyncNullableBool:(nullable NSNumber *)aBool completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncNullableBool:(nullable NSNumber *)aBool + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed string asynchronously. -- (void)echoAsyncNullableString:(nullable NSString *)aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncNullableString:(nullable NSString *)aString + completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed in Uint8List asynchronously. -- (void)echoAsyncNullableUint8List:(nullable FlutterStandardTypedData *)aUint8List completion:(void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncNullableUint8List:(nullable FlutterStandardTypedData *)aUint8List + completion:(void (^)(FlutterStandardTypedData *_Nullable, + FlutterError *_Nullable))completion; /// Returns the passed in generic Object asynchronously. -- (void)echoAsyncNullableObject:(nullable id)anObject completion:(void (^)(id _Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncNullableObject:(nullable id)anObject + completion:(void (^)(id _Nullable, FlutterError *_Nullable))completion; /// Returns the passed list, to test serialization and deserialization asynchronously. -- (void)echoAsyncNullableList:(nullable NSArray *)aList completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncNullableList:(nullable NSArray *)aList + completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed map, to test serialization and deserialization asynchronously. -- (void)echoAsyncNullableMap:(nullable NSDictionary *)aMap completion:(void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncNullableMap:(nullable NSDictionary *)aMap + completion:(void (^)(NSDictionary *_Nullable, + FlutterError *_Nullable))completion; - (void)callFlutterNoopWithCompletion:(void (^)(FlutterError *_Nullable))completion; -- (void)callFlutterThrowErrorWithCompletion:(void (^)(id _Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterThrowErrorWithCompletion:(void (^)(id _Nullable, + FlutterError *_Nullable))completion; - (void)callFlutterThrowErrorFromVoidWithCompletion:(void (^)(FlutterError *_Nullable))completion; -- (void)callFlutterEchoAllTypes:(AllTypes *)everything completion:(void (^)(AllTypes *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterSendMultipleNullableTypesABool:(nullable NSNumber *)aNullableBool anInt:(nullable NSNumber *)aNullableInt aString:(nullable NSString *)aNullableString completion:(void (^)(AllNullableTypes *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoBool:(NSNumber *)aBool completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoInt:(NSNumber *)anInt completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoDouble:(NSNumber *)aDouble completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoString:(NSString *)aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoUint8List:(FlutterStandardTypedData *)aList completion:(void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoList:(NSArray *)aList completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoMap:(NSDictionary *)aMap completion:(void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoNullableBool:(nullable NSNumber *)aBool completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoNullableInt:(nullable NSNumber *)anInt completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoNullableDouble:(nullable NSNumber *)aDouble completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoNullableString:(nullable NSString *)aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoNullableUint8List:(nullable FlutterStandardTypedData *)aList completion:(void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoNullableList:(nullable NSArray *)aList completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; -- (void)callFlutterEchoNullableMap:(nullable NSDictionary *)aMap completion:(void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoAllTypes:(AllTypes *)everything + completion:(void (^)(AllTypes *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterSendMultipleNullableTypesABool:(nullable NSNumber *)aNullableBool + anInt:(nullable NSNumber *)aNullableInt + aString:(nullable NSString *)aNullableString + completion:(void (^)(AllNullableTypes *_Nullable, + FlutterError *_Nullable))completion; +- (void)callFlutterEchoBool:(NSNumber *)aBool + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoInt:(NSNumber *)anInt + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoDouble:(NSNumber *)aDouble + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoString:(NSString *)aString + completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoUint8List:(FlutterStandardTypedData *)aList + completion:(void (^)(FlutterStandardTypedData *_Nullable, + FlutterError *_Nullable))completion; +- (void)callFlutterEchoList:(NSArray *)aList + completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoMap:(NSDictionary *)aMap + completion:(void (^)(NSDictionary *_Nullable, + FlutterError *_Nullable))completion; +- (void)callFlutterEchoNullableBool:(nullable NSNumber *)aBool + completion: + (void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoNullableInt:(nullable NSNumber *)anInt + completion: + (void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoNullableDouble:(nullable NSNumber *)aDouble + completion: + (void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoNullableString:(nullable NSString *)aString + completion: + (void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoNullableUint8List:(nullable FlutterStandardTypedData *)aList + completion:(void (^)(FlutterStandardTypedData *_Nullable, + FlutterError *_Nullable))completion; +- (void)callFlutterEchoNullableList:(nullable NSArray *)aList + completion: + (void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)callFlutterEchoNullableMap:(nullable NSDictionary *)aMap + completion:(void (^)(NSDictionary *_Nullable, + FlutterError *_Nullable))completion; @end -extern void HostIntegrationCoreApiSetup(id binaryMessenger, NSObject *_Nullable api); +extern void HostIntegrationCoreApiSetup(id binaryMessenger, + NSObject *_Nullable api); /// The codec used by FlutterIntegrationCoreApi. NSObject *FlutterIntegrationCoreApiGetCodec(void); @@ -264,46 +344,72 @@ NSObject *FlutterIntegrationCoreApiGetCodec(void); /// Responds with an error from an async void function. - (void)throwErrorFromVoidWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Returns the passed object, to test serialization and deserialization. -- (void)echoAllTypes:(AllTypes *)everything completion:(void (^)(AllTypes *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAllTypes:(AllTypes *)everything + completion:(void (^)(AllTypes *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed object, to test serialization and deserialization. -- (void)echoAllNullableTypes:(AllNullableTypes *)everything completion:(void (^)(AllNullableTypes *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAllNullableTypes:(AllNullableTypes *)everything + completion: + (void (^)(AllNullableTypes *_Nullable, FlutterError *_Nullable))completion; /// Returns passed in arguments of multiple types. /// /// Tests multiple-arity FlutterApi handling. -- (void)sendMultipleNullableTypesABool:(nullable NSNumber *)aNullableBool anInt:(nullable NSNumber *)aNullableInt aString:(nullable NSString *)aNullableString completion:(void (^)(AllNullableTypes *_Nullable, FlutterError *_Nullable))completion; +- (void)sendMultipleNullableTypesABool:(nullable NSNumber *)aNullableBool + anInt:(nullable NSNumber *)aNullableInt + aString:(nullable NSString *)aNullableString + completion:(void (^)(AllNullableTypes *_Nullable, + FlutterError *_Nullable))completion; /// Returns the passed boolean, to test serialization and deserialization. -- (void)echoBool:(NSNumber *)aBool completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoBool:(NSNumber *)aBool + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed int, to test serialization and deserialization. -- (void)echoInt:(NSNumber *)anInt completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoInt:(NSNumber *)anInt + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed double, to test serialization and deserialization. -- (void)echoDouble:(NSNumber *)aDouble completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoDouble:(NSNumber *)aDouble + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed string, to test serialization and deserialization. -- (void)echoString:(NSString *)aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)echoString:(NSString *)aString + completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed byte list, to test serialization and deserialization. -- (void)echoUint8List:(FlutterStandardTypedData *)aList completion:(void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion; +- (void)echoUint8List:(FlutterStandardTypedData *)aList + completion: + (void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed list, to test serialization and deserialization. -- (void)echoList:(NSArray *)aList completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)echoList:(NSArray *)aList + completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed map, to test serialization and deserialization. -- (void)echoMap:(NSDictionary *)aMap completion:(void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion; +- (void)echoMap:(NSDictionary *)aMap + completion: + (void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed boolean, to test serialization and deserialization. -- (void)echoNullableBool:(nullable NSNumber *)aBool completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoNullableBool:(nullable NSNumber *)aBool + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed int, to test serialization and deserialization. -- (void)echoNullableInt:(nullable NSNumber *)anInt completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoNullableInt:(nullable NSNumber *)anInt + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed double, to test serialization and deserialization. -- (void)echoNullableDouble:(nullable NSNumber *)aDouble completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; +- (void)echoNullableDouble:(nullable NSNumber *)aDouble + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed string, to test serialization and deserialization. -- (void)echoNullableString:(nullable NSString *)aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)echoNullableString:(nullable NSString *)aString + completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed byte list, to test serialization and deserialization. -- (void)echoNullableUint8List:(nullable FlutterStandardTypedData *)aList completion:(void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion; +- (void)echoNullableUint8List:(nullable FlutterStandardTypedData *)aList + completion:(void (^)(FlutterStandardTypedData *_Nullable, + FlutterError *_Nullable))completion; /// Returns the passed list, to test serialization and deserialization. -- (void)echoNullableList:(nullable NSArray *)aList completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; +- (void)echoNullableList:(nullable NSArray *)aList + completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion; /// Returns the passed map, to test serialization and deserialization. -- (void)echoNullableMap:(nullable NSDictionary *)aMap completion:(void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion; +- (void)echoNullableMap:(nullable NSDictionary *)aMap + completion:(void (^)(NSDictionary *_Nullable, + FlutterError *_Nullable))completion; /// A no-op function taking no arguments and returning no value, to sanity /// test basic asynchronous calling. - (void)noopAsyncWithCompletion:(void (^)(FlutterError *_Nullable))completion; /// Returns the passed in generic Object asynchronously. -- (void)echoAsyncString:(NSString *)aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)echoAsyncString:(NSString *)aString + completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; @end /// The codec used by HostTrivialApi. @@ -314,18 +420,21 @@ NSObject *HostTrivialApiGetCodec(void); - (void)noopWithError:(FlutterError *_Nullable *_Nonnull)error; @end -extern void HostTrivialApiSetup(id binaryMessenger, NSObject *_Nullable api); +extern void HostTrivialApiSetup(id binaryMessenger, + NSObject *_Nullable api); /// The codec used by HostSmallApi. NSObject *HostSmallApiGetCodec(void); /// A simple API implemented in some unit tests. @protocol HostSmallApi -- (void)echoString:(NSString *)aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; +- (void)echoString:(NSString *)aString + completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion; - (void)voidVoidWithCompletion:(void (^)(FlutterError *_Nullable))completion; @end -extern void HostSmallApiSetup(id binaryMessenger, NSObject *_Nullable api); +extern void HostSmallApiSetup(id binaryMessenger, + NSObject *_Nullable api); /// The codec used by FlutterSmallApi. NSObject *FlutterSmallApiGetCodec(void); @@ -333,7 +442,8 @@ NSObject *FlutterSmallApiGetCodec(void); /// A simple API called in some unit tests. @interface FlutterSmallApi : NSObject - (instancetype)initWithBinaryMessenger:(id)binaryMessenger; -- (void)echoWrappedList:(TestMessage *)msg completion:(void (^)(TestMessage *_Nullable, FlutterError *_Nullable))completion; +- (void)echoWrappedList:(TestMessage *)msg + completion:(void (^)(TestMessage *_Nullable, FlutterError *_Nullable))completion; @end NS_ASSUME_NONNULL_END diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m index 4e2a032ec0d7..8dbfc80230e4 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/ios/Classes/CoreTests.gen.m @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// +// // Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon @@ -51,18 +51,18 @@ - (NSArray *)toList; @implementation AllTypes + (instancetype)makeWithABool:(NSNumber *)aBool - anInt:(NSNumber *)anInt - anInt64:(NSNumber *)anInt64 - aDouble:(NSNumber *)aDouble - aByteArray:(FlutterStandardTypedData *)aByteArray - a4ByteArray:(FlutterStandardTypedData *)a4ByteArray - a8ByteArray:(FlutterStandardTypedData *)a8ByteArray - aFloatArray:(FlutterStandardTypedData *)aFloatArray - aList:(NSArray *)aList - aMap:(NSDictionary *)aMap - anEnum:(AnEnum)anEnum - aString:(NSString *)aString { - AllTypes* pigeonResult = [[AllTypes alloc] init]; + anInt:(NSNumber *)anInt + anInt64:(NSNumber *)anInt64 + aDouble:(NSNumber *)aDouble + aByteArray:(FlutterStandardTypedData *)aByteArray + a4ByteArray:(FlutterStandardTypedData *)a4ByteArray + a8ByteArray:(FlutterStandardTypedData *)a8ByteArray + aFloatArray:(FlutterStandardTypedData *)aFloatArray + aList:(NSArray *)aList + aMap:(NSDictionary *)aMap + anEnum:(AnEnum)anEnum + aString:(NSString *)aString { + AllTypes *pigeonResult = [[AllTypes alloc] init]; pigeonResult.aBool = aBool; pigeonResult.anInt = anInt; pigeonResult.anInt64 = anInt64; @@ -127,21 +127,22 @@ - (NSArray *)toList { @implementation AllNullableTypes + (instancetype)makeWithANullableBool:(nullable NSNumber *)aNullableBool - aNullableInt:(nullable NSNumber *)aNullableInt - aNullableInt64:(nullable NSNumber *)aNullableInt64 - aNullableDouble:(nullable NSNumber *)aNullableDouble - aNullableByteArray:(nullable FlutterStandardTypedData *)aNullableByteArray - aNullable4ByteArray:(nullable FlutterStandardTypedData *)aNullable4ByteArray - aNullable8ByteArray:(nullable FlutterStandardTypedData *)aNullable8ByteArray - aNullableFloatArray:(nullable FlutterStandardTypedData *)aNullableFloatArray - aNullableList:(nullable NSArray *)aNullableList - aNullableMap:(nullable NSDictionary *)aNullableMap - nullableNestedList:(nullable NSArray *> *)nullableNestedList - nullableMapWithAnnotations:(nullable NSDictionary *)nullableMapWithAnnotations - nullableMapWithObject:(nullable NSDictionary *)nullableMapWithObject - aNullableEnum:(AnEnum)aNullableEnum - aNullableString:(nullable NSString *)aNullableString { - AllNullableTypes* pigeonResult = [[AllNullableTypes alloc] init]; + aNullableInt:(nullable NSNumber *)aNullableInt + aNullableInt64:(nullable NSNumber *)aNullableInt64 + aNullableDouble:(nullable NSNumber *)aNullableDouble + aNullableByteArray:(nullable FlutterStandardTypedData *)aNullableByteArray + aNullable4ByteArray:(nullable FlutterStandardTypedData *)aNullable4ByteArray + aNullable8ByteArray:(nullable FlutterStandardTypedData *)aNullable8ByteArray + aNullableFloatArray:(nullable FlutterStandardTypedData *)aNullableFloatArray + aNullableList:(nullable NSArray *)aNullableList + aNullableMap:(nullable NSDictionary *)aNullableMap + nullableNestedList:(nullable NSArray *> *)nullableNestedList + nullableMapWithAnnotations: + (nullable NSDictionary *)nullableMapWithAnnotations + nullableMapWithObject:(nullable NSDictionary *)nullableMapWithObject + aNullableEnum:(AnEnum)aNullableEnum + aNullableString:(nullable NSString *)aNullableString { + AllNullableTypes *pigeonResult = [[AllNullableTypes alloc] init]; pigeonResult.aNullableBool = aNullableBool; pigeonResult.aNullableInt = aNullableInt; pigeonResult.aNullableInt64 = aNullableInt64; @@ -204,7 +205,7 @@ - (NSArray *)toList { @implementation AllNullableTypesWrapper + (instancetype)makeWithValues:(AllNullableTypes *)values { - AllNullableTypesWrapper* pigeonResult = [[AllNullableTypesWrapper alloc] init]; + AllNullableTypesWrapper *pigeonResult = [[AllNullableTypesWrapper alloc] init]; pigeonResult.values = values; return pigeonResult; } @@ -226,7 +227,7 @@ - (NSArray *)toList { @implementation TestMessage + (instancetype)makeWithTestList:(nullable NSArray *)testList { - TestMessage* pigeonResult = [[TestMessage alloc] init]; + TestMessage *pigeonResult = [[TestMessage alloc] init]; pigeonResult.testList = testList; return pigeonResult; } @@ -250,13 +251,13 @@ @interface HostIntegrationCoreApiCodecReader : FlutterStandardReader @implementation HostIntegrationCoreApiCodecReader - (nullable id)readValueOfType:(UInt8)type { switch (type) { - case 128: + case 128: return [AllNullableTypes fromList:[self readValue]]; - case 129: + case 129: return [AllNullableTypesWrapper fromList:[self readValue]]; - case 130: + case 130: return [AllTypes fromList:[self readValue]]; - case 131: + case 131: return [TestMessage fromList:[self readValue]]; default: return [super readValueOfType:type]; @@ -301,23 +302,26 @@ - (FlutterStandardReader *)readerWithData:(NSData *)data { static FlutterStandardMessageCodec *sSharedObject = nil; static dispatch_once_t sPred = 0; dispatch_once(&sPred, ^{ - HostIntegrationCoreApiCodecReaderWriter *readerWriter = [[HostIntegrationCoreApiCodecReaderWriter alloc] init]; + HostIntegrationCoreApiCodecReaderWriter *readerWriter = + [[HostIntegrationCoreApiCodecReaderWriter alloc] init]; sSharedObject = [FlutterStandardMessageCodec codecWithReaderWriter:readerWriter]; }); return sSharedObject; } -void HostIntegrationCoreApiSetup(id binaryMessenger, NSObject *api) { +void HostIntegrationCoreApiSetup(id binaryMessenger, + NSObject *api) { /// A no-op function taking no arguments and returning no value, to sanity /// test basic calling. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.noop" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.noop" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(noopWithError:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(noopWithError:)", api); + NSCAssert([api respondsToSelector:@selector(noopWithError:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(noopWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; [api noopWithError:&error]; @@ -329,13 +333,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed object, to test serialization and deserialization. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAllTypes" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAllTypes" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAllTypes:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAllTypes:error:)", api); + NSCAssert( + [api respondsToSelector:@selector(echoAllTypes:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAllTypes:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; AllTypes *arg_everything = GetNullableObjectAtIndex(args, 0); @@ -349,13 +355,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns an error, to test error handling. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwError" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwError" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(throwErrorWithError:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(throwErrorWithError:)", api); + NSCAssert( + [api respondsToSelector:@selector(throwErrorWithError:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(throwErrorWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; id output = [api throwErrorWithError:&error]; @@ -367,13 +375,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns an error from a void function, to test error handling. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwErrorFromVoid" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwErrorFromVoid" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(throwErrorFromVoidWithError:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(throwErrorFromVoidWithError:)", api); + NSCAssert([api respondsToSelector:@selector(throwErrorFromVoidWithError:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(throwErrorFromVoidWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; [api throwErrorFromVoidWithError:&error]; @@ -385,13 +395,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns a Flutter error, to test error handling. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwFlutterError" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwFlutterError" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(throwFlutterErrorWithError:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(throwFlutterErrorWithError:)", api); + NSCAssert([api respondsToSelector:@selector(throwFlutterErrorWithError:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(throwFlutterErrorWithError:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; id output = [api throwFlutterErrorWithError:&error]; @@ -403,13 +415,14 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns passed in int. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoInt" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoInt" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoInt:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoInt:error:)", api); + NSCAssert([api respondsToSelector:@selector(echoInt:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoInt:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_anInt = GetNullableObjectAtIndex(args, 0); @@ -423,13 +436,14 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns passed in double. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoDouble" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoDouble" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoDouble:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoDouble:error:)", api); + NSCAssert([api respondsToSelector:@selector(echoDouble:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoDouble:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aDouble = GetNullableObjectAtIndex(args, 0); @@ -443,13 +457,14 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed in boolean. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoBool" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoBool" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoBool:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoBool:error:)", api); + NSCAssert([api respondsToSelector:@selector(echoBool:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoBool:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aBool = GetNullableObjectAtIndex(args, 0); @@ -463,13 +478,14 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed in string. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoString" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoString" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoString:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoString:error:)", api); + NSCAssert([api respondsToSelector:@selector(echoString:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoString:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_aString = GetNullableObjectAtIndex(args, 0); @@ -483,13 +499,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed in Uint8List. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoUint8List" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoUint8List" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoUint8List:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoUint8List:error:)", api); + NSCAssert( + [api respondsToSelector:@selector(echoUint8List:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoUint8List:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FlutterStandardTypedData *arg_aUint8List = GetNullableObjectAtIndex(args, 0); @@ -503,13 +521,14 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed in generic Object. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoObject" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoObject" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoObject:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoObject:error:)", api); + NSCAssert([api respondsToSelector:@selector(echoObject:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoObject:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; id arg_anObject = GetNullableObjectAtIndex(args, 0); @@ -523,13 +542,14 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed list, to test serialization and deserialization. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoList" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoList" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoList:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoList:error:)", api); + NSCAssert([api respondsToSelector:@selector(echoList:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoList:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_aList = GetNullableObjectAtIndex(args, 0); @@ -543,13 +563,14 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed map, to test serialization and deserialization. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoMap" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoMap" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoMap:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoMap:error:)", api); + NSCAssert([api respondsToSelector:@selector(echoMap:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoMap:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSDictionary *arg_aMap = GetNullableObjectAtIndex(args, 0); @@ -563,13 +584,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed object, to test serialization and deserialization. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAllNullableTypes" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAllNullableTypes" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAllNullableTypes:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAllNullableTypes:error:)", api); + NSCAssert([api respondsToSelector:@selector(echoAllNullableTypes:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoAllNullableTypes:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; AllNullableTypes *arg_everything = GetNullableObjectAtIndex(args, 0); @@ -584,13 +607,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO /// Returns the inner `aString` value from the wrapped object, to test /// sending of nested objects. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(extractNestedNullableStringFrom:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(extractNestedNullableStringFrom:error:)", api); + NSCAssert([api respondsToSelector:@selector(extractNestedNullableStringFrom:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(extractNestedNullableStringFrom:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; AllNullableTypesWrapper *arg_wrapper = GetNullableObjectAtIndex(args, 0); @@ -605,18 +630,21 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO /// Returns the inner `aString` value from the wrapped object, to test /// sending of nested objects. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(createNestedObjectWithNullableString:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(createNestedObjectWithNullableString:error:)", api); + NSCAssert([api respondsToSelector:@selector(createNestedObjectWithNullableString:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(createNestedObjectWithNullableString:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_nullableString = GetNullableObjectAtIndex(args, 0); FlutterError *error; - AllNullableTypesWrapper *output = [api createNestedObjectWithNullableString:arg_nullableString error:&error]; + AllNullableTypesWrapper *output = + [api createNestedObjectWithNullableString:arg_nullableString error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -625,20 +653,26 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns passed in arguments of multiple types. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(sendMultipleNullableTypesABool:anInt:aString:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(sendMultipleNullableTypesABool:anInt:aString:error:)", api); + NSCAssert([api respondsToSelector:@selector(sendMultipleNullableTypesABool: + anInt:aString:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(sendMultipleNullableTypesABool:anInt:aString:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aNullableBool = GetNullableObjectAtIndex(args, 0); NSNumber *arg_aNullableInt = GetNullableObjectAtIndex(args, 1); NSString *arg_aNullableString = GetNullableObjectAtIndex(args, 2); FlutterError *error; - AllNullableTypes *output = [api sendMultipleNullableTypesABool:arg_aNullableBool anInt:arg_aNullableInt aString:arg_aNullableString error:&error]; + AllNullableTypes *output = [api sendMultipleNullableTypesABool:arg_aNullableBool + anInt:arg_aNullableInt + aString:arg_aNullableString + error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -647,13 +681,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns passed in int. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableInt" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableInt" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoNullableInt:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableInt:error:)", api); + NSCAssert( + [api respondsToSelector:@selector(echoNullableInt:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableInt:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aNullableInt = GetNullableObjectAtIndex(args, 0); @@ -667,13 +703,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns passed in double. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableDouble" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableDouble" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoNullableDouble:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableDouble:error:)", api); + NSCAssert([api respondsToSelector:@selector(echoNullableDouble:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoNullableDouble:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aNullableDouble = GetNullableObjectAtIndex(args, 0); @@ -687,13 +725,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed in boolean. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableBool" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableBool" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoNullableBool:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableBool:error:)", api); + NSCAssert( + [api respondsToSelector:@selector(echoNullableBool:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableBool:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aNullableBool = GetNullableObjectAtIndex(args, 0); @@ -707,13 +747,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed in string. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableString" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableString" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoNullableString:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableString:error:)", api); + NSCAssert([api respondsToSelector:@selector(echoNullableString:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoNullableString:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_aNullableString = GetNullableObjectAtIndex(args, 0); @@ -727,18 +769,21 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed in Uint8List. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoNullableUint8List:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableUint8List:error:)", api); + NSCAssert([api respondsToSelector:@selector(echoNullableUint8List:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoNullableUint8List:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FlutterStandardTypedData *arg_aNullableUint8List = GetNullableObjectAtIndex(args, 0); FlutterError *error; - FlutterStandardTypedData *output = [api echoNullableUint8List:arg_aNullableUint8List error:&error]; + FlutterStandardTypedData *output = [api echoNullableUint8List:arg_aNullableUint8List + error:&error]; callback(wrapResult(output, error)); }]; } else { @@ -747,13 +792,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed in generic Object. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableObject" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableObject" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoNullableObject:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableObject:error:)", api); + NSCAssert([api respondsToSelector:@selector(echoNullableObject:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoNullableObject:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; id arg_aNullableObject = GetNullableObjectAtIndex(args, 0); @@ -767,13 +814,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed list, to test serialization and deserialization. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableList" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableList" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoNullableList:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableList:error:)", api); + NSCAssert( + [api respondsToSelector:@selector(echoNullableList:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableList:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_aNullableList = GetNullableObjectAtIndex(args, 0); @@ -787,13 +836,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed map, to test serialization and deserialization. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableMap" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableMap" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoNullableMap:error:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableMap:error:)", api); + NSCAssert( + [api respondsToSelector:@selector(echoNullableMap:error:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoNullableMap:error:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSDictionary *arg_aNullableMap = GetNullableObjectAtIndex(args, 0); @@ -808,13 +859,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO /// A no-op function taking no arguments and returning no value, to sanity /// test basic asynchronous calling. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.noopAsync" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.noopAsync" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(noopAsyncWithCompletion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(noopAsyncWithCompletion:)", api); + NSCAssert( + [api respondsToSelector:@selector(noopAsyncWithCompletion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(noopAsyncWithCompletion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { [api noopAsyncWithCompletion:^(FlutterError *_Nullable error) { callback(wrapResult(nil, error)); @@ -826,19 +879,22 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns passed in int asynchronously. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncInt" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncInt" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncInt:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncInt:completion:)", api); + NSCAssert( + [api respondsToSelector:@selector(echoAsyncInt:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncInt:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_anInt = GetNullableObjectAtIndex(args, 0); - [api echoAsyncInt:arg_anInt completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncInt:arg_anInt + completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -846,19 +902,22 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns passed in double asynchronously. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncDouble" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncDouble" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncDouble:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncDouble:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoAsyncDouble:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoAsyncDouble:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aDouble = GetNullableObjectAtIndex(args, 0); - [api echoAsyncDouble:arg_aDouble completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncDouble:arg_aDouble + completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -866,19 +925,22 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed in boolean asynchronously. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncBool" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncBool" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncBool:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncBool:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoAsyncBool:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoAsyncBool:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aBool = GetNullableObjectAtIndex(args, 0); - [api echoAsyncBool:arg_aBool completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncBool:arg_aBool + completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -886,19 +948,22 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed string asynchronously. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncString" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncString" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncString:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncString:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoAsyncString:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoAsyncString:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_aString = GetNullableObjectAtIndex(args, 0); - [api echoAsyncString:arg_aString completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncString:arg_aString + completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -906,19 +971,23 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed in Uint8List asynchronously. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncUint8List" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncUint8List" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncUint8List:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncUint8List:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoAsyncUint8List:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoAsyncUint8List:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FlutterStandardTypedData *arg_aUint8List = GetNullableObjectAtIndex(args, 0); - [api echoAsyncUint8List:arg_aUint8List completion:^(FlutterStandardTypedData *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncUint8List:arg_aUint8List + completion:^(FlutterStandardTypedData *_Nullable output, + FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -926,19 +995,22 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed in generic Object asynchronously. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncObject" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncObject" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncObject:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncObject:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoAsyncObject:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoAsyncObject:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; id arg_anObject = GetNullableObjectAtIndex(args, 0); - [api echoAsyncObject:arg_anObject completion:^(id _Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncObject:arg_anObject + completion:^(id _Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -946,19 +1018,22 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed list, to test serialization and deserialization asynchronously. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncList" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncList" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncList:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncList:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoAsyncList:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoAsyncList:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_aList = GetNullableObjectAtIndex(args, 0); - [api echoAsyncList:arg_aList completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncList:arg_aList + completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -966,19 +1041,23 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed map, to test serialization and deserialization asynchronously. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncMap" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncMap" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncMap:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncMap:completion:)", api); + NSCAssert( + [api respondsToSelector:@selector(echoAsyncMap:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncMap:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSDictionary *arg_aMap = GetNullableObjectAtIndex(args, 0); - [api echoAsyncMap:arg_aMap completion:^(NSDictionary *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncMap:arg_aMap + completion:^(NSDictionary *_Nullable output, + FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -986,13 +1065,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Responds with an error from an async function returning a value. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncError" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncError" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(throwAsyncErrorWithCompletion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(throwAsyncErrorWithCompletion:)", api); + NSCAssert([api respondsToSelector:@selector(throwAsyncErrorWithCompletion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(throwAsyncErrorWithCompletion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { [api throwAsyncErrorWithCompletion:^(id _Nullable output, FlutterError *_Nullable error) { callback(wrapResult(output, error)); @@ -1004,13 +1085,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Responds with an error from an async void function. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(throwAsyncErrorFromVoidWithCompletion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(throwAsyncErrorFromVoidWithCompletion:)", api); + NSCAssert([api respondsToSelector:@selector(throwAsyncErrorFromVoidWithCompletion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(throwAsyncErrorFromVoidWithCompletion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { [api throwAsyncErrorFromVoidWithCompletion:^(FlutterError *_Nullable error) { callback(wrapResult(nil, error)); @@ -1022,15 +1105,18 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Responds with a Flutter error from an async function returning a value. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(throwAsyncFlutterErrorWithCompletion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(throwAsyncFlutterErrorWithCompletion:)", api); + NSCAssert([api respondsToSelector:@selector(throwAsyncFlutterErrorWithCompletion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(throwAsyncFlutterErrorWithCompletion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { - [api throwAsyncFlutterErrorWithCompletion:^(id _Nullable output, FlutterError *_Nullable error) { + [api throwAsyncFlutterErrorWithCompletion:^(id _Nullable output, + FlutterError *_Nullable error) { callback(wrapResult(output, error)); }]; }]; @@ -1040,19 +1126,22 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed object, to test async serialization and deserialization. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncAllTypes" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncAllTypes" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncAllTypes:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncAllTypes:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoAsyncAllTypes:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoAsyncAllTypes:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; AllTypes *arg_everything = GetNullableObjectAtIndex(args, 0); - [api echoAsyncAllTypes:arg_everything completion:^(AllTypes *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncAllTypes:arg_everything + completion:^(AllTypes *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1060,19 +1149,24 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed object, to test serialization and deserialization. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName: + @"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableAllNullableTypes:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableAllNullableTypes:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableAllNullableTypes:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoAsyncNullableAllNullableTypes:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; AllNullableTypes *arg_everything = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableAllNullableTypes:arg_everything completion:^(AllNullableTypes *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableAllNullableTypes:arg_everything + completion:^(AllNullableTypes *_Nullable output, + FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1080,19 +1174,22 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns passed in int asynchronously. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableInt" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableInt" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableInt:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableInt:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableInt:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoAsyncNullableInt:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_anInt = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableInt:arg_anInt completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableInt:arg_anInt + completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1100,19 +1197,22 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns passed in double asynchronously. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableDouble:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableDouble:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableDouble:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoAsyncNullableDouble:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aDouble = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableDouble:arg_aDouble completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableDouble:arg_aDouble + completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1120,19 +1220,22 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed in boolean asynchronously. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableBool:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableBool:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableBool:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoAsyncNullableBool:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aBool = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableBool:arg_aBool completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableBool:arg_aBool + completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1140,19 +1243,22 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed string asynchronously. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableString:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableString:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableString:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoAsyncNullableString:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_aString = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableString:arg_aString completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableString:arg_aString + completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1160,19 +1266,23 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed in Uint8List asynchronously. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableUint8List:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableUint8List:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableUint8List:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoAsyncNullableUint8List:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FlutterStandardTypedData *arg_aUint8List = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableUint8List:arg_aUint8List completion:^(FlutterStandardTypedData *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableUint8List:arg_aUint8List + completion:^(FlutterStandardTypedData *_Nullable output, + FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1180,19 +1290,22 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed in generic Object asynchronously. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableObject:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableObject:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableObject:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoAsyncNullableObject:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; id arg_anObject = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableObject:arg_anObject completion:^(id _Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableObject:arg_anObject + completion:^(id _Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1200,19 +1313,22 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed list, to test serialization and deserialization asynchronously. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableList:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableList:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableList:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoAsyncNullableList:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_aList = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableList:arg_aList completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableList:arg_aList + completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1220,32 +1336,38 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } /// Returns the passed map, to test serialization and deserialization asynchronously. { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableMap" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableMap" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoAsyncNullableMap:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(echoAsyncNullableMap:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoAsyncNullableMap:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoAsyncNullableMap:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSDictionary *arg_aMap = GetNullableObjectAtIndex(args, 0); - [api echoAsyncNullableMap:arg_aMap completion:^(NSDictionary *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoAsyncNullableMap:arg_aMap + completion:^(NSDictionary *_Nullable output, + FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterNoop" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterNoop" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterNoopWithCompletion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterNoopWithCompletion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterNoopWithCompletion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterNoopWithCompletion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { [api callFlutterNoopWithCompletion:^(FlutterError *_Nullable error) { callback(wrapResult(nil, error)); @@ -1256,15 +1378,18 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterThrowErrorWithCompletion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterThrowErrorWithCompletion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterThrowErrorWithCompletion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterThrowErrorWithCompletion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { - [api callFlutterThrowErrorWithCompletion:^(id _Nullable output, FlutterError *_Nullable error) { + [api callFlutterThrowErrorWithCompletion:^(id _Nullable output, + FlutterError *_Nullable error) { callback(wrapResult(output, error)); }]; }]; @@ -1273,13 +1398,15 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterThrowErrorFromVoidWithCompletion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterThrowErrorFromVoidWithCompletion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterThrowErrorFromVoidWithCompletion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterThrowErrorFromVoidWithCompletion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { [api callFlutterThrowErrorFromVoidWithCompletion:^(FlutterError *_Nullable error) { callback(wrapResult(nil, error)); @@ -1290,306 +1417,369 @@ void HostIntegrationCoreApiSetup(id binaryMessenger, NSO } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoAllTypes:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoAllTypes:completion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoAllTypes:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterEchoAllTypes:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; AllTypes *arg_everything = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoAllTypes:arg_everything completion:^(AllTypes *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoAllTypes:arg_everything + completion:^(AllTypes *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName: + @"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterSendMultipleNullableTypesABool:anInt:aString:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterSendMultipleNullableTypesABool:anInt:aString:completion:)", api); + NSCAssert([api respondsToSelector:@selector + (callFlutterSendMultipleNullableTypesABool:anInt:aString:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterSendMultipleNullableTypesABool:anInt:aString:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aNullableBool = GetNullableObjectAtIndex(args, 0); NSNumber *arg_aNullableInt = GetNullableObjectAtIndex(args, 1); NSString *arg_aNullableString = GetNullableObjectAtIndex(args, 2); - [api callFlutterSendMultipleNullableTypesABool:arg_aNullableBool anInt:arg_aNullableInt aString:arg_aNullableString completion:^(AllNullableTypes *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterSendMultipleNullableTypesABool:arg_aNullableBool + anInt:arg_aNullableInt + aString:arg_aNullableString + completion:^(AllNullableTypes *_Nullable output, + FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoBool" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoBool" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoBool:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoBool:completion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoBool:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterEchoBool:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aBool = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoBool:arg_aBool completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoBool:arg_aBool + completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoInt" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoInt" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoInt:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoInt:completion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoInt:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterEchoInt:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_anInt = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoInt:arg_anInt completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoInt:arg_anInt + completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoDouble:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoDouble:completion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoDouble:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterEchoDouble:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aDouble = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoDouble:arg_aDouble completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoDouble:arg_aDouble + completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoString:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoString:completion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoString:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterEchoString:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_aString = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoString:arg_aString completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoString:arg_aString + completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoUint8List:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoUint8List:completion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoUint8List:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterEchoUint8List:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FlutterStandardTypedData *arg_aList = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoUint8List:arg_aList completion:^(FlutterStandardTypedData *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoUint8List:arg_aList + completion:^(FlutterStandardTypedData *_Nullable output, + FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoList" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoList" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoList:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoList:completion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoList:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterEchoList:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_aList = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoList:arg_aList completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoList:arg_aList + completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoMap" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoMap" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoMap:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoMap:completion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoMap:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterEchoMap:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSDictionary *arg_aMap = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoMap:arg_aMap completion:^(NSDictionary *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoMap:arg_aMap + completion:^(NSDictionary *_Nullable output, + FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableBool:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoNullableBool:completion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableBool:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterEchoNullableBool:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aBool = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoNullableBool:arg_aBool completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoNullableBool:arg_aBool + completion:^(NSNumber *_Nullable output, + FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableInt:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoNullableInt:completion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableInt:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterEchoNullableInt:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_anInt = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoNullableInt:arg_anInt completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoNullableInt:arg_anInt + completion:^(NSNumber *_Nullable output, + FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableDouble:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoNullableDouble:completion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableDouble:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterEchoNullableDouble:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSNumber *arg_aDouble = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoNullableDouble:arg_aDouble completion:^(NSNumber *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoNullableDouble:arg_aDouble + completion:^(NSNumber *_Nullable output, + FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableString:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoNullableString:completion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableString:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterEchoNullableString:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_aString = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoNullableString:arg_aString completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoNullableString:arg_aString + completion:^(NSString *_Nullable output, + FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName: + @"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableUint8List:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoNullableUint8List:completion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableUint8List:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterEchoNullableUint8List:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; FlutterStandardTypedData *arg_aList = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoNullableUint8List:arg_aList completion:^(FlutterStandardTypedData *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoNullableUint8List:arg_aList + completion:^(FlutterStandardTypedData *_Nullable output, + FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableList:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoNullableList:completion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableList:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterEchoNullableList:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSArray *arg_aList = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoNullableList:arg_aList completion:^(NSArray *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoNullableList:arg_aList + completion:^(NSArray *_Nullable output, + FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; } } { - FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap" + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:@"dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap" binaryMessenger:binaryMessenger - codec:HostIntegrationCoreApiGetCodec()]; + codec:HostIntegrationCoreApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableMap:completion:)], @"HostIntegrationCoreApi api (%@) doesn't respond to @selector(callFlutterEchoNullableMap:completion:)", api); + NSCAssert([api respondsToSelector:@selector(callFlutterEchoNullableMap:completion:)], + @"HostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(callFlutterEchoNullableMap:completion:)", + api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSDictionary *arg_aMap = GetNullableObjectAtIndex(args, 0); - [api callFlutterEchoNullableMap:arg_aMap completion:^(NSDictionary *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api callFlutterEchoNullableMap:arg_aMap + completion:^(NSDictionary *_Nullable output, + FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1601,13 +1791,13 @@ @interface FlutterIntegrationCoreApiCodecReader : FlutterStandardReader @implementation FlutterIntegrationCoreApiCodecReader - (nullable id)readValueOfType:(UInt8)type { switch (type) { - case 128: + case 128: return [AllNullableTypes fromList:[self readValue]]; - case 129: + case 129: return [AllNullableTypesWrapper fromList:[self readValue]]; - case 130: + case 130: return [AllTypes fromList:[self readValue]]; - case 131: + case 131: return [TestMessage fromList:[self readValue]]; default: return [super readValueOfType:type]; @@ -1652,7 +1842,8 @@ - (FlutterStandardReader *)readerWithData:(NSData *)data { static FlutterStandardMessageCodec *sSharedObject = nil; static dispatch_once_t sPred = 0; dispatch_once(&sPred, ^{ - FlutterIntegrationCoreApiCodecReaderWriter *readerWriter = [[FlutterIntegrationCoreApiCodecReaderWriter alloc] init]; + FlutterIntegrationCoreApiCodecReaderWriter *readerWriter = + [[FlutterIntegrationCoreApiCodecReaderWriter alloc] init]; sSharedObject = [FlutterStandardMessageCodec codecWithReaderWriter:readerWriter]; }); return sSharedObject; @@ -1672,243 +1863,273 @@ - (instancetype)initWithBinaryMessenger:(NSObject *)bina return self; } - (void)noopWithCompletion:(void (^)(FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.noop" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:nil reply:^(id reply) { - completion(nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:nil + reply:^(id reply) { + completion(nil); + }]; } - (void)throwErrorWithCompletion:(void (^)(id _Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.throwError" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:nil reply:^(id reply) { - id output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:nil + reply:^(id reply) { + id output = reply; + completion(output, nil); + }]; } - (void)throwErrorFromVoidWithCompletion:(void (^)(FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:nil reply:^(id reply) { - completion(nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:nil + reply:^(id reply) { + completion(nil); + }]; } -- (void)echoAllTypes:(AllTypes *)arg_everything completion:(void (^)(AllTypes *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoAllTypes:(AllTypes *)arg_everything + completion:(void (^)(AllTypes *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_everything ?: [NSNull null]] reply:^(id reply) { - AllTypes *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ arg_everything ?: [NSNull null] ] + reply:^(id reply) { + AllTypes *output = reply; + completion(output, nil); + }]; } -- (void)echoAllNullableTypes:(AllNullableTypes *)arg_everything completion:(void (^)(AllNullableTypes *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoAllNullableTypes:(AllNullableTypes *)arg_everything + completion: + (void (^)(AllNullableTypes *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_everything ?: [NSNull null]] reply:^(id reply) { - AllNullableTypes *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ arg_everything ?: [NSNull null] ] + reply:^(id reply) { + AllNullableTypes *output = reply; + completion(output, nil); + }]; } -- (void)sendMultipleNullableTypesABool:(nullable NSNumber *)arg_aNullableBool anInt:(nullable NSNumber *)arg_aNullableInt aString:(nullable NSString *)arg_aNullableString completion:(void (^)(AllNullableTypes *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel - messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_aNullableBool ?: [NSNull null], arg_aNullableInt ?: [NSNull null], arg_aNullableString ?: [NSNull null]] reply:^(id reply) { - AllNullableTypes *output = reply; - completion(output, nil); - }]; +- (void)sendMultipleNullableTypesABool:(nullable NSNumber *)arg_aNullableBool + anInt:(nullable NSNumber *)arg_aNullableInt + aString:(nullable NSString *)arg_aNullableString + completion:(void (^)(AllNullableTypes *_Nullable, + FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel + messageChannelWithName: + @"dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes" + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ + arg_aNullableBool ?: [NSNull null], arg_aNullableInt ?: [NSNull null], + arg_aNullableString ?: [NSNull null] + ] + reply:^(id reply) { + AllNullableTypes *output = reply; + completion(output, nil); + }]; } -- (void)echoBool:(NSNumber *)arg_aBool completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoBool:(NSNumber *)arg_aBool + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoBool" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_aBool ?: [NSNull null]] reply:^(id reply) { - NSNumber *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ arg_aBool ?: [NSNull null] ] + reply:^(id reply) { + NSNumber *output = reply; + completion(output, nil); + }]; } -- (void)echoInt:(NSNumber *)arg_anInt completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoInt:(NSNumber *)arg_anInt + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoInt" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_anInt ?: [NSNull null]] reply:^(id reply) { - NSNumber *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ arg_anInt ?: [NSNull null] ] + reply:^(id reply) { + NSNumber *output = reply; + completion(output, nil); + }]; } -- (void)echoDouble:(NSNumber *)arg_aDouble completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoDouble:(NSNumber *)arg_aDouble + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_aDouble ?: [NSNull null]] reply:^(id reply) { - NSNumber *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ arg_aDouble ?: [NSNull null] ] + reply:^(id reply) { + NSNumber *output = reply; + completion(output, nil); + }]; } -- (void)echoString:(NSString *)arg_aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoString:(NSString *)arg_aString + completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_aString ?: [NSNull null]] reply:^(id reply) { - NSString *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ arg_aString ?: [NSNull null] ] + reply:^(id reply) { + NSString *output = reply; + completion(output, nil); + }]; } -- (void)echoUint8List:(FlutterStandardTypedData *)arg_aList completion:(void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoUint8List:(FlutterStandardTypedData *)arg_aList + completion: + (void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_aList ?: [NSNull null]] reply:^(id reply) { - FlutterStandardTypedData *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ arg_aList ?: [NSNull null] ] + reply:^(id reply) { + FlutterStandardTypedData *output = reply; + completion(output, nil); + }]; } -- (void)echoList:(NSArray *)arg_aList completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoList:(NSArray *)arg_aList + completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_aList ?: [NSNull null]] reply:^(id reply) { - NSArray *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ arg_aList ?: [NSNull null] ] + reply:^(id reply) { + NSArray *output = reply; + completion(output, nil); + }]; } -- (void)echoMap:(NSDictionary *)arg_aMap completion:(void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoMap:(NSDictionary *)arg_aMap + completion: + (void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_aMap ?: [NSNull null]] reply:^(id reply) { - NSDictionary *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ arg_aMap ?: [NSNull null] ] + reply:^(id reply) { + NSDictionary *output = reply; + completion(output, nil); + }]; } -- (void)echoNullableBool:(nullable NSNumber *)arg_aBool completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoNullableBool:(nullable NSNumber *)arg_aBool + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_aBool ?: [NSNull null]] reply:^(id reply) { - NSNumber *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ arg_aBool ?: [NSNull null] ] + reply:^(id reply) { + NSNumber *output = reply; + completion(output, nil); + }]; } -- (void)echoNullableInt:(nullable NSNumber *)arg_anInt completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoNullableInt:(nullable NSNumber *)arg_anInt + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_anInt ?: [NSNull null]] reply:^(id reply) { - NSNumber *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ arg_anInt ?: [NSNull null] ] + reply:^(id reply) { + NSNumber *output = reply; + completion(output, nil); + }]; } -- (void)echoNullableDouble:(nullable NSNumber *)arg_aDouble completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoNullableDouble:(nullable NSNumber *)arg_aDouble + completion:(void (^)(NSNumber *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_aDouble ?: [NSNull null]] reply:^(id reply) { - NSNumber *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ arg_aDouble ?: [NSNull null] ] + reply:^(id reply) { + NSNumber *output = reply; + completion(output, nil); + }]; } -- (void)echoNullableString:(nullable NSString *)arg_aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoNullableString:(nullable NSString *)arg_aString + completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_aString ?: [NSNull null]] reply:^(id reply) { - NSString *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ arg_aString ?: [NSNull null] ] + reply:^(id reply) { + NSString *output = reply; + completion(output, nil); + }]; } -- (void)echoNullableUint8List:(nullable FlutterStandardTypedData *)arg_aList completion:(void (^)(FlutterStandardTypedData *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoNullableUint8List:(nullable FlutterStandardTypedData *)arg_aList + completion:(void (^)(FlutterStandardTypedData *_Nullable, + FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_aList ?: [NSNull null]] reply:^(id reply) { - FlutterStandardTypedData *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ arg_aList ?: [NSNull null] ] + reply:^(id reply) { + FlutterStandardTypedData *output = reply; + completion(output, nil); + }]; } -- (void)echoNullableList:(nullable NSArray *)arg_aList completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoNullableList:(nullable NSArray *)arg_aList + completion:(void (^)(NSArray *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_aList ?: [NSNull null]] reply:^(id reply) { - NSArray *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ arg_aList ?: [NSNull null] ] + reply:^(id reply) { + NSArray *output = reply; + completion(output, nil); + }]; } -- (void)echoNullableMap:(nullable NSDictionary *)arg_aMap completion:(void (^)(NSDictionary *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoNullableMap:(nullable NSDictionary *)arg_aMap + completion:(void (^)(NSDictionary *_Nullable, + FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_aMap ?: [NSNull null]] reply:^(id reply) { - NSDictionary *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ arg_aMap ?: [NSNull null] ] + reply:^(id reply) { + NSDictionary *output = reply; + completion(output, nil); + }]; } - (void)noopAsyncWithCompletion:(void (^)(FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.noopAsync" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:nil reply:^(id reply) { - completion(nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:nil + reply:^(id reply) { + completion(nil); + }]; } -- (void)echoAsyncString:(NSString *)arg_aString completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoAsyncString:(NSString *)arg_aString + completion:(void (^)(NSString *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString" - binaryMessenger:self.binaryMessenger - codec:FlutterIntegrationCoreApiGetCodec()]; - [channel sendMessage:@[arg_aString ?: [NSNull null]] reply:^(id reply) { - NSString *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterIntegrationCoreApiGetCodec()]; + [channel sendMessage:@[ arg_aString ?: [NSNull null] ] + reply:^(id reply) { + NSString *output = reply; + completion(output, nil); + }]; } @end @@ -1918,15 +2139,16 @@ - (void)echoAsyncString:(NSString *)arg_aString completion:(void (^)(NSString *_ return sSharedObject; } -void HostTrivialApiSetup(id binaryMessenger, NSObject *api) { +void HostTrivialApiSetup(id binaryMessenger, + NSObject *api) { { FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostTrivialApi.noop" - binaryMessenger:binaryMessenger - codec:HostTrivialApiGetCodec()]; + [[FlutterBasicMessageChannel alloc] initWithName:@"dev.flutter.pigeon.HostTrivialApi.noop" + binaryMessenger:binaryMessenger + codec:HostTrivialApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(noopWithError:)], @"HostTrivialApi api (%@) doesn't respond to @selector(noopWithError:)", api); + NSCAssert([api respondsToSelector:@selector(noopWithError:)], + @"HostTrivialApi api (%@) doesn't respond to @selector(noopWithError:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { FlutterError *error; [api noopWithError:&error]; @@ -1946,18 +2168,19 @@ void HostTrivialApiSetup(id binaryMessenger, NSObject binaryMessenger, NSObject *api) { { FlutterBasicMessageChannel *channel = - [[FlutterBasicMessageChannel alloc] - initWithName:@"dev.flutter.pigeon.HostSmallApi.echo" - binaryMessenger:binaryMessenger - codec:HostSmallApiGetCodec()]; + [[FlutterBasicMessageChannel alloc] initWithName:@"dev.flutter.pigeon.HostSmallApi.echo" + binaryMessenger:binaryMessenger + codec:HostSmallApiGetCodec()]; if (api) { - NSCAssert([api respondsToSelector:@selector(echoString:completion:)], @"HostSmallApi api (%@) doesn't respond to @selector(echoString:completion:)", api); + NSCAssert([api respondsToSelector:@selector(echoString:completion:)], + @"HostSmallApi api (%@) doesn't respond to @selector(echoString:completion:)", api); [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { NSArray *args = message; NSString *arg_aString = GetNullableObjectAtIndex(args, 0); - [api echoString:arg_aString completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { - callback(wrapResult(output, error)); - }]; + [api echoString:arg_aString + completion:^(NSString *_Nullable output, FlutterError *_Nullable error) { + callback(wrapResult(output, error)); + }]; }]; } else { [channel setMessageHandler:nil]; @@ -1965,12 +2188,13 @@ void HostSmallApiSetup(id binaryMessenger, NSObject *)bina } return self; } -- (void)echoWrappedList:(TestMessage *)arg_msg completion:(void (^)(TestMessage *_Nullable, FlutterError *_Nullable))completion { - FlutterBasicMessageChannel *channel = - [FlutterBasicMessageChannel +- (void)echoWrappedList:(TestMessage *)arg_msg + completion:(void (^)(TestMessage *_Nullable, FlutterError *_Nullable))completion { + FlutterBasicMessageChannel *channel = [FlutterBasicMessageChannel messageChannelWithName:@"dev.flutter.pigeon.FlutterSmallApi.echoWrappedList" - binaryMessenger:self.binaryMessenger - codec:FlutterSmallApiGetCodec()]; - [channel sendMessage:@[arg_msg ?: [NSNull null]] reply:^(id reply) { - TestMessage *output = reply; - completion(output, nil); - }]; + binaryMessenger:self.binaryMessenger + codec:FlutterSmallApiGetCodec()]; + [channel sendMessage:@[ arg_msg ?: [NSNull null] ] + reply:^(id reply) { + TestMessage *output = reply; + completion(output, nil); + }]; } @end - diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/core_tests.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/core_tests.gen.dart index fc2e678fe717..174688ae8f83 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/core_tests.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/core_tests.gen.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// +// // Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -177,11 +177,12 @@ class AllNullableTypes { aNullableList: result[8] as List?, aNullableMap: result[9] as Map?, nullableNestedList: (result[10] as List?)?.cast?>(), - nullableMapWithAnnotations: (result[11] as Map?)?.cast(), - nullableMapWithObject: (result[12] as Map?)?.cast(), - aNullableEnum: result[13] != null - ? AnEnum.values[result[13]! as int] - : null, + nullableMapWithAnnotations: + (result[11] as Map?)?.cast(), + nullableMapWithObject: + (result[12] as Map?)?.cast(), + aNullableEnum: + result[13] != null ? AnEnum.values[result[13]! as int] : null, aNullableString: result[14] as String?, ); } @@ -254,13 +255,13 @@ class _HostIntegrationCoreApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return AllNullableTypes.decode(readValue(buffer)!); - case 129: + case 129: return AllNullableTypesWrapper.decode(readValue(buffer)!); - case 130: + case 130: return AllTypes.decode(readValue(buffer)!); - case 131: + case 131: return TestMessage.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -286,8 +287,7 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.noop', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -337,8 +337,7 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.throwError', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -360,8 +359,7 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.throwErrorFromVoid', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -383,8 +381,7 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.throwFlutterError', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -626,7 +623,8 @@ class HostIntegrationCoreApi { } /// Returns the passed object, to test serialization and deserialization. - Future echoAllNullableTypes(AllNullableTypes? arg_everything) async { + Future echoAllNullableTypes( + AllNullableTypes? arg_everything) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAllNullableTypes', codec, binaryMessenger: _binaryMessenger); @@ -650,9 +648,11 @@ class HostIntegrationCoreApi { /// Returns the inner `aString` value from the wrapped object, to test /// sending of nested objects. - Future extractNestedNullableString(AllNullableTypesWrapper arg_wrapper) async { + Future extractNestedNullableString( + AllNullableTypesWrapper arg_wrapper) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_wrapper]) as List?; @@ -674,9 +674,11 @@ class HostIntegrationCoreApi { /// Returns the inner `aString` value from the wrapped object, to test /// sending of nested objects. - Future createNestedNullableString(String? arg_nullableString) async { + Future createNestedNullableString( + String? arg_nullableString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_nullableString]) as List?; @@ -702,12 +704,15 @@ class HostIntegrationCoreApi { } /// Returns passed in arguments of multiple types. - Future sendMultipleNullableTypes(bool? arg_aNullableBool, int? arg_aNullableInt, String? arg_aNullableString) async { + Future sendMultipleNullableTypes(bool? arg_aNullableBool, + int? arg_aNullableInt, String? arg_aNullableString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send([arg_aNullableBool, arg_aNullableInt, arg_aNullableString]) as List?; + final List? replyList = await channel.send( + [arg_aNullableBool, arg_aNullableInt, arg_aNullableString]) + as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -822,9 +827,11 @@ class HostIntegrationCoreApi { } /// Returns the passed in Uint8List. - Future echoNullableUint8List(Uint8List? arg_aNullableUint8List) async { + Future echoNullableUint8List( + Uint8List? arg_aNullableUint8List) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aNullableUint8List]) as List?; @@ -868,7 +875,8 @@ class HostIntegrationCoreApi { } /// Returns the passed list, to test serialization and deserialization. - Future?> echoNullableList(List? arg_aNullableList) async { + Future?> echoNullableList( + List? arg_aNullableList) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableList', codec, binaryMessenger: _binaryMessenger); @@ -891,7 +899,8 @@ class HostIntegrationCoreApi { } /// Returns the passed map, to test serialization and deserialization. - Future?> echoNullableMap(Map? arg_aNullableMap) async { + Future?> echoNullableMap( + Map? arg_aNullableMap) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableMap', codec, binaryMessenger: _binaryMessenger); @@ -919,8 +928,7 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.noopAsync', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1134,7 +1142,8 @@ class HostIntegrationCoreApi { } /// Returns the passed map, to test serialization and deserialization asynchronously. - Future> echoAsyncMap(Map arg_aMap) async { + Future> echoAsyncMap( + Map arg_aMap) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncMap', codec, binaryMessenger: _binaryMessenger); @@ -1166,8 +1175,7 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncError', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1187,10 +1195,10 @@ class HostIntegrationCoreApi { /// Responds with an error from an async void function. Future throwAsyncErrorFromVoid() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1210,10 +1218,10 @@ class HostIntegrationCoreApi { /// Responds with a Flutter error from an async function returning a value. Future throwAsyncFlutterError() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1259,9 +1267,11 @@ class HostIntegrationCoreApi { } /// Returns the passed object, to test serialization and deserialization. - Future echoAsyncNullableAllNullableTypes(AllNullableTypes? arg_everything) async { + Future echoAsyncNullableAllNullableTypes( + AllNullableTypes? arg_everything) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_everything]) as List?; @@ -1307,7 +1317,8 @@ class HostIntegrationCoreApi { /// Returns passed in double asynchronously. Future echoAsyncNullableDouble(double? arg_aDouble) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aDouble]) as List?; @@ -1330,7 +1341,8 @@ class HostIntegrationCoreApi { /// Returns the passed in boolean asynchronously. Future echoAsyncNullableBool(bool? arg_aBool) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aBool]) as List?; @@ -1353,7 +1365,8 @@ class HostIntegrationCoreApi { /// Returns the passed string asynchronously. Future echoAsyncNullableString(String? arg_aString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aString]) as List?; @@ -1374,9 +1387,11 @@ class HostIntegrationCoreApi { } /// Returns the passed in Uint8List asynchronously. - Future echoAsyncNullableUint8List(Uint8List? arg_aUint8List) async { + Future echoAsyncNullableUint8List( + Uint8List? arg_aUint8List) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aUint8List]) as List?; @@ -1399,7 +1414,8 @@ class HostIntegrationCoreApi { /// Returns the passed in generic Object asynchronously. Future echoAsyncNullableObject(Object? arg_anObject) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_anObject]) as List?; @@ -1422,7 +1438,8 @@ class HostIntegrationCoreApi { /// Returns the passed list, to test serialization and deserialization asynchronously. Future?> echoAsyncNullableList(List? arg_aList) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aList]) as List?; @@ -1443,7 +1460,8 @@ class HostIntegrationCoreApi { } /// Returns the passed map, to test serialization and deserialization asynchronously. - Future?> echoAsyncNullableMap(Map? arg_aMap) async { + Future?> echoAsyncNullableMap( + Map? arg_aMap) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableMap', codec, binaryMessenger: _binaryMessenger); @@ -1469,8 +1487,7 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterNoop', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1489,10 +1506,10 @@ class HostIntegrationCoreApi { Future callFlutterThrowError() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1511,10 +1528,10 @@ class HostIntegrationCoreApi { Future callFlutterThrowErrorFromVoid() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1533,7 +1550,8 @@ class HostIntegrationCoreApi { Future callFlutterEchoAllTypes(AllTypes arg_everything) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_everything]) as List?; @@ -1558,12 +1576,17 @@ class HostIntegrationCoreApi { } } - Future callFlutterSendMultipleNullableTypes(bool? arg_aNullableBool, int? arg_aNullableInt, String? arg_aNullableString) async { + Future callFlutterSendMultipleNullableTypes( + bool? arg_aNullableBool, + int? arg_aNullableInt, + String? arg_aNullableString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send([arg_aNullableBool, arg_aNullableInt, arg_aNullableString]) as List?; + final List? replyList = await channel.send( + [arg_aNullableBool, arg_aNullableInt, arg_aNullableString]) + as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1641,7 +1664,8 @@ class HostIntegrationCoreApi { Future callFlutterEchoDouble(double arg_aDouble) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aDouble]) as List?; @@ -1668,7 +1692,8 @@ class HostIntegrationCoreApi { Future callFlutterEchoString(String arg_aString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aString]) as List?; @@ -1695,7 +1720,8 @@ class HostIntegrationCoreApi { Future callFlutterEchoUint8List(Uint8List arg_aList) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aList]) as List?; @@ -1747,7 +1773,8 @@ class HostIntegrationCoreApi { } } - Future> callFlutterEchoMap(Map arg_aMap) async { + Future> callFlutterEchoMap( + Map arg_aMap) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoMap', codec, binaryMessenger: _binaryMessenger); @@ -1776,7 +1803,8 @@ class HostIntegrationCoreApi { Future callFlutterEchoNullableBool(bool? arg_aBool) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aBool]) as List?; @@ -1798,7 +1826,8 @@ class HostIntegrationCoreApi { Future callFlutterEchoNullableInt(int? arg_anInt) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_anInt]) as List?; @@ -1820,7 +1849,8 @@ class HostIntegrationCoreApi { Future callFlutterEchoNullableDouble(double? arg_aDouble) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aDouble]) as List?; @@ -1842,7 +1872,8 @@ class HostIntegrationCoreApi { Future callFlutterEchoNullableString(String? arg_aString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aString]) as List?; @@ -1862,9 +1893,11 @@ class HostIntegrationCoreApi { } } - Future callFlutterEchoNullableUint8List(Uint8List? arg_aList) async { + Future callFlutterEchoNullableUint8List( + Uint8List? arg_aList) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aList]) as List?; @@ -1884,9 +1917,11 @@ class HostIntegrationCoreApi { } } - Future?> callFlutterEchoNullableList(List? arg_aList) async { + Future?> callFlutterEchoNullableList( + List? arg_aList) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aList]) as List?; @@ -1906,9 +1941,11 @@ class HostIntegrationCoreApi { } } - Future?> callFlutterEchoNullableMap(Map? arg_aMap) async { + Future?> callFlutterEchoNullableMap( + Map? arg_aMap) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aMap]) as List?; @@ -1953,13 +1990,13 @@ class _FlutterIntegrationCoreApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return AllNullableTypes.decode(readValue(buffer)!); - case 129: + case 129: return AllNullableTypesWrapper.decode(readValue(buffer)!); - case 130: + case 130: return AllTypes.decode(readValue(buffer)!); - case 131: + case 131: return TestMessage.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -1991,7 +2028,8 @@ abstract class FlutterIntegrationCoreApi { /// Returns passed in arguments of multiple types. /// /// Tests multiple-arity FlutterApi handling. - AllNullableTypes sendMultipleNullableTypes(bool? aNullableBool, int? aNullableInt, String? aNullableString); + AllNullableTypes sendMultipleNullableTypes( + bool? aNullableBool, int? aNullableInt, String? aNullableString); /// Returns the passed boolean, to test serialization and deserialization. bool echoBool(bool aBool); @@ -2042,7 +2080,8 @@ abstract class FlutterIntegrationCoreApi { /// Returns the passed in generic Object asynchronously. Future echoAsyncString(String aString); - static void setup(FlutterIntegrationCoreApi? api, {BinaryMessenger? binaryMessenger}) { + static void setup(FlutterIntegrationCoreApi? api, + {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.FlutterIntegrationCoreApi.noop', codec, @@ -2073,7 +2112,8 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid', codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); @@ -2094,7 +2134,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes was null.'); final List args = (message as List?)!; final AllTypes? arg_everything = (args[0] as AllTypes?); assert(arg_everything != null, @@ -2106,38 +2146,43 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes', codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes was null.'); final List args = (message as List?)!; - final AllNullableTypes? arg_everything = (args[0] as AllNullableTypes?); + final AllNullableTypes? arg_everything = + (args[0] as AllNullableTypes?); assert(arg_everything != null, 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes was null, expected non-null AllNullableTypes.'); - final AllNullableTypes output = api.echoAllNullableTypes(arg_everything!); + final AllNullableTypes output = + api.echoAllNullableTypes(arg_everything!); return output; }); } } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes', codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes was null.'); 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?); - final AllNullableTypes output = api.sendMultipleNullableTypes(arg_aNullableBool, arg_aNullableInt, arg_aNullableString); + final AllNullableTypes output = api.sendMultipleNullableTypes( + arg_aNullableBool, arg_aNullableInt, arg_aNullableString); return output; }); } @@ -2151,7 +2196,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoBool was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoBool was null.'); final List args = (message as List?)!; final bool? arg_aBool = (args[0] as bool?); assert(arg_aBool != null, @@ -2170,7 +2215,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoInt was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoInt was null.'); final List args = (message as List?)!; final int? arg_anInt = (args[0] as int?); assert(arg_anInt != null, @@ -2189,7 +2234,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble was null.'); final List args = (message as List?)!; final double? arg_aDouble = (args[0] as double?); assert(arg_aDouble != null, @@ -2208,7 +2253,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString was null.'); final List args = (message as List?)!; final String? arg_aString = (args[0] as String?); assert(arg_aString != null, @@ -2227,7 +2272,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List was null.'); final List args = (message as List?)!; final Uint8List? arg_aList = (args[0] as Uint8List?); assert(arg_aList != null, @@ -2246,9 +2291,10 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList was null.'); final List args = (message as List?)!; - final List? arg_aList = (args[0] as List?)?.cast(); + final List? arg_aList = + (args[0] as List?)?.cast(); assert(arg_aList != null, 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList was null, expected non-null List.'); final List output = api.echoList(arg_aList!); @@ -2265,9 +2311,10 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap was null.'); final List args = (message as List?)!; - final Map? arg_aMap = (args[0] as Map?)?.cast(); + final Map? arg_aMap = + (args[0] as Map?)?.cast(); assert(arg_aMap != null, 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap was null, expected non-null Map.'); final Map output = api.echoMap(arg_aMap!); @@ -2277,14 +2324,15 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool', codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool was null.'); final List args = (message as List?)!; final bool? arg_aBool = (args[0] as bool?); final bool? output = api.echoNullableBool(arg_aBool); @@ -2301,7 +2349,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt was null.'); final List args = (message as List?)!; final int? arg_anInt = (args[0] as int?); final int? output = api.echoNullableInt(arg_anInt); @@ -2311,14 +2359,15 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble', codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble was null.'); final List args = (message as List?)!; final double? arg_aDouble = (args[0] as double?); final double? output = api.echoNullableDouble(arg_aDouble); @@ -2328,14 +2377,15 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString', codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString was null.'); final List args = (message as List?)!; final String? arg_aString = (args[0] as String?); final String? output = api.echoNullableString(arg_aString); @@ -2345,14 +2395,15 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List', codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List was null.'); final List args = (message as List?)!; final Uint8List? arg_aList = (args[0] as Uint8List?); final Uint8List? output = api.echoNullableUint8List(arg_aList); @@ -2362,16 +2413,18 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList', codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList was null.'); final List args = (message as List?)!; - final List? arg_aList = (args[0] as List?)?.cast(); + final List? arg_aList = + (args[0] as List?)?.cast(); final List? output = api.echoNullableList(arg_aList); return output; }); @@ -2386,9 +2439,10 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap was null.'); final List args = (message as List?)!; - final Map? arg_aMap = (args[0] as Map?)?.cast(); + final Map? arg_aMap = + (args[0] as Map?)?.cast(); final Map? output = api.echoNullableMap(arg_aMap); return output; }); @@ -2417,7 +2471,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString was null.'); final List args = (message as List?)!; final String? arg_aString = (args[0] as String?); assert(arg_aString != null, @@ -2445,8 +2499,7 @@ class HostTrivialApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostTrivialApi.noop', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -2506,8 +2559,7 @@ class HostSmallApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostSmallApi.voidVoid', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -2540,7 +2592,7 @@ class _FlutterSmallApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return TestMessage.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -2564,7 +2616,7 @@ abstract class FlutterSmallApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterSmallApi.echoWrappedList was null.'); + 'Argument for dev.flutter.pigeon.FlutterSmallApi.echoWrappedList was null.'); final List args = (message as List?)!; final TestMessage? arg_msg = (args[0] as TestMessage?); assert(arg_msg != null, diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/flutter_unittests.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/flutter_unittests.gen.dart index e11d31558172..89b8d575ce20 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/flutter_unittests.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/flutter_unittests.gen.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// +// // Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -125,13 +125,13 @@ class _ApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return FlutterSearchReplies.decode(readValue(buffer)!); - case 129: + case 129: return FlutterSearchReply.decode(readValue(buffer)!); - case 130: + case 130: return FlutterSearchRequest.decode(readValue(buffer)!); - case 131: + case 131: return FlutterSearchRequests.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -143,8 +143,7 @@ class Api { /// Constructor for [Api]. The [binaryMessenger] named argument is /// available for dependency injection. If it is left null, the default /// BinaryMessenger will be used which routes to the host platform. - Api({BinaryMessenger? binaryMessenger}) - : _binaryMessenger = binaryMessenger; + Api({BinaryMessenger? binaryMessenger}) : _binaryMessenger = binaryMessenger; final BinaryMessenger? _binaryMessenger; static const MessageCodec codec = _ApiCodec(); @@ -176,7 +175,8 @@ class Api { } } - Future doSearches(FlutterSearchRequests arg_request) async { + Future doSearches( + FlutterSearchRequests arg_request) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.Api.doSearches', codec, binaryMessenger: _binaryMessenger); diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/multiple_arity.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/multiple_arity.gen.dart index 5390932bf6b7..cf30f1843881 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/multiple_arity.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/multiple_arity.gen.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// +// // Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -55,7 +55,8 @@ abstract class MultipleArityFlutterApi { int subtract(int x, int y); - static void setup(MultipleArityFlutterApi? api, {BinaryMessenger? binaryMessenger}) { + static void setup(MultipleArityFlutterApi? api, + {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.MultipleArityFlutterApi.subtract', codec, @@ -65,7 +66,7 @@ abstract class MultipleArityFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.MultipleArityFlutterApi.subtract was null.'); + 'Argument for dev.flutter.pigeon.MultipleArityFlutterApi.subtract was null.'); final List args = (message as List?)!; final int? arg_x = (args[0] as int?); assert(arg_x != null, diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/non_null_fields.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/non_null_fields.gen.dart index fef862ca39ca..c7bd7a4d9693 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/non_null_fields.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/non_null_fields.gen.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// +// // Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -126,11 +126,11 @@ class _NonNullFieldHostApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return ExtraData.decode(readValue(buffer)!); - case 129: + case 129: return NonNullFieldSearchReply.decode(readValue(buffer)!); - case 130: + case 130: return NonNullFieldSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -148,7 +148,8 @@ class NonNullFieldHostApi { static const MessageCodec codec = _NonNullFieldHostApiCodec(); - Future search(NonNullFieldSearchRequest arg_nested) async { + Future search( + NonNullFieldSearchRequest arg_nested) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NonNullFieldHostApi.search', codec, binaryMessenger: _binaryMessenger); @@ -197,11 +198,11 @@ class _NonNullFieldFlutterApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return ExtraData.decode(readValue(buffer)!); - case 129: + case 129: return NonNullFieldSearchReply.decode(readValue(buffer)!); - case 130: + case 130: return NonNullFieldSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -214,7 +215,8 @@ abstract class NonNullFieldFlutterApi { NonNullFieldSearchReply search(NonNullFieldSearchRequest request); - static void setup(NonNullFieldFlutterApi? api, {BinaryMessenger? binaryMessenger}) { + static void setup(NonNullFieldFlutterApi? api, + {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NonNullFieldFlutterApi.search', codec, @@ -224,9 +226,10 @@ abstract class NonNullFieldFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.NonNullFieldFlutterApi.search was null.'); + 'Argument for dev.flutter.pigeon.NonNullFieldFlutterApi.search was null.'); final List args = (message as List?)!; - final NonNullFieldSearchRequest? arg_request = (args[0] as NonNullFieldSearchRequest?); + final NonNullFieldSearchRequest? arg_request = + (args[0] as NonNullFieldSearchRequest?); assert(arg_request != null, 'Argument for dev.flutter.pigeon.NonNullFieldFlutterApi.search was null, expected non-null NonNullFieldSearchRequest.'); final NonNullFieldSearchReply output = api.search(arg_request!); diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/null_fields.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/null_fields.gen.dart index 4d22b8cc111a..8661d4c46e9c 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/null_fields.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/null_fields.gen.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// +// // Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -106,9 +106,9 @@ class _NullFieldsHostApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return NullFieldsSearchReply.decode(readValue(buffer)!); - case 129: + case 129: return NullFieldsSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -126,7 +126,8 @@ class NullFieldsHostApi { static const MessageCodec codec = _NullFieldsHostApiCodec(); - Future search(NullFieldsSearchRequest arg_nested) async { + Future search( + NullFieldsSearchRequest arg_nested) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NullFieldsHostApi.search', codec, binaryMessenger: _binaryMessenger); @@ -172,9 +173,9 @@ class _NullFieldsFlutterApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return NullFieldsSearchReply.decode(readValue(buffer)!); - case 129: + case 129: return NullFieldsSearchRequest.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -187,7 +188,8 @@ abstract class NullFieldsFlutterApi { NullFieldsSearchReply search(NullFieldsSearchRequest request); - static void setup(NullFieldsFlutterApi? api, {BinaryMessenger? binaryMessenger}) { + static void setup(NullFieldsFlutterApi? api, + {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NullFieldsFlutterApi.search', codec, @@ -197,9 +199,10 @@ abstract class NullFieldsFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.NullFieldsFlutterApi.search was null.'); + 'Argument for dev.flutter.pigeon.NullFieldsFlutterApi.search was null.'); final List args = (message as List?)!; - final NullFieldsSearchRequest? arg_request = (args[0] as NullFieldsSearchRequest?); + final NullFieldsSearchRequest? arg_request = + (args[0] as NullFieldsSearchRequest?); assert(arg_request != null, 'Argument for dev.flutter.pigeon.NullFieldsFlutterApi.search was null, expected non-null NullFieldsSearchRequest.'); final NullFieldsSearchReply output = api.search(arg_request!); diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/nullable_returns.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/nullable_returns.gen.dart index 91ca77ca9edb..109435800987 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/nullable_returns.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/nullable_returns.gen.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// +// // Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -26,8 +26,7 @@ class NullableReturnHostApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NullableReturnHostApi.doit', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -50,7 +49,8 @@ abstract class NullableReturnFlutterApi { int? doit(); - static void setup(NullableReturnFlutterApi? api, {BinaryMessenger? binaryMessenger}) { + static void setup(NullableReturnFlutterApi? api, + {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NullableReturnFlutterApi.doit', codec, @@ -111,7 +111,8 @@ abstract class NullableArgFlutterApi { int doit(int? x); - static void setup(NullableArgFlutterApi? api, {BinaryMessenger? binaryMessenger}) { + static void setup(NullableArgFlutterApi? api, + {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NullableArgFlutterApi.doit', codec, @@ -121,7 +122,7 @@ abstract class NullableArgFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.NullableArgFlutterApi.doit was null.'); + 'Argument for dev.flutter.pigeon.NullableArgFlutterApi.doit was null.'); final List args = (message as List?)!; final int? arg_x = (args[0] as int?); final int output = api.doit(arg_x); @@ -146,8 +147,7 @@ class NullableCollectionReturnHostApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NullableCollectionReturnHostApi.doit', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -170,7 +170,8 @@ abstract class NullableCollectionReturnFlutterApi { List? doit(); - static void setup(NullableCollectionReturnFlutterApi? api, {BinaryMessenger? binaryMessenger}) { + static void setup(NullableCollectionReturnFlutterApi? api, + {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NullableCollectionReturnFlutterApi.doit', codec, @@ -231,7 +232,8 @@ abstract class NullableCollectionArgFlutterApi { List doit(List? x); - static void setup(NullableCollectionArgFlutterApi? api, {BinaryMessenger? binaryMessenger}) { + static void setup(NullableCollectionArgFlutterApi? api, + {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.NullableCollectionArgFlutterApi.doit', codec, @@ -241,9 +243,10 @@ abstract class NullableCollectionArgFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.NullableCollectionArgFlutterApi.doit was null.'); + 'Argument for dev.flutter.pigeon.NullableCollectionArgFlutterApi.doit was null.'); final List args = (message as List?)!; - final List? arg_x = (args[0] as List?)?.cast(); + final List? arg_x = + (args[0] as List?)?.cast(); final List output = api.doit(arg_x); return output; }); diff --git a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/primitive.gen.dart b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/primitive.gen.dart index 9137ef9e8745..44de13ac8720 100644 --- a/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/primitive.gen.dart +++ b/packages/pigeon/platform_tests/flutter_null_safe_unit_tests/lib/primitive.gen.dart @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// +// // Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -287,7 +287,8 @@ abstract class PrimitiveFlutterApi { Map aStringIntMap(Map value); - static void setup(PrimitiveFlutterApi? api, {BinaryMessenger? binaryMessenger}) { + static void setup(PrimitiveFlutterApi? api, + {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.PrimitiveFlutterApi.anInt', codec, @@ -297,7 +298,7 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.anInt was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.anInt was null.'); final List args = (message as List?)!; final int? arg_value = (args[0] as int?); assert(arg_value != null, @@ -316,7 +317,7 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aBool was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aBool was null.'); final List args = (message as List?)!; final bool? arg_value = (args[0] as bool?); assert(arg_value != null, @@ -335,7 +336,7 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aString was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aString was null.'); final List args = (message as List?)!; final String? arg_value = (args[0] as String?); assert(arg_value != null, @@ -354,7 +355,7 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aDouble was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aDouble was null.'); final List args = (message as List?)!; final double? arg_value = (args[0] as double?); assert(arg_value != null, @@ -373,9 +374,10 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aMap was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aMap was null.'); final List args = (message as List?)!; - final Map? arg_value = (args[0] as Map?); + final Map? arg_value = + (args[0] as Map?); assert(arg_value != null, 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aMap was null, expected non-null Map.'); final Map output = api.aMap(arg_value!); @@ -392,7 +394,7 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aList was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aList was null.'); final List args = (message as List?)!; final List? arg_value = (args[0] as List?); assert(arg_value != null, @@ -411,7 +413,7 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.anInt32List was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.anInt32List was null.'); final List args = (message as List?)!; final Int32List? arg_value = (args[0] as Int32List?); assert(arg_value != null, @@ -430,9 +432,10 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aBoolList was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aBoolList was null.'); final List args = (message as List?)!; - final List? arg_value = (args[0] as List?)?.cast(); + final List? arg_value = + (args[0] as List?)?.cast(); assert(arg_value != null, 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aBoolList was null, expected non-null List.'); final List output = api.aBoolList(arg_value!); @@ -449,9 +452,10 @@ abstract class PrimitiveFlutterApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aStringIntMap was null.'); + 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aStringIntMap was null.'); final List args = (message as List?)!; - final Map? arg_value = (args[0] as Map?)?.cast(); + final Map? arg_value = + (args[0] as Map?)?.cast(); assert(arg_value != null, 'Argument for dev.flutter.pigeon.PrimitiveFlutterApi.aStringIntMap was null, expected non-null Map.'); final Map output = api.aStringIntMap(arg_value!); 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 fc2e678fe717..174688ae8f83 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 @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// +// // Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon // ignore_for_file: public_member_api_docs, non_constant_identifier_names, avoid_as, unused_import, unnecessary_parenthesis, prefer_null_aware_operators, omit_local_variable_types, unused_shown_name, unnecessary_import @@ -177,11 +177,12 @@ class AllNullableTypes { aNullableList: result[8] as List?, aNullableMap: result[9] as Map?, nullableNestedList: (result[10] as List?)?.cast?>(), - nullableMapWithAnnotations: (result[11] as Map?)?.cast(), - nullableMapWithObject: (result[12] as Map?)?.cast(), - aNullableEnum: result[13] != null - ? AnEnum.values[result[13]! as int] - : null, + nullableMapWithAnnotations: + (result[11] as Map?)?.cast(), + nullableMapWithObject: + (result[12] as Map?)?.cast(), + aNullableEnum: + result[13] != null ? AnEnum.values[result[13]! as int] : null, aNullableString: result[14] as String?, ); } @@ -254,13 +255,13 @@ class _HostIntegrationCoreApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return AllNullableTypes.decode(readValue(buffer)!); - case 129: + case 129: return AllNullableTypesWrapper.decode(readValue(buffer)!); - case 130: + case 130: return AllTypes.decode(readValue(buffer)!); - case 131: + case 131: return TestMessage.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -286,8 +287,7 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.noop', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -337,8 +337,7 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.throwError', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -360,8 +359,7 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.throwErrorFromVoid', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -383,8 +381,7 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.throwFlutterError', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -626,7 +623,8 @@ class HostIntegrationCoreApi { } /// Returns the passed object, to test serialization and deserialization. - Future echoAllNullableTypes(AllNullableTypes? arg_everything) async { + Future echoAllNullableTypes( + AllNullableTypes? arg_everything) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAllNullableTypes', codec, binaryMessenger: _binaryMessenger); @@ -650,9 +648,11 @@ class HostIntegrationCoreApi { /// Returns the inner `aString` value from the wrapped object, to test /// sending of nested objects. - Future extractNestedNullableString(AllNullableTypesWrapper arg_wrapper) async { + Future extractNestedNullableString( + AllNullableTypesWrapper arg_wrapper) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_wrapper]) as List?; @@ -674,9 +674,11 @@ class HostIntegrationCoreApi { /// Returns the inner `aString` value from the wrapped object, to test /// sending of nested objects. - Future createNestedNullableString(String? arg_nullableString) async { + Future createNestedNullableString( + String? arg_nullableString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_nullableString]) as List?; @@ -702,12 +704,15 @@ class HostIntegrationCoreApi { } /// Returns passed in arguments of multiple types. - Future sendMultipleNullableTypes(bool? arg_aNullableBool, int? arg_aNullableInt, String? arg_aNullableString) async { + Future sendMultipleNullableTypes(bool? arg_aNullableBool, + int? arg_aNullableInt, String? arg_aNullableString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send([arg_aNullableBool, arg_aNullableInt, arg_aNullableString]) as List?; + final List? replyList = await channel.send( + [arg_aNullableBool, arg_aNullableInt, arg_aNullableString]) + as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -822,9 +827,11 @@ class HostIntegrationCoreApi { } /// Returns the passed in Uint8List. - Future echoNullableUint8List(Uint8List? arg_aNullableUint8List) async { + Future echoNullableUint8List( + Uint8List? arg_aNullableUint8List) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aNullableUint8List]) as List?; @@ -868,7 +875,8 @@ class HostIntegrationCoreApi { } /// Returns the passed list, to test serialization and deserialization. - Future?> echoNullableList(List? arg_aNullableList) async { + Future?> echoNullableList( + List? arg_aNullableList) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableList', codec, binaryMessenger: _binaryMessenger); @@ -891,7 +899,8 @@ class HostIntegrationCoreApi { } /// Returns the passed map, to test serialization and deserialization. - Future?> echoNullableMap(Map? arg_aNullableMap) async { + Future?> echoNullableMap( + Map? arg_aNullableMap) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableMap', codec, binaryMessenger: _binaryMessenger); @@ -919,8 +928,7 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.noopAsync', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1134,7 +1142,8 @@ class HostIntegrationCoreApi { } /// Returns the passed map, to test serialization and deserialization asynchronously. - Future> echoAsyncMap(Map arg_aMap) async { + Future> echoAsyncMap( + Map arg_aMap) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncMap', codec, binaryMessenger: _binaryMessenger); @@ -1166,8 +1175,7 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncError', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1187,10 +1195,10 @@ class HostIntegrationCoreApi { /// Responds with an error from an async void function. Future throwAsyncErrorFromVoid() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1210,10 +1218,10 @@ class HostIntegrationCoreApi { /// Responds with a Flutter error from an async function returning a value. Future throwAsyncFlutterError() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1259,9 +1267,11 @@ class HostIntegrationCoreApi { } /// Returns the passed object, to test serialization and deserialization. - Future echoAsyncNullableAllNullableTypes(AllNullableTypes? arg_everything) async { + Future echoAsyncNullableAllNullableTypes( + AllNullableTypes? arg_everything) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_everything]) as List?; @@ -1307,7 +1317,8 @@ class HostIntegrationCoreApi { /// Returns passed in double asynchronously. Future echoAsyncNullableDouble(double? arg_aDouble) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aDouble]) as List?; @@ -1330,7 +1341,8 @@ class HostIntegrationCoreApi { /// Returns the passed in boolean asynchronously. Future echoAsyncNullableBool(bool? arg_aBool) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aBool]) as List?; @@ -1353,7 +1365,8 @@ class HostIntegrationCoreApi { /// Returns the passed string asynchronously. Future echoAsyncNullableString(String? arg_aString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aString]) as List?; @@ -1374,9 +1387,11 @@ class HostIntegrationCoreApi { } /// Returns the passed in Uint8List asynchronously. - Future echoAsyncNullableUint8List(Uint8List? arg_aUint8List) async { + Future echoAsyncNullableUint8List( + Uint8List? arg_aUint8List) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aUint8List]) as List?; @@ -1399,7 +1414,8 @@ class HostIntegrationCoreApi { /// Returns the passed in generic Object asynchronously. Future echoAsyncNullableObject(Object? arg_anObject) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_anObject]) as List?; @@ -1422,7 +1438,8 @@ class HostIntegrationCoreApi { /// Returns the passed list, to test serialization and deserialization asynchronously. Future?> echoAsyncNullableList(List? arg_aList) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aList]) as List?; @@ -1443,7 +1460,8 @@ class HostIntegrationCoreApi { } /// Returns the passed map, to test serialization and deserialization asynchronously. - Future?> echoAsyncNullableMap(Map? arg_aMap) async { + Future?> echoAsyncNullableMap( + Map? arg_aMap) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableMap', codec, binaryMessenger: _binaryMessenger); @@ -1469,8 +1487,7 @@ class HostIntegrationCoreApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterNoop', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1489,10 +1506,10 @@ class HostIntegrationCoreApi { Future callFlutterThrowError() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1511,10 +1528,10 @@ class HostIntegrationCoreApi { Future callFlutterThrowErrorFromVoid() async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1533,7 +1550,8 @@ class HostIntegrationCoreApi { Future callFlutterEchoAllTypes(AllTypes arg_everything) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_everything]) as List?; @@ -1558,12 +1576,17 @@ class HostIntegrationCoreApi { } } - Future callFlutterSendMultipleNullableTypes(bool? arg_aNullableBool, int? arg_aNullableInt, String? arg_aNullableString) async { + Future callFlutterSendMultipleNullableTypes( + bool? arg_aNullableBool, + int? arg_aNullableInt, + String? arg_aNullableString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes', + codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send([arg_aNullableBool, arg_aNullableInt, arg_aNullableString]) as List?; + final List? replyList = await channel.send( + [arg_aNullableBool, arg_aNullableInt, arg_aNullableString]) + as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -1641,7 +1664,8 @@ class HostIntegrationCoreApi { Future callFlutterEchoDouble(double arg_aDouble) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aDouble]) as List?; @@ -1668,7 +1692,8 @@ class HostIntegrationCoreApi { Future callFlutterEchoString(String arg_aString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aString]) as List?; @@ -1695,7 +1720,8 @@ class HostIntegrationCoreApi { Future callFlutterEchoUint8List(Uint8List arg_aList) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aList]) as List?; @@ -1747,7 +1773,8 @@ class HostIntegrationCoreApi { } } - Future> callFlutterEchoMap(Map arg_aMap) async { + Future> callFlutterEchoMap( + Map arg_aMap) async { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoMap', codec, binaryMessenger: _binaryMessenger); @@ -1776,7 +1803,8 @@ class HostIntegrationCoreApi { Future callFlutterEchoNullableBool(bool? arg_aBool) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aBool]) as List?; @@ -1798,7 +1826,8 @@ class HostIntegrationCoreApi { Future callFlutterEchoNullableInt(int? arg_anInt) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_anInt]) as List?; @@ -1820,7 +1849,8 @@ class HostIntegrationCoreApi { Future callFlutterEchoNullableDouble(double? arg_aDouble) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aDouble]) as List?; @@ -1842,7 +1872,8 @@ class HostIntegrationCoreApi { Future callFlutterEchoNullableString(String? arg_aString) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aString]) as List?; @@ -1862,9 +1893,11 @@ class HostIntegrationCoreApi { } } - Future callFlutterEchoNullableUint8List(Uint8List? arg_aList) async { + Future callFlutterEchoNullableUint8List( + Uint8List? arg_aList) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aList]) as List?; @@ -1884,9 +1917,11 @@ class HostIntegrationCoreApi { } } - Future?> callFlutterEchoNullableList(List? arg_aList) async { + Future?> callFlutterEchoNullableList( + List? arg_aList) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aList]) as List?; @@ -1906,9 +1941,11 @@ class HostIntegrationCoreApi { } } - Future?> callFlutterEchoNullableMap(Map? arg_aMap) async { + Future?> callFlutterEchoNullableMap( + Map? arg_aMap) async { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap', codec, + 'dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap', + codec, binaryMessenger: _binaryMessenger); final List? replyList = await channel.send([arg_aMap]) as List?; @@ -1953,13 +1990,13 @@ class _FlutterIntegrationCoreApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return AllNullableTypes.decode(readValue(buffer)!); - case 129: + case 129: return AllNullableTypesWrapper.decode(readValue(buffer)!); - case 130: + case 130: return AllTypes.decode(readValue(buffer)!); - case 131: + case 131: return TestMessage.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -1991,7 +2028,8 @@ abstract class FlutterIntegrationCoreApi { /// Returns passed in arguments of multiple types. /// /// Tests multiple-arity FlutterApi handling. - AllNullableTypes sendMultipleNullableTypes(bool? aNullableBool, int? aNullableInt, String? aNullableString); + AllNullableTypes sendMultipleNullableTypes( + bool? aNullableBool, int? aNullableInt, String? aNullableString); /// Returns the passed boolean, to test serialization and deserialization. bool echoBool(bool aBool); @@ -2042,7 +2080,8 @@ abstract class FlutterIntegrationCoreApi { /// Returns the passed in generic Object asynchronously. Future echoAsyncString(String aString); - static void setup(FlutterIntegrationCoreApi? api, {BinaryMessenger? binaryMessenger}) { + static void setup(FlutterIntegrationCoreApi? api, + {BinaryMessenger? binaryMessenger}) { { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.FlutterIntegrationCoreApi.noop', codec, @@ -2073,7 +2112,8 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid', codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); @@ -2094,7 +2134,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes was null.'); final List args = (message as List?)!; final AllTypes? arg_everything = (args[0] as AllTypes?); assert(arg_everything != null, @@ -2106,38 +2146,43 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes', codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes was null.'); final List args = (message as List?)!; - final AllNullableTypes? arg_everything = (args[0] as AllNullableTypes?); + final AllNullableTypes? arg_everything = + (args[0] as AllNullableTypes?); assert(arg_everything != null, 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes was null, expected non-null AllNullableTypes.'); - final AllNullableTypes output = api.echoAllNullableTypes(arg_everything!); + final AllNullableTypes output = + api.echoAllNullableTypes(arg_everything!); return output; }); } } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes', codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes was null.'); 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?); - final AllNullableTypes output = api.sendMultipleNullableTypes(arg_aNullableBool, arg_aNullableInt, arg_aNullableString); + final AllNullableTypes output = api.sendMultipleNullableTypes( + arg_aNullableBool, arg_aNullableInt, arg_aNullableString); return output; }); } @@ -2151,7 +2196,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoBool was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoBool was null.'); final List args = (message as List?)!; final bool? arg_aBool = (args[0] as bool?); assert(arg_aBool != null, @@ -2170,7 +2215,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoInt was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoInt was null.'); final List args = (message as List?)!; final int? arg_anInt = (args[0] as int?); assert(arg_anInt != null, @@ -2189,7 +2234,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble was null.'); final List args = (message as List?)!; final double? arg_aDouble = (args[0] as double?); assert(arg_aDouble != null, @@ -2208,7 +2253,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString was null.'); final List args = (message as List?)!; final String? arg_aString = (args[0] as String?); assert(arg_aString != null, @@ -2227,7 +2272,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List was null.'); final List args = (message as List?)!; final Uint8List? arg_aList = (args[0] as Uint8List?); assert(arg_aList != null, @@ -2246,9 +2291,10 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList was null.'); final List args = (message as List?)!; - final List? arg_aList = (args[0] as List?)?.cast(); + final List? arg_aList = + (args[0] as List?)?.cast(); assert(arg_aList != null, 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList was null, expected non-null List.'); final List output = api.echoList(arg_aList!); @@ -2265,9 +2311,10 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap was null.'); final List args = (message as List?)!; - final Map? arg_aMap = (args[0] as Map?)?.cast(); + final Map? arg_aMap = + (args[0] as Map?)?.cast(); assert(arg_aMap != null, 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap was null, expected non-null Map.'); final Map output = api.echoMap(arg_aMap!); @@ -2277,14 +2324,15 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool', codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool was null.'); final List args = (message as List?)!; final bool? arg_aBool = (args[0] as bool?); final bool? output = api.echoNullableBool(arg_aBool); @@ -2301,7 +2349,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt was null.'); final List args = (message as List?)!; final int? arg_anInt = (args[0] as int?); final int? output = api.echoNullableInt(arg_anInt); @@ -2311,14 +2359,15 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble', codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble was null.'); final List args = (message as List?)!; final double? arg_aDouble = (args[0] as double?); final double? output = api.echoNullableDouble(arg_aDouble); @@ -2328,14 +2377,15 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString', codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString was null.'); final List args = (message as List?)!; final String? arg_aString = (args[0] as String?); final String? output = api.echoNullableString(arg_aString); @@ -2345,14 +2395,15 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List', codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List was null.'); final List args = (message as List?)!; final Uint8List? arg_aList = (args[0] as Uint8List?); final Uint8List? output = api.echoNullableUint8List(arg_aList); @@ -2362,16 +2413,18 @@ abstract class FlutterIntegrationCoreApi { } { final BasicMessageChannel channel = BasicMessageChannel( - 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList', codec, + 'dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList', + codec, binaryMessenger: binaryMessenger); if (api == null) { channel.setMessageHandler(null); } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList was null.'); final List args = (message as List?)!; - final List? arg_aList = (args[0] as List?)?.cast(); + final List? arg_aList = + (args[0] as List?)?.cast(); final List? output = api.echoNullableList(arg_aList); return output; }); @@ -2386,9 +2439,10 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap was null.'); final List args = (message as List?)!; - final Map? arg_aMap = (args[0] as Map?)?.cast(); + final Map? arg_aMap = + (args[0] as Map?)?.cast(); final Map? output = api.echoNullableMap(arg_aMap); return output; }); @@ -2417,7 +2471,7 @@ abstract class FlutterIntegrationCoreApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString was null.'); + 'Argument for dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString was null.'); final List args = (message as List?)!; final String? arg_aString = (args[0] as String?); assert(arg_aString != null, @@ -2445,8 +2499,7 @@ class HostTrivialApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostTrivialApi.noop', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -2506,8 +2559,7 @@ class HostSmallApi { final BasicMessageChannel channel = BasicMessageChannel( 'dev.flutter.pigeon.HostSmallApi.voidVoid', codec, binaryMessenger: _binaryMessenger); - final List? replyList = - await channel.send(null) as List?; + final List? replyList = await channel.send(null) as List?; if (replyList == null) { throw PlatformException( code: 'channel-error', @@ -2540,7 +2592,7 @@ class _FlutterSmallApiCodec extends StandardMessageCodec { @override Object? readValueOfType(int type, ReadBuffer buffer) { switch (type) { - case 128: + case 128: return TestMessage.decode(readValue(buffer)!); default: return super.readValueOfType(type, buffer); @@ -2564,7 +2616,7 @@ abstract class FlutterSmallApi { } else { channel.setMessageHandler((Object? message) async { assert(message != null, - 'Argument for dev.flutter.pigeon.FlutterSmallApi.echoWrappedList was null.'); + 'Argument for dev.flutter.pigeon.FlutterSmallApi.echoWrappedList was null.'); final List args = (message as List?)!; final TestMessage? arg_msg = (args[0] as TestMessage?); assert(arg_msg != null, diff --git a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp index cbb5d0a8078e..3558f4e24f4a 100644 --- a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp +++ b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.cpp @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// +// // Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon @@ -27,31 +27,25 @@ using flutter::EncodableValue; // AllTypes -AllTypes::AllTypes( - bool a_bool, - int64_t an_int, - int64_t an_int64, - double a_double, - const std::vector& a_byte_array, - const std::vector& a4_byte_array, - const std::vector& a8_byte_array, - const std::vector& a_float_array, - const EncodableList& a_list, - const EncodableMap& a_map, - const AnEnum& an_enum, - const std::string& a_string -) : a_bool_(a_bool), - an_int_(an_int), - an_int64_(an_int64), - a_double_(a_double), - a_byte_array_(a_byte_array), - a4_byte_array_(a4_byte_array), - a8_byte_array_(a8_byte_array), - a_float_array_(a_float_array), - a_list_(a_list), - a_map_(a_map), - an_enum_(an_enum), - a_string_(a_string) {} +AllTypes::AllTypes(bool a_bool, int64_t an_int, int64_t an_int64, + double a_double, const std::vector& a_byte_array, + const std::vector& a4_byte_array, + const std::vector& a8_byte_array, + const std::vector& a_float_array, + const EncodableList& a_list, const EncodableMap& a_map, + const AnEnum& an_enum, const std::string& a_string) + : a_bool_(a_bool), + an_int_(an_int), + an_int64_(an_int64), + a_double_(a_double), + a_byte_array_(a_byte_array), + a4_byte_array_(a4_byte_array), + a8_byte_array_(a8_byte_array), + a_float_array_(a_float_array), + a_list_(a_list), + a_map_(a_map), + an_enum_(an_enum), + a_string_(a_string) {} bool AllTypes::a_bool() const { return a_bool_; } void AllTypes::set_a_bool(bool value_arg) { a_bool_ = value_arg; } @@ -65,20 +59,38 @@ void AllTypes::set_an_int64(int64_t value_arg) { an_int64_ = value_arg; } double AllTypes::a_double() const { return a_double_; } void AllTypes::set_a_double(double value_arg) { a_double_ = value_arg; } -const std::vector& AllTypes::a_byte_array() const { return a_byte_array_; } -void AllTypes::set_a_byte_array(const std::vector& value_arg) { a_byte_array_ = value_arg; } +const std::vector& AllTypes::a_byte_array() const { + return a_byte_array_; +} +void AllTypes::set_a_byte_array(const std::vector& value_arg) { + a_byte_array_ = value_arg; +} -const std::vector& AllTypes::a4_byte_array() const { return a4_byte_array_; } -void AllTypes::set_a4_byte_array(const std::vector& value_arg) { a4_byte_array_ = value_arg; } +const std::vector& AllTypes::a4_byte_array() const { + return a4_byte_array_; +} +void AllTypes::set_a4_byte_array(const std::vector& value_arg) { + a4_byte_array_ = value_arg; +} -const std::vector& AllTypes::a8_byte_array() const { return a8_byte_array_; } -void AllTypes::set_a8_byte_array(const std::vector& value_arg) { a8_byte_array_ = value_arg; } +const std::vector& AllTypes::a8_byte_array() const { + return a8_byte_array_; +} +void AllTypes::set_a8_byte_array(const std::vector& value_arg) { + a8_byte_array_ = value_arg; +} -const std::vector& AllTypes::a_float_array() const { return a_float_array_; } -void AllTypes::set_a_float_array(const std::vector& value_arg) { a_float_array_ = value_arg; } +const std::vector& AllTypes::a_float_array() const { + return a_float_array_; +} +void AllTypes::set_a_float_array(const std::vector& value_arg) { + a_float_array_ = value_arg; +} const EncodableList& AllTypes::a_list() const { return a_list_; } -void AllTypes::set_a_list(const EncodableList& value_arg) { a_list_ = value_arg; } +void AllTypes::set_a_list(const EncodableList& value_arg) { + a_list_ = value_arg; +} const EncodableMap& AllTypes::a_map() const { return a_map_; } void AllTypes::set_a_map(const EncodableMap& value_arg) { a_map_ = value_arg; } @@ -87,7 +99,9 @@ const AnEnum& AllTypes::an_enum() const { return an_enum_; } void AllTypes::set_an_enum(const AnEnum& value_arg) { an_enum_ = value_arg; } const std::string& AllTypes::a_string() const { return a_string_; } -void AllTypes::set_a_string(std::string_view value_arg) { a_string_ = value_arg; } +void AllTypes::set_a_string(std::string_view value_arg) { + a_string_ = value_arg; +} EncodableList AllTypes::ToEncodableList() const { EncodableList list; @@ -109,18 +123,13 @@ EncodableList AllTypes::ToEncodableList() const { AllTypes AllTypes::FromEncodableList(const EncodableList& list) { AllTypes decoded( - std::get(list[0]), - list[1].LongValue(), - list[2].LongValue(), - std::get(list[3]), - std::get>(list[4]), - std::get>(list[5]), - std::get>(list[6]), - std::get>(list[7]), - std::get(list[8]), - std::get(list[9]), - (AnEnum)(std::get(list[10])), - std::get(list[11])); + std::get(list[0]), list[1].LongValue(), list[2].LongValue(), + std::get(list[3]), std::get>(list[4]), + std::get>(list[5]), + std::get>(list[6]), + std::get>(list[7]), std::get(list[8]), + std::get(list[9]), (AnEnum)(std::get(list[10])), + std::get(list[11])); return decoded; } @@ -129,119 +138,293 @@ AllTypes AllTypes::FromEncodableList(const EncodableList& list) { AllNullableTypes::AllNullableTypes() {} AllNullableTypes::AllNullableTypes( - const bool* a_nullable_bool, - const int64_t* a_nullable_int, - const int64_t* a_nullable_int64, - const double* a_nullable_double, - const std::vector* a_nullable_byte_array, - const std::vector* a_nullable4_byte_array, - const std::vector* a_nullable8_byte_array, - const std::vector* a_nullable_float_array, - const EncodableList* a_nullable_list, - const EncodableMap* a_nullable_map, - const EncodableList* nullable_nested_list, - const EncodableMap* nullable_map_with_annotations, - const EncodableMap* nullable_map_with_object, - const AnEnum* a_nullable_enum, - const std::string* a_nullable_string -) : a_nullable_bool_(a_nullable_bool ? std::optional(*a_nullable_bool) : std::nullopt), - a_nullable_int_(a_nullable_int ? std::optional(*a_nullable_int) : std::nullopt), - a_nullable_int64_(a_nullable_int64 ? std::optional(*a_nullable_int64) : std::nullopt), - a_nullable_double_(a_nullable_double ? std::optional(*a_nullable_double) : std::nullopt), - a_nullable_byte_array_(a_nullable_byte_array ? std::optional>(*a_nullable_byte_array) : std::nullopt), - a_nullable4_byte_array_(a_nullable4_byte_array ? std::optional>(*a_nullable4_byte_array) : std::nullopt), - a_nullable8_byte_array_(a_nullable8_byte_array ? std::optional>(*a_nullable8_byte_array) : std::nullopt), - a_nullable_float_array_(a_nullable_float_array ? std::optional>(*a_nullable_float_array) : std::nullopt), - a_nullable_list_(a_nullable_list ? std::optional(*a_nullable_list) : std::nullopt), - a_nullable_map_(a_nullable_map ? std::optional(*a_nullable_map) : std::nullopt), - nullable_nested_list_(nullable_nested_list ? std::optional(*nullable_nested_list) : std::nullopt), - nullable_map_with_annotations_(nullable_map_with_annotations ? std::optional(*nullable_map_with_annotations) : std::nullopt), - nullable_map_with_object_(nullable_map_with_object ? std::optional(*nullable_map_with_object) : std::nullopt), - a_nullable_enum_(a_nullable_enum ? std::optional(*a_nullable_enum) : std::nullopt), - a_nullable_string_(a_nullable_string ? std::optional(*a_nullable_string) : std::nullopt) {} - -const bool* AllNullableTypes::a_nullable_bool() const { return a_nullable_bool_ ? &(*a_nullable_bool_) : nullptr; } -void AllNullableTypes::set_a_nullable_bool(const bool* value_arg) { a_nullable_bool_ = value_arg ? std::optional(*value_arg) : std::nullopt; } -void AllNullableTypes::set_a_nullable_bool(bool value_arg) { a_nullable_bool_ = value_arg; } - -const int64_t* AllNullableTypes::a_nullable_int() const { return a_nullable_int_ ? &(*a_nullable_int_) : nullptr; } -void AllNullableTypes::set_a_nullable_int(const int64_t* value_arg) { a_nullable_int_ = value_arg ? std::optional(*value_arg) : std::nullopt; } -void AllNullableTypes::set_a_nullable_int(int64_t value_arg) { a_nullable_int_ = value_arg; } - -const int64_t* AllNullableTypes::a_nullable_int64() const { return a_nullable_int64_ ? &(*a_nullable_int64_) : nullptr; } -void AllNullableTypes::set_a_nullable_int64(const int64_t* value_arg) { a_nullable_int64_ = value_arg ? std::optional(*value_arg) : std::nullopt; } -void AllNullableTypes::set_a_nullable_int64(int64_t value_arg) { a_nullable_int64_ = value_arg; } - -const double* AllNullableTypes::a_nullable_double() const { return a_nullable_double_ ? &(*a_nullable_double_) : nullptr; } -void AllNullableTypes::set_a_nullable_double(const double* value_arg) { a_nullable_double_ = value_arg ? std::optional(*value_arg) : std::nullopt; } -void AllNullableTypes::set_a_nullable_double(double value_arg) { a_nullable_double_ = value_arg; } - -const std::vector* AllNullableTypes::a_nullable_byte_array() const { return a_nullable_byte_array_ ? &(*a_nullable_byte_array_) : nullptr; } -void AllNullableTypes::set_a_nullable_byte_array(const std::vector* value_arg) { a_nullable_byte_array_ = value_arg ? std::optional>(*value_arg) : std::nullopt; } -void AllNullableTypes::set_a_nullable_byte_array(const std::vector& value_arg) { a_nullable_byte_array_ = value_arg; } - -const std::vector* AllNullableTypes::a_nullable4_byte_array() const { return a_nullable4_byte_array_ ? &(*a_nullable4_byte_array_) : nullptr; } -void AllNullableTypes::set_a_nullable4_byte_array(const std::vector* value_arg) { a_nullable4_byte_array_ = value_arg ? std::optional>(*value_arg) : std::nullopt; } -void AllNullableTypes::set_a_nullable4_byte_array(const std::vector& value_arg) { a_nullable4_byte_array_ = value_arg; } - -const std::vector* AllNullableTypes::a_nullable8_byte_array() const { return a_nullable8_byte_array_ ? &(*a_nullable8_byte_array_) : nullptr; } -void AllNullableTypes::set_a_nullable8_byte_array(const std::vector* value_arg) { a_nullable8_byte_array_ = value_arg ? std::optional>(*value_arg) : std::nullopt; } -void AllNullableTypes::set_a_nullable8_byte_array(const std::vector& value_arg) { a_nullable8_byte_array_ = value_arg; } - -const std::vector* AllNullableTypes::a_nullable_float_array() const { return a_nullable_float_array_ ? &(*a_nullable_float_array_) : nullptr; } -void AllNullableTypes::set_a_nullable_float_array(const std::vector* value_arg) { a_nullable_float_array_ = value_arg ? std::optional>(*value_arg) : std::nullopt; } -void AllNullableTypes::set_a_nullable_float_array(const std::vector& value_arg) { a_nullable_float_array_ = value_arg; } - -const EncodableList* AllNullableTypes::a_nullable_list() const { return a_nullable_list_ ? &(*a_nullable_list_) : nullptr; } -void AllNullableTypes::set_a_nullable_list(const EncodableList* value_arg) { a_nullable_list_ = value_arg ? std::optional(*value_arg) : std::nullopt; } -void AllNullableTypes::set_a_nullable_list(const EncodableList& value_arg) { a_nullable_list_ = value_arg; } - -const EncodableMap* AllNullableTypes::a_nullable_map() const { return a_nullable_map_ ? &(*a_nullable_map_) : nullptr; } -void AllNullableTypes::set_a_nullable_map(const EncodableMap* value_arg) { a_nullable_map_ = value_arg ? std::optional(*value_arg) : std::nullopt; } -void AllNullableTypes::set_a_nullable_map(const EncodableMap& value_arg) { a_nullable_map_ = value_arg; } - -const EncodableList* AllNullableTypes::nullable_nested_list() const { return nullable_nested_list_ ? &(*nullable_nested_list_) : nullptr; } -void AllNullableTypes::set_nullable_nested_list(const EncodableList* value_arg) { nullable_nested_list_ = value_arg ? std::optional(*value_arg) : std::nullopt; } -void AllNullableTypes::set_nullable_nested_list(const EncodableList& value_arg) { nullable_nested_list_ = value_arg; } - -const EncodableMap* AllNullableTypes::nullable_map_with_annotations() const { return nullable_map_with_annotations_ ? &(*nullable_map_with_annotations_) : nullptr; } -void AllNullableTypes::set_nullable_map_with_annotations(const EncodableMap* value_arg) { nullable_map_with_annotations_ = value_arg ? std::optional(*value_arg) : std::nullopt; } -void AllNullableTypes::set_nullable_map_with_annotations(const EncodableMap& value_arg) { nullable_map_with_annotations_ = value_arg; } - -const EncodableMap* AllNullableTypes::nullable_map_with_object() const { return nullable_map_with_object_ ? &(*nullable_map_with_object_) : nullptr; } -void AllNullableTypes::set_nullable_map_with_object(const EncodableMap* value_arg) { nullable_map_with_object_ = value_arg ? std::optional(*value_arg) : std::nullopt; } -void AllNullableTypes::set_nullable_map_with_object(const EncodableMap& value_arg) { nullable_map_with_object_ = value_arg; } - -const AnEnum* AllNullableTypes::a_nullable_enum() const { return a_nullable_enum_ ? &(*a_nullable_enum_) : nullptr; } -void AllNullableTypes::set_a_nullable_enum(const AnEnum* value_arg) { a_nullable_enum_ = value_arg ? std::optional(*value_arg) : std::nullopt; } -void AllNullableTypes::set_a_nullable_enum(const AnEnum& value_arg) { a_nullable_enum_ = value_arg; } - -const std::string* AllNullableTypes::a_nullable_string() const { return a_nullable_string_ ? &(*a_nullable_string_) : nullptr; } -void AllNullableTypes::set_a_nullable_string(const std::string_view* value_arg) { a_nullable_string_ = value_arg ? std::optional(*value_arg) : std::nullopt; } -void AllNullableTypes::set_a_nullable_string(std::string_view value_arg) { a_nullable_string_ = value_arg; } + const bool* a_nullable_bool, const int64_t* a_nullable_int, + const int64_t* a_nullable_int64, const double* a_nullable_double, + const std::vector* a_nullable_byte_array, + const std::vector* a_nullable4_byte_array, + const std::vector* a_nullable8_byte_array, + const std::vector* a_nullable_float_array, + const EncodableList* a_nullable_list, const EncodableMap* a_nullable_map, + const EncodableList* nullable_nested_list, + const EncodableMap* nullable_map_with_annotations, + const EncodableMap* nullable_map_with_object, const AnEnum* a_nullable_enum, + const std::string* a_nullable_string) + : a_nullable_bool_(a_nullable_bool ? std::optional(*a_nullable_bool) + : std::nullopt), + a_nullable_int_(a_nullable_int ? std::optional(*a_nullable_int) + : std::nullopt), + a_nullable_int64_(a_nullable_int64 + ? std::optional(*a_nullable_int64) + : std::nullopt), + a_nullable_double_(a_nullable_double + ? std::optional(*a_nullable_double) + : std::nullopt), + a_nullable_byte_array_( + a_nullable_byte_array + ? std::optional>(*a_nullable_byte_array) + : std::nullopt), + a_nullable4_byte_array_( + a_nullable4_byte_array + ? std::optional>(*a_nullable4_byte_array) + : std::nullopt), + a_nullable8_byte_array_( + a_nullable8_byte_array + ? std::optional>(*a_nullable8_byte_array) + : std::nullopt), + a_nullable_float_array_( + a_nullable_float_array + ? std::optional>(*a_nullable_float_array) + : std::nullopt), + a_nullable_list_(a_nullable_list + ? std::optional(*a_nullable_list) + : std::nullopt), + a_nullable_map_(a_nullable_map + ? std::optional(*a_nullable_map) + : std::nullopt), + nullable_nested_list_(nullable_nested_list ? std::optional( + *nullable_nested_list) + : std::nullopt), + nullable_map_with_annotations_( + nullable_map_with_annotations + ? std::optional(*nullable_map_with_annotations) + : std::nullopt), + nullable_map_with_object_( + nullable_map_with_object + ? std::optional(*nullable_map_with_object) + : std::nullopt), + a_nullable_enum_(a_nullable_enum ? std::optional(*a_nullable_enum) + : std::nullopt), + a_nullable_string_(a_nullable_string + ? std::optional(*a_nullable_string) + : std::nullopt) {} + +const bool* AllNullableTypes::a_nullable_bool() const { + return a_nullable_bool_ ? &(*a_nullable_bool_) : nullptr; +} +void AllNullableTypes::set_a_nullable_bool(const bool* value_arg) { + a_nullable_bool_ = value_arg ? std::optional(*value_arg) : std::nullopt; +} +void AllNullableTypes::set_a_nullable_bool(bool value_arg) { + a_nullable_bool_ = value_arg; +} + +const int64_t* AllNullableTypes::a_nullable_int() const { + return a_nullable_int_ ? &(*a_nullable_int_) : nullptr; +} +void AllNullableTypes::set_a_nullable_int(const int64_t* value_arg) { + a_nullable_int_ = + value_arg ? std::optional(*value_arg) : std::nullopt; +} +void AllNullableTypes::set_a_nullable_int(int64_t value_arg) { + a_nullable_int_ = value_arg; +} + +const int64_t* AllNullableTypes::a_nullable_int64() const { + return a_nullable_int64_ ? &(*a_nullable_int64_) : nullptr; +} +void AllNullableTypes::set_a_nullable_int64(const int64_t* value_arg) { + a_nullable_int64_ = + value_arg ? std::optional(*value_arg) : std::nullopt; +} +void AllNullableTypes::set_a_nullable_int64(int64_t value_arg) { + a_nullable_int64_ = value_arg; +} + +const double* AllNullableTypes::a_nullable_double() const { + return a_nullable_double_ ? &(*a_nullable_double_) : nullptr; +} +void AllNullableTypes::set_a_nullable_double(const double* value_arg) { + a_nullable_double_ = + value_arg ? std::optional(*value_arg) : std::nullopt; +} +void AllNullableTypes::set_a_nullable_double(double value_arg) { + a_nullable_double_ = value_arg; +} + +const std::vector* AllNullableTypes::a_nullable_byte_array() const { + return a_nullable_byte_array_ ? &(*a_nullable_byte_array_) : nullptr; +} +void AllNullableTypes::set_a_nullable_byte_array( + const std::vector* value_arg) { + a_nullable_byte_array_ = value_arg + ? std::optional>(*value_arg) + : std::nullopt; +} +void AllNullableTypes::set_a_nullable_byte_array( + const std::vector& value_arg) { + a_nullable_byte_array_ = value_arg; +} + +const std::vector* AllNullableTypes::a_nullable4_byte_array() const { + return a_nullable4_byte_array_ ? &(*a_nullable4_byte_array_) : nullptr; +} +void AllNullableTypes::set_a_nullable4_byte_array( + const std::vector* value_arg) { + a_nullable4_byte_array_ = + value_arg ? std::optional>(*value_arg) + : std::nullopt; +} +void AllNullableTypes::set_a_nullable4_byte_array( + const std::vector& value_arg) { + a_nullable4_byte_array_ = value_arg; +} + +const std::vector* AllNullableTypes::a_nullable8_byte_array() const { + return a_nullable8_byte_array_ ? &(*a_nullable8_byte_array_) : nullptr; +} +void AllNullableTypes::set_a_nullable8_byte_array( + const std::vector* value_arg) { + a_nullable8_byte_array_ = + value_arg ? std::optional>(*value_arg) + : std::nullopt; +} +void AllNullableTypes::set_a_nullable8_byte_array( + const std::vector& value_arg) { + a_nullable8_byte_array_ = value_arg; +} + +const std::vector* AllNullableTypes::a_nullable_float_array() const { + return a_nullable_float_array_ ? &(*a_nullable_float_array_) : nullptr; +} +void AllNullableTypes::set_a_nullable_float_array( + const std::vector* value_arg) { + a_nullable_float_array_ = + value_arg ? std::optional>(*value_arg) : std::nullopt; +} +void AllNullableTypes::set_a_nullable_float_array( + const std::vector& value_arg) { + a_nullable_float_array_ = value_arg; +} + +const EncodableList* AllNullableTypes::a_nullable_list() const { + return a_nullable_list_ ? &(*a_nullable_list_) : nullptr; +} +void AllNullableTypes::set_a_nullable_list(const EncodableList* value_arg) { + a_nullable_list_ = + value_arg ? std::optional(*value_arg) : std::nullopt; +} +void AllNullableTypes::set_a_nullable_list(const EncodableList& value_arg) { + a_nullable_list_ = value_arg; +} + +const EncodableMap* AllNullableTypes::a_nullable_map() const { + return a_nullable_map_ ? &(*a_nullable_map_) : nullptr; +} +void AllNullableTypes::set_a_nullable_map(const EncodableMap* value_arg) { + a_nullable_map_ = + value_arg ? std::optional(*value_arg) : std::nullopt; +} +void AllNullableTypes::set_a_nullable_map(const EncodableMap& value_arg) { + a_nullable_map_ = value_arg; +} + +const EncodableList* AllNullableTypes::nullable_nested_list() const { + return nullable_nested_list_ ? &(*nullable_nested_list_) : nullptr; +} +void AllNullableTypes::set_nullable_nested_list( + const EncodableList* value_arg) { + nullable_nested_list_ = + value_arg ? std::optional(*value_arg) : std::nullopt; +} +void AllNullableTypes::set_nullable_nested_list( + const EncodableList& value_arg) { + nullable_nested_list_ = value_arg; +} + +const EncodableMap* AllNullableTypes::nullable_map_with_annotations() const { + return nullable_map_with_annotations_ ? &(*nullable_map_with_annotations_) + : nullptr; +} +void AllNullableTypes::set_nullable_map_with_annotations( + const EncodableMap* value_arg) { + nullable_map_with_annotations_ = + value_arg ? std::optional(*value_arg) : std::nullopt; +} +void AllNullableTypes::set_nullable_map_with_annotations( + const EncodableMap& value_arg) { + nullable_map_with_annotations_ = value_arg; +} + +const EncodableMap* AllNullableTypes::nullable_map_with_object() const { + return nullable_map_with_object_ ? &(*nullable_map_with_object_) : nullptr; +} +void AllNullableTypes::set_nullable_map_with_object( + const EncodableMap* value_arg) { + nullable_map_with_object_ = + value_arg ? std::optional(*value_arg) : std::nullopt; +} +void AllNullableTypes::set_nullable_map_with_object( + const EncodableMap& value_arg) { + nullable_map_with_object_ = value_arg; +} + +const AnEnum* AllNullableTypes::a_nullable_enum() const { + return a_nullable_enum_ ? &(*a_nullable_enum_) : nullptr; +} +void AllNullableTypes::set_a_nullable_enum(const AnEnum* value_arg) { + a_nullable_enum_ = + value_arg ? std::optional(*value_arg) : std::nullopt; +} +void AllNullableTypes::set_a_nullable_enum(const AnEnum& value_arg) { + a_nullable_enum_ = value_arg; +} + +const std::string* AllNullableTypes::a_nullable_string() const { + return a_nullable_string_ ? &(*a_nullable_string_) : nullptr; +} +void AllNullableTypes::set_a_nullable_string( + const std::string_view* value_arg) { + a_nullable_string_ = + value_arg ? std::optional(*value_arg) : std::nullopt; +} +void AllNullableTypes::set_a_nullable_string(std::string_view value_arg) { + a_nullable_string_ = value_arg; +} EncodableList AllNullableTypes::ToEncodableList() const { EncodableList list; list.reserve(15); - list.push_back(a_nullable_bool_ ? EncodableValue(*a_nullable_bool_) : EncodableValue()); - list.push_back(a_nullable_int_ ? EncodableValue(*a_nullable_int_) : EncodableValue()); - list.push_back(a_nullable_int64_ ? EncodableValue(*a_nullable_int64_) : EncodableValue()); - list.push_back(a_nullable_double_ ? EncodableValue(*a_nullable_double_) : EncodableValue()); - list.push_back(a_nullable_byte_array_ ? EncodableValue(*a_nullable_byte_array_) : EncodableValue()); - list.push_back(a_nullable4_byte_array_ ? EncodableValue(*a_nullable4_byte_array_) : EncodableValue()); - list.push_back(a_nullable8_byte_array_ ? EncodableValue(*a_nullable8_byte_array_) : EncodableValue()); - list.push_back(a_nullable_float_array_ ? EncodableValue(*a_nullable_float_array_) : EncodableValue()); - list.push_back(a_nullable_list_ ? EncodableValue(*a_nullable_list_) : EncodableValue()); - list.push_back(a_nullable_map_ ? EncodableValue(*a_nullable_map_) : EncodableValue()); - list.push_back(nullable_nested_list_ ? EncodableValue(*nullable_nested_list_) : EncodableValue()); - list.push_back(nullable_map_with_annotations_ ? EncodableValue(*nullable_map_with_annotations_) : EncodableValue()); - list.push_back(nullable_map_with_object_ ? EncodableValue(*nullable_map_with_object_) : EncodableValue()); - list.push_back(a_nullable_enum_ ? EncodableValue((int)(*a_nullable_enum_)) : EncodableValue()); - list.push_back(a_nullable_string_ ? EncodableValue(*a_nullable_string_) : EncodableValue()); + list.push_back(a_nullable_bool_ ? EncodableValue(*a_nullable_bool_) + : EncodableValue()); + list.push_back(a_nullable_int_ ? EncodableValue(*a_nullable_int_) + : EncodableValue()); + list.push_back(a_nullable_int64_ ? EncodableValue(*a_nullable_int64_) + : EncodableValue()); + list.push_back(a_nullable_double_ ? EncodableValue(*a_nullable_double_) + : EncodableValue()); + list.push_back(a_nullable_byte_array_ + ? EncodableValue(*a_nullable_byte_array_) + : EncodableValue()); + list.push_back(a_nullable4_byte_array_ + ? EncodableValue(*a_nullable4_byte_array_) + : EncodableValue()); + list.push_back(a_nullable8_byte_array_ + ? EncodableValue(*a_nullable8_byte_array_) + : EncodableValue()); + list.push_back(a_nullable_float_array_ + ? EncodableValue(*a_nullable_float_array_) + : EncodableValue()); + list.push_back(a_nullable_list_ ? EncodableValue(*a_nullable_list_) + : EncodableValue()); + list.push_back(a_nullable_map_ ? EncodableValue(*a_nullable_map_) + : EncodableValue()); + list.push_back(nullable_nested_list_ ? EncodableValue(*nullable_nested_list_) + : EncodableValue()); + list.push_back(nullable_map_with_annotations_ + ? EncodableValue(*nullable_map_with_annotations_) + : EncodableValue()); + list.push_back(nullable_map_with_object_ + ? EncodableValue(*nullable_map_with_object_) + : EncodableValue()); + list.push_back(a_nullable_enum_ ? EncodableValue((int)(*a_nullable_enum_)) + : EncodableValue()); + list.push_back(a_nullable_string_ ? EncodableValue(*a_nullable_string_) + : EncodableValue()); return list; } -AllNullableTypes AllNullableTypes::FromEncodableList(const EncodableList& list) { +AllNullableTypes AllNullableTypes::FromEncodableList( + const EncodableList& list) { AllNullableTypes decoded; auto& encodable_a_nullable_bool = list[0]; if (!encodable_a_nullable_bool.IsNull()) { @@ -257,63 +440,78 @@ AllNullableTypes AllNullableTypes::FromEncodableList(const EncodableList& list) } auto& encodable_a_nullable_double = list[3]; if (!encodable_a_nullable_double.IsNull()) { - decoded.set_a_nullable_double(std::get(encodable_a_nullable_double)); + decoded.set_a_nullable_double( + std::get(encodable_a_nullable_double)); } auto& encodable_a_nullable_byte_array = list[4]; if (!encodable_a_nullable_byte_array.IsNull()) { - decoded.set_a_nullable_byte_array(std::get>(encodable_a_nullable_byte_array)); + decoded.set_a_nullable_byte_array( + std::get>(encodable_a_nullable_byte_array)); } auto& encodable_a_nullable4_byte_array = list[5]; if (!encodable_a_nullable4_byte_array.IsNull()) { - decoded.set_a_nullable4_byte_array(std::get>(encodable_a_nullable4_byte_array)); + decoded.set_a_nullable4_byte_array( + std::get>(encodable_a_nullable4_byte_array)); } auto& encodable_a_nullable8_byte_array = list[6]; if (!encodable_a_nullable8_byte_array.IsNull()) { - decoded.set_a_nullable8_byte_array(std::get>(encodable_a_nullable8_byte_array)); + decoded.set_a_nullable8_byte_array( + std::get>(encodable_a_nullable8_byte_array)); } auto& encodable_a_nullable_float_array = list[7]; if (!encodable_a_nullable_float_array.IsNull()) { - decoded.set_a_nullable_float_array(std::get>(encodable_a_nullable_float_array)); + decoded.set_a_nullable_float_array( + std::get>(encodable_a_nullable_float_array)); } auto& encodable_a_nullable_list = list[8]; if (!encodable_a_nullable_list.IsNull()) { - decoded.set_a_nullable_list(std::get(encodable_a_nullable_list)); + decoded.set_a_nullable_list( + std::get(encodable_a_nullable_list)); } auto& encodable_a_nullable_map = list[9]; if (!encodable_a_nullable_map.IsNull()) { - decoded.set_a_nullable_map(std::get(encodable_a_nullable_map)); + decoded.set_a_nullable_map( + std::get(encodable_a_nullable_map)); } auto& encodable_nullable_nested_list = list[10]; if (!encodable_nullable_nested_list.IsNull()) { - decoded.set_nullable_nested_list(std::get(encodable_nullable_nested_list)); + decoded.set_nullable_nested_list( + std::get(encodable_nullable_nested_list)); } auto& encodable_nullable_map_with_annotations = list[11]; if (!encodable_nullable_map_with_annotations.IsNull()) { - decoded.set_nullable_map_with_annotations(std::get(encodable_nullable_map_with_annotations)); + decoded.set_nullable_map_with_annotations( + std::get(encodable_nullable_map_with_annotations)); } auto& encodable_nullable_map_with_object = list[12]; if (!encodable_nullable_map_with_object.IsNull()) { - decoded.set_nullable_map_with_object(std::get(encodable_nullable_map_with_object)); + decoded.set_nullable_map_with_object( + std::get(encodable_nullable_map_with_object)); } auto& encodable_a_nullable_enum = list[13]; if (!encodable_a_nullable_enum.IsNull()) { - decoded.set_a_nullable_enum((AnEnum)(std::get(encodable_a_nullable_enum))); + decoded.set_a_nullable_enum( + (AnEnum)(std::get(encodable_a_nullable_enum))); } auto& encodable_a_nullable_string = list[14]; if (!encodable_a_nullable_string.IsNull()) { - decoded.set_a_nullable_string(std::get(encodable_a_nullable_string)); + decoded.set_a_nullable_string( + std::get(encodable_a_nullable_string)); } return decoded; } // AllNullableTypesWrapper -AllNullableTypesWrapper::AllNullableTypesWrapper( - const AllNullableTypes& values -) : values_(values) {} +AllNullableTypesWrapper::AllNullableTypesWrapper(const AllNullableTypes& values) + : values_(values) {} -const AllNullableTypes& AllNullableTypesWrapper::values() const { return values_; } -void AllNullableTypesWrapper::set_values(const AllNullableTypes& value_arg) { values_ = value_arg; } +const AllNullableTypes& AllNullableTypesWrapper::values() const { + return values_; +} +void AllNullableTypesWrapper::set_values(const AllNullableTypes& value_arg) { + values_ = value_arg; +} EncodableList AllNullableTypesWrapper::ToEncodableList() const { EncodableList list; @@ -322,9 +520,10 @@ EncodableList AllNullableTypesWrapper::ToEncodableList() const { return list; } -AllNullableTypesWrapper AllNullableTypesWrapper::FromEncodableList(const EncodableList& list) { +AllNullableTypesWrapper AllNullableTypesWrapper::FromEncodableList( + const EncodableList& list) { AllNullableTypesWrapper decoded( - AllNullableTypes::FromEncodableList(std::get(list[0]))); + AllNullableTypes::FromEncodableList(std::get(list[0]))); return decoded; } @@ -332,13 +531,20 @@ AllNullableTypesWrapper AllNullableTypesWrapper::FromEncodableList(const Encodab TestMessage::TestMessage() {} -TestMessage::TestMessage( - const EncodableList* test_list -) : test_list_(test_list ? std::optional(*test_list) : std::nullopt) {} +TestMessage::TestMessage(const EncodableList* test_list) + : test_list_(test_list ? std::optional(*test_list) + : std::nullopt) {} -const EncodableList* TestMessage::test_list() const { return test_list_ ? &(*test_list_) : nullptr; } -void TestMessage::set_test_list(const EncodableList* value_arg) { test_list_ = value_arg ? std::optional(*value_arg) : std::nullopt; } -void TestMessage::set_test_list(const EncodableList& value_arg) { test_list_ = value_arg; } +const EncodableList* TestMessage::test_list() const { + return test_list_ ? &(*test_list_) : nullptr; +} +void TestMessage::set_test_list(const EncodableList* value_arg) { + test_list_ = + value_arg ? std::optional(*value_arg) : std::nullopt; +} +void TestMessage::set_test_list(const EncodableList& value_arg) { + test_list_ = value_arg; +} EncodableList TestMessage::ToEncodableList() const { EncodableList list; @@ -356,42 +562,61 @@ TestMessage TestMessage::FromEncodableList(const EncodableList& list) { return decoded; } -HostIntegrationCoreApiCodecSerializer::HostIntegrationCoreApiCodecSerializer() {} -EncodableValue HostIntegrationCoreApiCodecSerializer::ReadValueOfType(uint8_t type, flutter::ByteStreamReader* stream) const { +HostIntegrationCoreApiCodecSerializer::HostIntegrationCoreApiCodecSerializer() { +} +EncodableValue HostIntegrationCoreApiCodecSerializer::ReadValueOfType( + uint8_t type, flutter::ByteStreamReader* stream) const { switch (type) { case 128: - return CustomEncodableValue(AllNullableTypes::FromEncodableList(std::get(ReadValue(stream)))); + return CustomEncodableValue(AllNullableTypes::FromEncodableList( + std::get(ReadValue(stream)))); case 129: - return CustomEncodableValue(AllNullableTypesWrapper::FromEncodableList(std::get(ReadValue(stream)))); + return CustomEncodableValue(AllNullableTypesWrapper::FromEncodableList( + std::get(ReadValue(stream)))); case 130: - return CustomEncodableValue(AllTypes::FromEncodableList(std::get(ReadValue(stream)))); + return CustomEncodableValue(AllTypes::FromEncodableList( + std::get(ReadValue(stream)))); case 131: - return CustomEncodableValue(TestMessage::FromEncodableList(std::get(ReadValue(stream)))); + return CustomEncodableValue(TestMessage::FromEncodableList( + std::get(ReadValue(stream)))); default: return flutter::StandardCodecSerializer::ReadValueOfType(type, stream); } } -void HostIntegrationCoreApiCodecSerializer::WriteValue(const EncodableValue& value, flutter::ByteStreamWriter* stream) const { - if (const CustomEncodableValue* custom_value = std::get_if(&value)) { +void HostIntegrationCoreApiCodecSerializer::WriteValue( + const EncodableValue& value, flutter::ByteStreamWriter* stream) const { + if (const CustomEncodableValue* custom_value = + std::get_if(&value)) { if (custom_value->type() == typeid(AllNullableTypes)) { stream->WriteByte(128); - WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); + WriteValue( + EncodableValue( + std::any_cast(*custom_value).ToEncodableList()), + stream); return; } if (custom_value->type() == typeid(AllNullableTypesWrapper)) { stream->WriteByte(129); - WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); + WriteValue( + EncodableValue(std::any_cast(*custom_value) + .ToEncodableList()), + stream); return; } if (custom_value->type() == typeid(AllTypes)) { stream->WriteByte(130); - WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); + WriteValue(EncodableValue( + std::any_cast(*custom_value).ToEncodableList()), + stream); return; } if (custom_value->type() == typeid(TestMessage)) { stream->WriteByte(131); - WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); + WriteValue( + EncodableValue( + std::any_cast(*custom_value).ToEncodableList()), + stream); return; } } @@ -400,2222 +625,2980 @@ void HostIntegrationCoreApiCodecSerializer::WriteValue(const EncodableValue& val /// The codec used by HostIntegrationCoreApi. const flutter::StandardMessageCodec& HostIntegrationCoreApi::GetCodec() { - return flutter::StandardMessageCodec::GetInstance(&HostIntegrationCoreApiCodecSerializer::GetInstance()); -} - -// Sets up an instance of `HostIntegrationCoreApi` to handle messages through the `binary_messenger`. -void HostIntegrationCoreApi::SetUp(flutter::BinaryMessenger* binary_messenger, HostIntegrationCoreApi* api) { - { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.noop", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - std::optional output = api->Noop(); - if (output.has_value()) { - reply(WrapError(output.value())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue()); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + return flutter::StandardMessageCodec::GetInstance( + &HostIntegrationCoreApiCodecSerializer::GetInstance()); +} + +// Sets up an instance of `HostIntegrationCoreApi` to handle messages through +// the `binary_messenger`. +void HostIntegrationCoreApi::SetUp(flutter::BinaryMessenger* binary_messenger, + HostIntegrationCoreApi* api) { + { + auto channel = std::make_unique>( + binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.noop", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + std::optional output = api->Noop(); + if (output.has_value()) { + reply(WrapError(output.value())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue()); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAllTypes", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_everything_arg = args.at(0); - if (encodable_everything_arg.IsNull()) { - reply(WrapError("everything_arg unexpectedly null.")); - return; - } - const auto& everything_arg = std::any_cast(std::get(encodable_everything_arg)); - ErrorOr output = api->EchoAllTypes(everything_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(CustomEncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAllTypes", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_everything_arg = args.at(0); + if (encodable_everything_arg.IsNull()) { + reply(WrapError("everything_arg unexpectedly null.")); + return; + } + const auto& everything_arg = std::any_cast( + std::get(encodable_everything_arg)); + ErrorOr output = api->EchoAllTypes(everything_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + CustomEncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwError", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - ErrorOr> output = api->ThrowError(); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.throwError", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + ErrorOr> output = api->ThrowError(); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwErrorFromVoid", &GetCodec()); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.throwErrorFromVoid", + &GetCodec()); if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - std::optional output = api->ThrowErrorFromVoid(); - if (output.has_value()) { - reply(WrapError(output.value())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue()); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + std::optional output = api->ThrowErrorFromVoid(); + if (output.has_value()) { + reply(WrapError(output.value())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue()); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwFlutterError", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - ErrorOr> output = api->ThrowFlutterError(); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.throwFlutterError", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + ErrorOr> output = + api->ThrowFlutterError(); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoInt", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_an_int_arg = args.at(0); - if (encodable_an_int_arg.IsNull()) { - reply(WrapError("an_int_arg unexpectedly null.")); - return; - } - const int64_t an_int_arg = encodable_an_int_arg.LongValue(); - ErrorOr output = api->EchoInt(an_int_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoInt", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_an_int_arg = args.at(0); + if (encodable_an_int_arg.IsNull()) { + reply(WrapError("an_int_arg unexpectedly null.")); + return; + } + const int64_t an_int_arg = encodable_an_int_arg.LongValue(); + ErrorOr output = api->EchoInt(an_int_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoDouble", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_double_arg = args.at(0); - if (encodable_a_double_arg.IsNull()) { - reply(WrapError("a_double_arg unexpectedly null.")); - return; - } - const auto& a_double_arg = std::get(encodable_a_double_arg); - ErrorOr output = api->EchoDouble(a_double_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoDouble", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_double_arg = args.at(0); + if (encodable_a_double_arg.IsNull()) { + reply(WrapError("a_double_arg unexpectedly null.")); + return; + } + const auto& a_double_arg = + std::get(encodable_a_double_arg); + ErrorOr output = api->EchoDouble(a_double_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoBool", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_bool_arg = args.at(0); - if (encodable_a_bool_arg.IsNull()) { - reply(WrapError("a_bool_arg unexpectedly null.")); - return; - } - const auto& a_bool_arg = std::get(encodable_a_bool_arg); - ErrorOr output = api->EchoBool(a_bool_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoBool", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_bool_arg = args.at(0); + if (encodable_a_bool_arg.IsNull()) { + reply(WrapError("a_bool_arg unexpectedly null.")); + return; + } + const auto& a_bool_arg = std::get(encodable_a_bool_arg); + ErrorOr output = api->EchoBool(a_bool_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoString", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_string_arg = args.at(0); - if (encodable_a_string_arg.IsNull()) { - reply(WrapError("a_string_arg unexpectedly null.")); - return; - } - const auto& a_string_arg = std::get(encodable_a_string_arg); - ErrorOr output = api->EchoString(a_string_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoString", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_string_arg = args.at(0); + if (encodable_a_string_arg.IsNull()) { + reply(WrapError("a_string_arg unexpectedly null.")); + return; + } + const auto& a_string_arg = + std::get(encodable_a_string_arg); + ErrorOr output = api->EchoString(a_string_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoUint8List", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_uint8_list_arg = args.at(0); - if (encodable_a_uint8_list_arg.IsNull()) { - reply(WrapError("a_uint8_list_arg unexpectedly null.")); - return; - } - const auto& a_uint8_list_arg = std::get>(encodable_a_uint8_list_arg); - ErrorOr> output = api->EchoUint8List(a_uint8_list_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoUint8List", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_uint8_list_arg = args.at(0); + if (encodable_a_uint8_list_arg.IsNull()) { + reply(WrapError("a_uint8_list_arg unexpectedly null.")); + return; + } + const auto& a_uint8_list_arg = + std::get>(encodable_a_uint8_list_arg); + ErrorOr> output = + api->EchoUint8List(a_uint8_list_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoObject", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_an_object_arg = args.at(0); - if (encodable_an_object_arg.IsNull()) { - reply(WrapError("an_object_arg unexpectedly null.")); - return; - } - const auto& an_object_arg = encodable_an_object_arg; - ErrorOr output = api->EchoObject(an_object_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoObject", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_an_object_arg = args.at(0); + if (encodable_an_object_arg.IsNull()) { + reply(WrapError("an_object_arg unexpectedly null.")); + return; + } + const auto& an_object_arg = encodable_an_object_arg; + ErrorOr output = api->EchoObject(an_object_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoList", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_list_arg = args.at(0); - if (encodable_a_list_arg.IsNull()) { - reply(WrapError("a_list_arg unexpectedly null.")); - return; - } - const auto& a_list_arg = std::get(encodable_a_list_arg); - ErrorOr output = api->EchoList(a_list_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoList", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_list_arg = args.at(0); + if (encodable_a_list_arg.IsNull()) { + reply(WrapError("a_list_arg unexpectedly null.")); + return; + } + const auto& a_list_arg = + std::get(encodable_a_list_arg); + ErrorOr output = api->EchoList(a_list_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoMap", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_map_arg = args.at(0); - if (encodable_a_map_arg.IsNull()) { - reply(WrapError("a_map_arg unexpectedly null.")); - return; - } - const auto& a_map_arg = std::get(encodable_a_map_arg); - ErrorOr output = api->EchoMap(a_map_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoMap", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_map_arg = args.at(0); + if (encodable_a_map_arg.IsNull()) { + reply(WrapError("a_map_arg unexpectedly null.")); + return; + } + const auto& a_map_arg = + std::get(encodable_a_map_arg); + ErrorOr output = api->EchoMap(a_map_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAllNullableTypes", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_everything_arg = args.at(0); - const auto* everything_arg = &(std::any_cast(std::get(encodable_everything_arg))); - ErrorOr> output = api->EchoAllNullableTypes(everything_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(CustomEncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAllNullableTypes", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_everything_arg = args.at(0); + const auto* everything_arg = + &(std::any_cast( + std::get( + encodable_everything_arg))); + ErrorOr> output = + api->EchoAllNullableTypes(everything_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + CustomEncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_wrapper_arg = args.at(0); - if (encodable_wrapper_arg.IsNull()) { - reply(WrapError("wrapper_arg unexpectedly null.")); - return; - } - const auto& wrapper_arg = std::any_cast(std::get(encodable_wrapper_arg)); - ErrorOr> output = api->ExtractNestedNullableString(wrapper_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.extractNestedNullableString", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_wrapper_arg = args.at(0); + if (encodable_wrapper_arg.IsNull()) { + reply(WrapError("wrapper_arg unexpectedly null.")); + return; + } + const auto& wrapper_arg = + std::any_cast( + std::get(encodable_wrapper_arg)); + ErrorOr> output = + api->ExtractNestedNullableString(wrapper_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_nullable_string_arg = args.at(0); - const auto* nullable_string_arg = std::get_if(&encodable_nullable_string_arg); - ErrorOr output = api->CreateNestedNullableString(nullable_string_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(CustomEncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.createNestedNullableString", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_nullable_string_arg = args.at(0); + const auto* nullable_string_arg = + std::get_if(&encodable_nullable_string_arg); + ErrorOr output = + api->CreateNestedNullableString(nullable_string_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + CustomEncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_bool_arg = args.at(0); - const auto* a_nullable_bool_arg = std::get_if(&encodable_a_nullable_bool_arg); - const auto& encodable_a_nullable_int_arg = args.at(1); - const int64_t a_nullable_int_arg_value = encodable_a_nullable_int_arg.IsNull() ? 0 : encodable_a_nullable_int_arg.LongValue(); - const auto* a_nullable_int_arg = encodable_a_nullable_int_arg.IsNull() ? nullptr : &a_nullable_int_arg_value; - const auto& encodable_a_nullable_string_arg = args.at(2); - const auto* a_nullable_string_arg = std::get_if(&encodable_a_nullable_string_arg); - ErrorOr output = api->SendMultipleNullableTypes(a_nullable_bool_arg, a_nullable_int_arg, a_nullable_string_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(CustomEncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.sendMultipleNullableTypes", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_bool_arg = args.at(0); + const auto* a_nullable_bool_arg = + std::get_if(&encodable_a_nullable_bool_arg); + const auto& encodable_a_nullable_int_arg = args.at(1); + const int64_t a_nullable_int_arg_value = + encodable_a_nullable_int_arg.IsNull() + ? 0 + : encodable_a_nullable_int_arg.LongValue(); + const auto* a_nullable_int_arg = + encodable_a_nullable_int_arg.IsNull() + ? nullptr + : &a_nullable_int_arg_value; + const auto& encodable_a_nullable_string_arg = args.at(2); + const auto* a_nullable_string_arg = + std::get_if(&encodable_a_nullable_string_arg); + ErrorOr output = api->SendMultipleNullableTypes( + a_nullable_bool_arg, a_nullable_int_arg, + a_nullable_string_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + CustomEncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableInt", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_int_arg = args.at(0); - const int64_t a_nullable_int_arg_value = encodable_a_nullable_int_arg.IsNull() ? 0 : encodable_a_nullable_int_arg.LongValue(); - const auto* a_nullable_int_arg = encodable_a_nullable_int_arg.IsNull() ? nullptr : &a_nullable_int_arg_value; - ErrorOr> output = api->EchoNullableInt(a_nullable_int_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableInt", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_int_arg = args.at(0); + const int64_t a_nullable_int_arg_value = + encodable_a_nullable_int_arg.IsNull() + ? 0 + : encodable_a_nullable_int_arg.LongValue(); + const auto* a_nullable_int_arg = + encodable_a_nullable_int_arg.IsNull() + ? nullptr + : &a_nullable_int_arg_value; + ErrorOr> output = + api->EchoNullableInt(a_nullable_int_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableDouble", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_double_arg = args.at(0); - const auto* a_nullable_double_arg = std::get_if(&encodable_a_nullable_double_arg); - ErrorOr> output = api->EchoNullableDouble(a_nullable_double_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableDouble", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_double_arg = args.at(0); + const auto* a_nullable_double_arg = + std::get_if(&encodable_a_nullable_double_arg); + ErrorOr> output = + api->EchoNullableDouble(a_nullable_double_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableBool", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_bool_arg = args.at(0); - const auto* a_nullable_bool_arg = std::get_if(&encodable_a_nullable_bool_arg); - ErrorOr> output = api->EchoNullableBool(a_nullable_bool_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableBool", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_bool_arg = args.at(0); + const auto* a_nullable_bool_arg = + std::get_if(&encodable_a_nullable_bool_arg); + ErrorOr> output = + api->EchoNullableBool(a_nullable_bool_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableString", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_string_arg = args.at(0); - const auto* a_nullable_string_arg = std::get_if(&encodable_a_nullable_string_arg); - ErrorOr> output = api->EchoNullableString(a_nullable_string_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableString", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_string_arg = args.at(0); + const auto* a_nullable_string_arg = + std::get_if(&encodable_a_nullable_string_arg); + ErrorOr> output = + api->EchoNullableString(a_nullable_string_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_uint8_list_arg = args.at(0); - const auto* a_nullable_uint8_list_arg = std::get_if>(&encodable_a_nullable_uint8_list_arg); - ErrorOr>> output = api->EchoNullableUint8List(a_nullable_uint8_list_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableUint8List", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_uint8_list_arg = args.at(0); + const auto* a_nullable_uint8_list_arg = + std::get_if>( + &encodable_a_nullable_uint8_list_arg); + ErrorOr>> output = + api->EchoNullableUint8List(a_nullable_uint8_list_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableObject", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_object_arg = args.at(0); - const auto* a_nullable_object_arg = &encodable_a_nullable_object_arg; - ErrorOr> output = api->EchoNullableObject(a_nullable_object_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableObject", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_object_arg = args.at(0); + const auto* a_nullable_object_arg = + &encodable_a_nullable_object_arg; + ErrorOr> output = + api->EchoNullableObject(a_nullable_object_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableList", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_list_arg = args.at(0); - const auto* a_nullable_list_arg = std::get_if(&encodable_a_nullable_list_arg); - ErrorOr> output = api->EchoNullableList(a_nullable_list_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableList", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_list_arg = args.at(0); + const auto* a_nullable_list_arg = + std::get_if(&encodable_a_nullable_list_arg); + ErrorOr> output = + api->EchoNullableList(a_nullable_list_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableMap", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_map_arg = args.at(0); - const auto* a_nullable_map_arg = std::get_if(&encodable_a_nullable_map_arg); - ErrorOr> output = api->EchoNullableMap(a_nullable_map_arg); - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoNullableMap", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_map_arg = args.at(0); + const auto* a_nullable_map_arg = + std::get_if(&encodable_a_nullable_map_arg); + ErrorOr> output = + api->EchoNullableMap(a_nullable_map_arg); + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.noopAsync", &GetCodec()); + auto channel = std::make_unique>( + binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.noopAsync", + &GetCodec()); if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - api->NoopAsync([reply](std::optional&& output) { - if (output.has_value()) { - reply(WrapError(output.value())); - return; + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + api->NoopAsync([reply](std::optional&& output) { + if (output.has_value()) { + reply(WrapError(output.value())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue()); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue()); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncInt", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_an_int_arg = args.at(0); - if (encodable_an_int_arg.IsNull()) { - reply(WrapError("an_int_arg unexpectedly null.")); - return; - } - const int64_t an_int_arg = encodable_an_int_arg.LongValue(); - api->EchoAsyncInt(an_int_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncInt", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_an_int_arg = args.at(0); + if (encodable_an_int_arg.IsNull()) { + reply(WrapError("an_int_arg unexpectedly null.")); + return; + } + const int64_t an_int_arg = encodable_an_int_arg.LongValue(); + api->EchoAsyncInt(an_int_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncDouble", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_double_arg = args.at(0); - if (encodable_a_double_arg.IsNull()) { - reply(WrapError("a_double_arg unexpectedly null.")); - return; - } - const auto& a_double_arg = std::get(encodable_a_double_arg); - api->EchoAsyncDouble(a_double_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncDouble", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_double_arg = args.at(0); + if (encodable_a_double_arg.IsNull()) { + reply(WrapError("a_double_arg unexpectedly null.")); + return; + } + const auto& a_double_arg = + std::get(encodable_a_double_arg); + api->EchoAsyncDouble( + a_double_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncBool", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_bool_arg = args.at(0); - if (encodable_a_bool_arg.IsNull()) { - reply(WrapError("a_bool_arg unexpectedly null.")); - return; - } - const auto& a_bool_arg = std::get(encodable_a_bool_arg); - api->EchoAsyncBool(a_bool_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncBool", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_bool_arg = args.at(0); + if (encodable_a_bool_arg.IsNull()) { + reply(WrapError("a_bool_arg unexpectedly null.")); + return; + } + const auto& a_bool_arg = std::get(encodable_a_bool_arg); + api->EchoAsyncBool(a_bool_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncString", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_string_arg = args.at(0); - if (encodable_a_string_arg.IsNull()) { - reply(WrapError("a_string_arg unexpectedly null.")); - return; - } - const auto& a_string_arg = std::get(encodable_a_string_arg); - api->EchoAsyncString(a_string_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncString", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_string_arg = args.at(0); + if (encodable_a_string_arg.IsNull()) { + reply(WrapError("a_string_arg unexpectedly null.")); + return; + } + const auto& a_string_arg = + std::get(encodable_a_string_arg); + api->EchoAsyncString( + a_string_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncUint8List", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_uint8_list_arg = args.at(0); - if (encodable_a_uint8_list_arg.IsNull()) { - reply(WrapError("a_uint8_list_arg unexpectedly null.")); - return; - } - const auto& a_uint8_list_arg = std::get>(encodable_a_uint8_list_arg); - api->EchoAsyncUint8List(a_uint8_list_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncUint8List", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_uint8_list_arg = args.at(0); + if (encodable_a_uint8_list_arg.IsNull()) { + reply(WrapError("a_uint8_list_arg unexpectedly null.")); + return; + } + const auto& a_uint8_list_arg = + std::get>(encodable_a_uint8_list_arg); + api->EchoAsyncUint8List( + a_uint8_list_arg, + [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncObject", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_an_object_arg = args.at(0); - if (encodable_an_object_arg.IsNull()) { - reply(WrapError("an_object_arg unexpectedly null.")); - return; - } - const auto& an_object_arg = encodable_an_object_arg; - api->EchoAsyncObject(an_object_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncObject", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_an_object_arg = args.at(0); + if (encodable_an_object_arg.IsNull()) { + reply(WrapError("an_object_arg unexpectedly null.")); + return; + } + const auto& an_object_arg = encodable_an_object_arg; + api->EchoAsyncObject( + an_object_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncList", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_list_arg = args.at(0); - if (encodable_a_list_arg.IsNull()) { - reply(WrapError("a_list_arg unexpectedly null.")); - return; - } - const auto& a_list_arg = std::get(encodable_a_list_arg); - api->EchoAsyncList(a_list_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncList", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_list_arg = args.at(0); + if (encodable_a_list_arg.IsNull()) { + reply(WrapError("a_list_arg unexpectedly null.")); + return; + } + const auto& a_list_arg = + std::get(encodable_a_list_arg); + api->EchoAsyncList( + a_list_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncMap", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_map_arg = args.at(0); - if (encodable_a_map_arg.IsNull()) { - reply(WrapError("a_map_arg unexpectedly null.")); - return; - } - const auto& a_map_arg = std::get(encodable_a_map_arg); - api->EchoAsyncMap(a_map_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncMap", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_map_arg = args.at(0); + if (encodable_a_map_arg.IsNull()) { + reply(WrapError("a_map_arg unexpectedly null.")); + return; + } + const auto& a_map_arg = + std::get(encodable_a_map_arg); + api->EchoAsyncMap( + a_map_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncError", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - api->ThrowAsyncError([reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncError", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + api->ThrowAsyncError( + [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid", &GetCodec()); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncErrorFromVoid", + &GetCodec()); if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - api->ThrowAsyncErrorFromVoid([reply](std::optional&& output) { - if (output.has_value()) { - reply(WrapError(output.value())); - return; + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + api->ThrowAsyncErrorFromVoid( + [reply](std::optional&& output) { + if (output.has_value()) { + reply(WrapError(output.value())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue()); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue()); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - api->ThrowAsyncFlutterError([reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.throwAsyncFlutterError", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + api->ThrowAsyncFlutterError( + [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncAllTypes", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_everything_arg = args.at(0); - if (encodable_everything_arg.IsNull()) { - reply(WrapError("everything_arg unexpectedly null.")); - return; - } - const auto& everything_arg = std::any_cast(std::get(encodable_everything_arg)); - api->EchoAsyncAllTypes(everything_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncAllTypes", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_everything_arg = args.at(0); + if (encodable_everything_arg.IsNull()) { + reply(WrapError("everything_arg unexpectedly null.")); + return; + } + const auto& everything_arg = std::any_cast( + std::get(encodable_everything_arg)); + api->EchoAsyncAllTypes( + everything_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + CustomEncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(CustomEncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableAllNullableTypes", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_everything_arg = args.at(0); - const auto* everything_arg = &(std::any_cast(std::get(encodable_everything_arg))); - api->EchoAsyncNullableAllNullableTypes(everything_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi." + "echoAsyncNullableAllNullableTypes", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_everything_arg = args.at(0); + const auto* everything_arg = + &(std::any_cast( + std::get( + encodable_everything_arg))); + api->EchoAsyncNullableAllNullableTypes( + everything_arg, + [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back(CustomEncodableValue( + std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(CustomEncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableInt", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_an_int_arg = args.at(0); - const int64_t an_int_arg_value = encodable_an_int_arg.IsNull() ? 0 : encodable_an_int_arg.LongValue(); - const auto* an_int_arg = encodable_an_int_arg.IsNull() ? nullptr : &an_int_arg_value; - api->EchoAsyncNullableInt(an_int_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableInt", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_an_int_arg = args.at(0); + const int64_t an_int_arg_value = + encodable_an_int_arg.IsNull() + ? 0 + : encodable_an_int_arg.LongValue(); + const auto* an_int_arg = + encodable_an_int_arg.IsNull() ? nullptr : &an_int_arg_value; + api->EchoAsyncNullableInt( + an_int_arg, + [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_double_arg = args.at(0); - const auto* a_double_arg = std::get_if(&encodable_a_double_arg); - api->EchoAsyncNullableDouble(a_double_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableDouble", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_double_arg = args.at(0); + const auto* a_double_arg = + std::get_if(&encodable_a_double_arg); + api->EchoAsyncNullableDouble( + a_double_arg, + [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_bool_arg = args.at(0); - const auto* a_bool_arg = std::get_if(&encodable_a_bool_arg); - api->EchoAsyncNullableBool(a_bool_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableBool", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_bool_arg = args.at(0); + const auto* a_bool_arg = std::get_if(&encodable_a_bool_arg); + api->EchoAsyncNullableBool( + a_bool_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_string_arg = args.at(0); - const auto* a_string_arg = std::get_if(&encodable_a_string_arg); - api->EchoAsyncNullableString(a_string_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableString", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_string_arg = args.at(0); + const auto* a_string_arg = + std::get_if(&encodable_a_string_arg); + api->EchoAsyncNullableString( + a_string_arg, + [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_uint8_list_arg = args.at(0); - const auto* a_uint8_list_arg = std::get_if>(&encodable_a_uint8_list_arg); - api->EchoAsyncNullableUint8List(a_uint8_list_arg, [reply](ErrorOr>>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableUint8List", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_uint8_list_arg = args.at(0); + const auto* a_uint8_list_arg = std::get_if>( + &encodable_a_uint8_list_arg); + api->EchoAsyncNullableUint8List( + a_uint8_list_arg, + [reply]( + ErrorOr>>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_an_object_arg = args.at(0); - const auto* an_object_arg = &encodable_an_object_arg; - api->EchoAsyncNullableObject(an_object_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableObject", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_an_object_arg = args.at(0); + const auto* an_object_arg = &encodable_an_object_arg; + api->EchoAsyncNullableObject( + an_object_arg, + [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_list_arg = args.at(0); - const auto* a_list_arg = std::get_if(&encodable_a_list_arg); - api->EchoAsyncNullableList(a_list_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableList", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_list_arg = args.at(0); + const auto* a_list_arg = + std::get_if(&encodable_a_list_arg); + api->EchoAsyncNullableList( + a_list_arg, + [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableMap", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_map_arg = args.at(0); - const auto* a_map_arg = std::get_if(&encodable_a_map_arg); - api->EchoAsyncNullableMap(a_map_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.echoAsyncNullableMap", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_map_arg = args.at(0); + const auto* a_map_arg = + std::get_if(&encodable_a_map_arg); + api->EchoAsyncNullableMap( + a_map_arg, + [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterNoop", &GetCodec()); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterNoop", + &GetCodec()); if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - api->CallFlutterNoop([reply](std::optional&& output) { - if (output.has_value()) { - reply(WrapError(output.value())); - return; + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + api->CallFlutterNoop( + [reply](std::optional&& output) { + if (output.has_value()) { + reply(WrapError(output.value())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue()); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue()); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - api->CallFlutterThrowError([reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowError", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + api->CallFlutterThrowError( + [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterThrowErrorFromVoid", &GetCodec()); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi." + "callFlutterThrowErrorFromVoid", + &GetCodec()); if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - api->CallFlutterThrowErrorFromVoid([reply](std::optional&& output) { - if (output.has_value()) { - reply(WrapError(output.value())); - return; + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + api->CallFlutterThrowErrorFromVoid( + [reply](std::optional&& output) { + if (output.has_value()) { + reply(WrapError(output.value())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue()); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue()); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_everything_arg = args.at(0); - if (encodable_everything_arg.IsNull()) { - reply(WrapError("everything_arg unexpectedly null.")); - return; - } - const auto& everything_arg = std::any_cast(std::get(encodable_everything_arg)); - api->CallFlutterEchoAllTypes(everything_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoAllTypes", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_everything_arg = args.at(0); + if (encodable_everything_arg.IsNull()) { + reply(WrapError("everything_arg unexpectedly null.")); + return; + } + const auto& everything_arg = std::any_cast( + std::get(encodable_everything_arg)); + api->CallFlutterEchoAllTypes( + everything_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + CustomEncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(CustomEncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterSendMultipleNullableTypes", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_nullable_bool_arg = args.at(0); - const auto* a_nullable_bool_arg = std::get_if(&encodable_a_nullable_bool_arg); - const auto& encodable_a_nullable_int_arg = args.at(1); - const int64_t a_nullable_int_arg_value = encodable_a_nullable_int_arg.IsNull() ? 0 : encodable_a_nullable_int_arg.LongValue(); - const auto* a_nullable_int_arg = encodable_a_nullable_int_arg.IsNull() ? nullptr : &a_nullable_int_arg_value; - const auto& encodable_a_nullable_string_arg = args.at(2); - const auto* a_nullable_string_arg = std::get_if(&encodable_a_nullable_string_arg); - api->CallFlutterSendMultipleNullableTypes(a_nullable_bool_arg, a_nullable_int_arg, a_nullable_string_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi." + "callFlutterSendMultipleNullableTypes", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_nullable_bool_arg = args.at(0); + const auto* a_nullable_bool_arg = + std::get_if(&encodable_a_nullable_bool_arg); + const auto& encodable_a_nullable_int_arg = args.at(1); + const int64_t a_nullable_int_arg_value = + encodable_a_nullable_int_arg.IsNull() + ? 0 + : encodable_a_nullable_int_arg.LongValue(); + const auto* a_nullable_int_arg = + encodable_a_nullable_int_arg.IsNull() + ? nullptr + : &a_nullable_int_arg_value; + const auto& encodable_a_nullable_string_arg = args.at(2); + const auto* a_nullable_string_arg = + std::get_if(&encodable_a_nullable_string_arg); + api->CallFlutterSendMultipleNullableTypes( + a_nullable_bool_arg, a_nullable_int_arg, + a_nullable_string_arg, + [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + CustomEncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(CustomEncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoBool", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_bool_arg = args.at(0); - if (encodable_a_bool_arg.IsNull()) { - reply(WrapError("a_bool_arg unexpectedly null.")); - return; - } - const auto& a_bool_arg = std::get(encodable_a_bool_arg); - api->CallFlutterEchoBool(a_bool_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoBool", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_bool_arg = args.at(0); + if (encodable_a_bool_arg.IsNull()) { + reply(WrapError("a_bool_arg unexpectedly null.")); + return; + } + const auto& a_bool_arg = std::get(encodable_a_bool_arg); + api->CallFlutterEchoBool( + a_bool_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoInt", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_an_int_arg = args.at(0); - if (encodable_an_int_arg.IsNull()) { - reply(WrapError("an_int_arg unexpectedly null.")); - return; - } - const int64_t an_int_arg = encodable_an_int_arg.LongValue(); - api->CallFlutterEchoInt(an_int_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoInt", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_an_int_arg = args.at(0); + if (encodable_an_int_arg.IsNull()) { + reply(WrapError("an_int_arg unexpectedly null.")); + return; + } + const int64_t an_int_arg = encodable_an_int_arg.LongValue(); + api->CallFlutterEchoInt( + an_int_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_double_arg = args.at(0); - if (encodable_a_double_arg.IsNull()) { - reply(WrapError("a_double_arg unexpectedly null.")); - return; - } - const auto& a_double_arg = std::get(encodable_a_double_arg); - api->CallFlutterEchoDouble(a_double_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoDouble", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_double_arg = args.at(0); + if (encodable_a_double_arg.IsNull()) { + reply(WrapError("a_double_arg unexpectedly null.")); + return; + } + const auto& a_double_arg = + std::get(encodable_a_double_arg); + api->CallFlutterEchoDouble( + a_double_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_string_arg = args.at(0); - if (encodable_a_string_arg.IsNull()) { - reply(WrapError("a_string_arg unexpectedly null.")); - return; - } - const auto& a_string_arg = std::get(encodable_a_string_arg); - api->CallFlutterEchoString(a_string_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoString", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_string_arg = args.at(0); + if (encodable_a_string_arg.IsNull()) { + reply(WrapError("a_string_arg unexpectedly null.")); + return; + } + const auto& a_string_arg = + std::get(encodable_a_string_arg); + api->CallFlutterEchoString( + a_string_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_list_arg = args.at(0); - if (encodable_a_list_arg.IsNull()) { - reply(WrapError("a_list_arg unexpectedly null.")); - return; - } - const auto& a_list_arg = std::get>(encodable_a_list_arg); - api->CallFlutterEchoUint8List(a_list_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoUint8List", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_list_arg = args.at(0); + if (encodable_a_list_arg.IsNull()) { + reply(WrapError("a_list_arg unexpectedly null.")); + return; + } + const auto& a_list_arg = + std::get>(encodable_a_list_arg); + api->CallFlutterEchoUint8List( + a_list_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoList", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_list_arg = args.at(0); - if (encodable_a_list_arg.IsNull()) { - reply(WrapError("a_list_arg unexpectedly null.")); - return; - } - const auto& a_list_arg = std::get(encodable_a_list_arg); - api->CallFlutterEchoList(a_list_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoList", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_list_arg = args.at(0); + if (encodable_a_list_arg.IsNull()) { + reply(WrapError("a_list_arg unexpectedly null.")); + return; + } + const auto& a_list_arg = + std::get(encodable_a_list_arg); + api->CallFlutterEchoList( + a_list_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoMap", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_map_arg = args.at(0); - if (encodable_a_map_arg.IsNull()) { - reply(WrapError("a_map_arg unexpectedly null.")); - return; - } - const auto& a_map_arg = std::get(encodable_a_map_arg); - api->CallFlutterEchoMap(a_map_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoMap", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_map_arg = args.at(0); + if (encodable_a_map_arg.IsNull()) { + reply(WrapError("a_map_arg unexpectedly null.")); + return; + } + const auto& a_map_arg = + std::get(encodable_a_map_arg); + api->CallFlutterEchoMap( + a_map_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_bool_arg = args.at(0); - const auto* a_bool_arg = std::get_if(&encodable_a_bool_arg); - api->CallFlutterEchoNullableBool(a_bool_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableBool", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_bool_arg = args.at(0); + const auto* a_bool_arg = std::get_if(&encodable_a_bool_arg); + api->CallFlutterEchoNullableBool( + a_bool_arg, [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_an_int_arg = args.at(0); - const int64_t an_int_arg_value = encodable_an_int_arg.IsNull() ? 0 : encodable_an_int_arg.LongValue(); - const auto* an_int_arg = encodable_an_int_arg.IsNull() ? nullptr : &an_int_arg_value; - api->CallFlutterEchoNullableInt(an_int_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableInt", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_an_int_arg = args.at(0); + const int64_t an_int_arg_value = + encodable_an_int_arg.IsNull() + ? 0 + : encodable_an_int_arg.LongValue(); + const auto* an_int_arg = + encodable_an_int_arg.IsNull() ? nullptr : &an_int_arg_value; + api->CallFlutterEchoNullableInt( + an_int_arg, + [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableDouble", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_double_arg = args.at(0); - const auto* a_double_arg = std::get_if(&encodable_a_double_arg); - api->CallFlutterEchoNullableDouble(a_double_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi." + "callFlutterEchoNullableDouble", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_double_arg = args.at(0); + const auto* a_double_arg = + std::get_if(&encodable_a_double_arg); + api->CallFlutterEchoNullableDouble( + a_double_arg, + [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableString", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_string_arg = args.at(0); - const auto* a_string_arg = std::get_if(&encodable_a_string_arg); - api->CallFlutterEchoNullableString(a_string_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi." + "callFlutterEchoNullableString", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_string_arg = args.at(0); + const auto* a_string_arg = + std::get_if(&encodable_a_string_arg); + api->CallFlutterEchoNullableString( + a_string_arg, + [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableUint8List", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_list_arg = args.at(0); - const auto* a_list_arg = std::get_if>(&encodable_a_list_arg); - api->CallFlutterEchoNullableUint8List(a_list_arg, [reply](ErrorOr>>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi." + "callFlutterEchoNullableUint8List", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_list_arg = args.at(0); + const auto* a_list_arg = + std::get_if>(&encodable_a_list_arg); + api->CallFlutterEchoNullableUint8List( + a_list_arg, + [reply]( + ErrorOr>>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_list_arg = args.at(0); - const auto* a_list_arg = std::get_if(&encodable_a_list_arg); - api->CallFlutterEchoNullableList(a_list_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableList", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_list_arg = args.at(0); + const auto* a_list_arg = + std::get_if(&encodable_a_list_arg); + api->CallFlutterEchoNullableList( + a_list_arg, + [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); - } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_map_arg = args.at(0); - const auto* a_map_arg = std::get_if(&encodable_a_map_arg); - api->CallFlutterEchoNullableMap(a_map_arg, [reply](ErrorOr>&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - auto output_optional = std::move(output).TakeValue(); - if (output_optional) { - wrapped.push_back(EncodableValue(std::move(output_optional).value())); - } else { - wrapped.push_back(EncodableValue()); + auto channel = std::make_unique>( + binary_messenger, + "dev.flutter.pigeon.HostIntegrationCoreApi.callFlutterEchoNullableMap", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_map_arg = args.at(0); + const auto* a_map_arg = + std::get_if(&encodable_a_map_arg); + api->CallFlutterEchoNullableMap( + a_map_arg, + [reply](ErrorOr>&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + auto output_optional = std::move(output).TakeValue(); + if (output_optional) { + wrapped.push_back( + EncodableValue(std::move(output_optional).value())); + } else { + wrapped.push_back(EncodableValue()); + } + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } } } -EncodableValue HostIntegrationCoreApi::WrapError(std::string_view error_message) { - return EncodableValue(EncodableList{ - EncodableValue(std::string(error_message)), - EncodableValue("Error"), - EncodableValue() - }); +EncodableValue HostIntegrationCoreApi::WrapError( + std::string_view error_message) { + return EncodableValue( + EncodableList{EncodableValue(std::string(error_message)), + EncodableValue("Error"), EncodableValue()}); } EncodableValue HostIntegrationCoreApi::WrapError(const FlutterError& error) { - return EncodableValue(EncodableList{ - EncodableValue(error.code()), - EncodableValue(error.message()), - error.details() - }); + return EncodableValue(EncodableList{EncodableValue(error.code()), + EncodableValue(error.message()), + error.details()}); } - -FlutterIntegrationCoreApiCodecSerializer::FlutterIntegrationCoreApiCodecSerializer() {} -EncodableValue FlutterIntegrationCoreApiCodecSerializer::ReadValueOfType(uint8_t type, flutter::ByteStreamReader* stream) const { +FlutterIntegrationCoreApiCodecSerializer:: + FlutterIntegrationCoreApiCodecSerializer() {} +EncodableValue FlutterIntegrationCoreApiCodecSerializer::ReadValueOfType( + uint8_t type, flutter::ByteStreamReader* stream) const { switch (type) { case 128: - return CustomEncodableValue(AllNullableTypes::FromEncodableList(std::get(ReadValue(stream)))); + return CustomEncodableValue(AllNullableTypes::FromEncodableList( + std::get(ReadValue(stream)))); case 129: - return CustomEncodableValue(AllNullableTypesWrapper::FromEncodableList(std::get(ReadValue(stream)))); + return CustomEncodableValue(AllNullableTypesWrapper::FromEncodableList( + std::get(ReadValue(stream)))); case 130: - return CustomEncodableValue(AllTypes::FromEncodableList(std::get(ReadValue(stream)))); + return CustomEncodableValue(AllTypes::FromEncodableList( + std::get(ReadValue(stream)))); case 131: - return CustomEncodableValue(TestMessage::FromEncodableList(std::get(ReadValue(stream)))); + return CustomEncodableValue(TestMessage::FromEncodableList( + std::get(ReadValue(stream)))); default: return flutter::StandardCodecSerializer::ReadValueOfType(type, stream); } } -void FlutterIntegrationCoreApiCodecSerializer::WriteValue(const EncodableValue& value, flutter::ByteStreamWriter* stream) const { - if (const CustomEncodableValue* custom_value = std::get_if(&value)) { +void FlutterIntegrationCoreApiCodecSerializer::WriteValue( + const EncodableValue& value, flutter::ByteStreamWriter* stream) const { + if (const CustomEncodableValue* custom_value = + std::get_if(&value)) { if (custom_value->type() == typeid(AllNullableTypes)) { stream->WriteByte(128); - WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); + WriteValue( + EncodableValue( + std::any_cast(*custom_value).ToEncodableList()), + stream); return; } if (custom_value->type() == typeid(AllNullableTypesWrapper)) { stream->WriteByte(129); - WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); + WriteValue( + EncodableValue(std::any_cast(*custom_value) + .ToEncodableList()), + stream); return; } if (custom_value->type() == typeid(AllTypes)) { stream->WriteByte(130); - WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); + WriteValue(EncodableValue( + std::any_cast(*custom_value).ToEncodableList()), + stream); return; } if (custom_value->type() == typeid(TestMessage)) { stream->WriteByte(131); - WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); + WriteValue( + EncodableValue( + std::any_cast(*custom_value).ToEncodableList()), + stream); return; } } flutter::StandardCodecSerializer::WriteValue(value, stream); } -// Generated class from Pigeon that represents Flutter messages that can be called from C++. -FlutterIntegrationCoreApi::FlutterIntegrationCoreApi(flutter::BinaryMessenger* binary_messenger) { +// Generated class from Pigeon that represents Flutter messages that can be +// called from C++. +FlutterIntegrationCoreApi::FlutterIntegrationCoreApi( + flutter::BinaryMessenger* binary_messenger) { this->binary_messenger_ = binary_messenger; } const flutter::StandardMessageCodec& FlutterIntegrationCoreApi::GetCodec() { - return flutter::StandardMessageCodec::GetInstance(&FlutterIntegrationCoreApiCodecSerializer::GetInstance()); + return flutter::StandardMessageCodec::GetInstance( + &FlutterIntegrationCoreApiCodecSerializer::GetInstance()); } -void FlutterIntegrationCoreApi::Noop(std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.noop", &GetCodec()); +void FlutterIntegrationCoreApi::Noop( + std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.noop", + &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - on_success(); - }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { on_success(); }); } -void FlutterIntegrationCoreApi::ThrowError(std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.throwError", &GetCodec()); +void FlutterIntegrationCoreApi::ThrowError( + std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.throwError", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto* return_value = &encodable_return_value; - on_success(return_value); - }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto* return_value = &encodable_return_value; + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::ThrowErrorFromVoid(std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid", &GetCodec()); +void FlutterIntegrationCoreApi::ThrowErrorFromVoid( + std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.throwErrorFromVoid", + &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - on_success(); - }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { on_success(); }); } -void FlutterIntegrationCoreApi::EchoAllTypes(const AllTypes& everything_arg, std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes", &GetCodec()); +void FlutterIntegrationCoreApi::EchoAllTypes( + const AllTypes& everything_arg, + std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllTypes", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - CustomEncodableValue(everything_arg), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = std::any_cast(std::get(encodable_return_value)); - on_success(return_value); + CustomEncodableValue(everything_arg), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = std::any_cast( + std::get(encodable_return_value)); + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::EchoAllNullableTypes(const AllNullableTypes& everything_arg, std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes", &GetCodec()); +void FlutterIntegrationCoreApi::EchoAllNullableTypes( + const AllNullableTypes& everything_arg, + std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAllNullableTypes", + &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - CustomEncodableValue(everything_arg), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = std::any_cast(std::get(encodable_return_value)); - on_success(return_value); + CustomEncodableValue(everything_arg), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = std::any_cast( + std::get(encodable_return_value)); + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::SendMultipleNullableTypes(const bool* a_nullable_bool_arg, const int64_t* a_nullable_int_arg, const std::string* a_nullable_string_arg, std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes", &GetCodec()); +void FlutterIntegrationCoreApi::SendMultipleNullableTypes( + const bool* a_nullable_bool_arg, const int64_t* a_nullable_int_arg, + const std::string* a_nullable_string_arg, + std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.sendMultipleNullableTypes", + &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - a_nullable_bool_arg ? EncodableValue(*a_nullable_bool_arg) : EncodableValue(), - a_nullable_int_arg ? EncodableValue(*a_nullable_int_arg) : EncodableValue(), - a_nullable_string_arg ? EncodableValue(*a_nullable_string_arg) : EncodableValue(), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = std::any_cast(std::get(encodable_return_value)); - on_success(return_value); + a_nullable_bool_arg ? EncodableValue(*a_nullable_bool_arg) + : EncodableValue(), + a_nullable_int_arg ? EncodableValue(*a_nullable_int_arg) + : EncodableValue(), + a_nullable_string_arg ? EncodableValue(*a_nullable_string_arg) + : EncodableValue(), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = std::any_cast( + std::get(encodable_return_value)); + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::EchoBool(bool a_bool_arg, std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoBool", &GetCodec()); +void FlutterIntegrationCoreApi::EchoBool( + bool a_bool_arg, std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoBool", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - EncodableValue(a_bool_arg), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = std::get(encodable_return_value); - on_success(return_value); + EncodableValue(a_bool_arg), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = std::get(encodable_return_value); + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::EchoInt(int64_t an_int_arg, std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoInt", &GetCodec()); +void FlutterIntegrationCoreApi::EchoInt( + int64_t an_int_arg, std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoInt", + &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - EncodableValue(an_int_arg), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const int64_t return_value = encodable_return_value.LongValue(); - on_success(return_value); + EncodableValue(an_int_arg), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const int64_t return_value = encodable_return_value.LongValue(); + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::EchoDouble(double a_double_arg, std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble", &GetCodec()); +void FlutterIntegrationCoreApi::EchoDouble( + double a_double_arg, std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoDouble", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - EncodableValue(a_double_arg), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = std::get(encodable_return_value); - on_success(return_value); + EncodableValue(a_double_arg), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = std::get(encodable_return_value); + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::EchoString(const std::string& a_string_arg, std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString", &GetCodec()); +void FlutterIntegrationCoreApi::EchoString( + const std::string& a_string_arg, + std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoString", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - EncodableValue(a_string_arg), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = std::get(encodable_return_value); - on_success(return_value); + EncodableValue(a_string_arg), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = + std::get(encodable_return_value); + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::EchoUint8List(const std::vector& a_list_arg, std::function&)>&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List", &GetCodec()); +void FlutterIntegrationCoreApi::EchoUint8List( + const std::vector& a_list_arg, + std::function&)>&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoUint8List", + &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - EncodableValue(a_list_arg), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = std::get>(encodable_return_value); - on_success(return_value); + EncodableValue(a_list_arg), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = + std::get>(encodable_return_value); + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::EchoList(const EncodableList& a_list_arg, std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList", &GetCodec()); +void FlutterIntegrationCoreApi::EchoList( + const EncodableList& a_list_arg, + std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoList", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - EncodableValue(a_list_arg), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = std::get(encodable_return_value); - on_success(return_value); + EncodableValue(a_list_arg), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = + std::get(encodable_return_value); + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::EchoMap(const EncodableMap& a_map_arg, std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap", &GetCodec()); +void FlutterIntegrationCoreApi::EchoMap( + const EncodableMap& a_map_arg, + std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoMap", + &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - EncodableValue(a_map_arg), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = std::get(encodable_return_value); - on_success(return_value); + EncodableValue(a_map_arg), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = + std::get(encodable_return_value); + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::EchoNullableBool(const bool* a_bool_arg, std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool", &GetCodec()); +void FlutterIntegrationCoreApi::EchoNullableBool( + const bool* a_bool_arg, std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableBool", + &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - a_bool_arg ? EncodableValue(*a_bool_arg) : EncodableValue(), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto* return_value = std::get_if(&encodable_return_value); - on_success(return_value); + a_bool_arg ? EncodableValue(*a_bool_arg) : EncodableValue(), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto* return_value = std::get_if(&encodable_return_value); + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::EchoNullableInt(const int64_t* an_int_arg, std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt", &GetCodec()); +void FlutterIntegrationCoreApi::EchoNullableInt( + const int64_t* an_int_arg, std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableInt", + &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - an_int_arg ? EncodableValue(*an_int_arg) : EncodableValue(), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const int64_t return_value_value = encodable_return_value.IsNull() ? 0 : encodable_return_value.LongValue(); - const auto* return_value = encodable_return_value.IsNull() ? nullptr : &return_value_value; - on_success(return_value); + an_int_arg ? EncodableValue(*an_int_arg) : EncodableValue(), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const int64_t return_value_value = + encodable_return_value.IsNull() + ? 0 + : encodable_return_value.LongValue(); + const auto* return_value = + encodable_return_value.IsNull() ? nullptr : &return_value_value; + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::EchoNullableDouble(const double* a_double_arg, std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble", &GetCodec()); +void FlutterIntegrationCoreApi::EchoNullableDouble( + const double* a_double_arg, std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableDouble", + &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - a_double_arg ? EncodableValue(*a_double_arg) : EncodableValue(), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto* return_value = std::get_if(&encodable_return_value); - on_success(return_value); + a_double_arg ? EncodableValue(*a_double_arg) : EncodableValue(), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto* return_value = std::get_if(&encodable_return_value); + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::EchoNullableString(const std::string* a_string_arg, std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString", &GetCodec()); +void FlutterIntegrationCoreApi::EchoNullableString( + const std::string* a_string_arg, + std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableString", + &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - a_string_arg ? EncodableValue(*a_string_arg) : EncodableValue(), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto* return_value = std::get_if(&encodable_return_value); - on_success(return_value); + a_string_arg ? EncodableValue(*a_string_arg) : EncodableValue(), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto* return_value = + std::get_if(&encodable_return_value); + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::EchoNullableUint8List(const std::vector* a_list_arg, std::function*)>&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List", &GetCodec()); +void FlutterIntegrationCoreApi::EchoNullableUint8List( + const std::vector* a_list_arg, + std::function*)>&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableUint8List", + &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - a_list_arg ? EncodableValue(*a_list_arg) : EncodableValue(), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto* return_value = std::get_if>(&encodable_return_value); - on_success(return_value); + a_list_arg ? EncodableValue(*a_list_arg) : EncodableValue(), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto* return_value = + std::get_if>(&encodable_return_value); + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::EchoNullableList(const EncodableList* a_list_arg, std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList", &GetCodec()); +void FlutterIntegrationCoreApi::EchoNullableList( + const EncodableList* a_list_arg, + std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableList", + &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - a_list_arg ? EncodableValue(*a_list_arg) : EncodableValue(), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto* return_value = std::get_if(&encodable_return_value); - on_success(return_value); + a_list_arg ? EncodableValue(*a_list_arg) : EncodableValue(), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto* return_value = + std::get_if(&encodable_return_value); + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::EchoNullableMap(const EncodableMap* a_map_arg, std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap", &GetCodec()); +void FlutterIntegrationCoreApi::EchoNullableMap( + const EncodableMap* a_map_arg, + std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoNullableMap", + &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - a_map_arg ? EncodableValue(*a_map_arg) : EncodableValue(), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto* return_value = std::get_if(&encodable_return_value); - on_success(return_value); + a_map_arg ? EncodableValue(*a_map_arg) : EncodableValue(), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto* return_value = + std::get_if(&encodable_return_value); + on_success(return_value); + }); } -void FlutterIntegrationCoreApi::NoopAsync(std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.noopAsync", &GetCodec()); +void FlutterIntegrationCoreApi::NoopAsync( + std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.noopAsync", &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - on_success(); - }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { on_success(); }); } -void FlutterIntegrationCoreApi::EchoAsyncString(const std::string& a_string_arg, std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString", &GetCodec()); +void FlutterIntegrationCoreApi::EchoAsyncString( + const std::string& a_string_arg, + std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, + "dev.flutter.pigeon.FlutterIntegrationCoreApi.echoAsyncString", + &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - EncodableValue(a_string_arg), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = std::get(encodable_return_value); - on_success(return_value); + EncodableValue(a_string_arg), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = + std::get(encodable_return_value); + on_success(return_value); + }); } /// The codec used by HostTrivialApi. const flutter::StandardMessageCodec& HostTrivialApi::GetCodec() { - return flutter::StandardMessageCodec::GetInstance(&flutter::StandardCodecSerializer::GetInstance()); -} - -// Sets up an instance of `HostTrivialApi` to handle messages through the `binary_messenger`. -void HostTrivialApi::SetUp(flutter::BinaryMessenger* binary_messenger, HostTrivialApi* api) { - { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostTrivialApi.noop", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - std::optional output = api->Noop(); - if (output.has_value()) { - reply(WrapError(output.value())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue()); - reply(EncodableValue(std::move(wrapped))); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + return flutter::StandardMessageCodec::GetInstance( + &flutter::StandardCodecSerializer::GetInstance()); +} + +// Sets up an instance of `HostTrivialApi` to handle messages through the +// `binary_messenger`. +void HostTrivialApi::SetUp(flutter::BinaryMessenger* binary_messenger, + HostTrivialApi* api) { + { + auto channel = std::make_unique>( + binary_messenger, "dev.flutter.pigeon.HostTrivialApi.noop", + &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + std::optional output = api->Noop(); + if (output.has_value()) { + reply(WrapError(output.value())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue()); + reply(EncodableValue(std::move(wrapped))); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } @@ -2623,74 +3606,82 @@ void HostTrivialApi::SetUp(flutter::BinaryMessenger* binary_messenger, HostTrivi } EncodableValue HostTrivialApi::WrapError(std::string_view error_message) { - return EncodableValue(EncodableList{ - EncodableValue(std::string(error_message)), - EncodableValue("Error"), - EncodableValue() - }); + return EncodableValue( + EncodableList{EncodableValue(std::string(error_message)), + EncodableValue("Error"), EncodableValue()}); } EncodableValue HostTrivialApi::WrapError(const FlutterError& error) { - return EncodableValue(EncodableList{ - EncodableValue(error.code()), - EncodableValue(error.message()), - error.details() - }); + return EncodableValue(EncodableList{EncodableValue(error.code()), + EncodableValue(error.message()), + error.details()}); } /// The codec used by HostSmallApi. const flutter::StandardMessageCodec& HostSmallApi::GetCodec() { - return flutter::StandardMessageCodec::GetInstance(&flutter::StandardCodecSerializer::GetInstance()); -} - -// Sets up an instance of `HostSmallApi` to handle messages through the `binary_messenger`. -void HostSmallApi::SetUp(flutter::BinaryMessenger* binary_messenger, HostSmallApi* api) { - { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostSmallApi.echo", &GetCodec()); - if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - const auto& args = std::get(message); - const auto& encodable_a_string_arg = args.at(0); - if (encodable_a_string_arg.IsNull()) { - reply(WrapError("a_string_arg unexpectedly null.")); - return; - } - const auto& a_string_arg = std::get(encodable_a_string_arg); - api->Echo(a_string_arg, [reply](ErrorOr&& output) { - if (output.has_error()) { - reply(WrapError(output.error())); - return; - } - EncodableList wrapped; - wrapped.push_back(EncodableValue(std::move(output).TakeValue())); - reply(EncodableValue(std::move(wrapped))); - }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); + return flutter::StandardMessageCodec::GetInstance( + &flutter::StandardCodecSerializer::GetInstance()); +} + +// Sets up an instance of `HostSmallApi` to handle messages through the +// `binary_messenger`. +void HostSmallApi::SetUp(flutter::BinaryMessenger* binary_messenger, + HostSmallApi* api) { + { + auto channel = std::make_unique>( + binary_messenger, "dev.flutter.pigeon.HostSmallApi.echo", &GetCodec()); + if (api != nullptr) { + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_a_string_arg = args.at(0); + if (encodable_a_string_arg.IsNull()) { + reply(WrapError("a_string_arg unexpectedly null.")); + return; + } + const auto& a_string_arg = + std::get(encodable_a_string_arg); + api->Echo(a_string_arg, [reply](ErrorOr&& output) { + if (output.has_error()) { + reply(WrapError(output.error())); + return; + } + EncodableList wrapped; + wrapped.push_back( + EncodableValue(std::move(output).TakeValue())); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); + } + }); } else { channel->SetMessageHandler(nullptr); } } { - auto channel = std::make_unique>(binary_messenger, "dev.flutter.pigeon.HostSmallApi.voidVoid", &GetCodec()); + auto channel = std::make_unique>( + binary_messenger, "dev.flutter.pigeon.HostSmallApi.voidVoid", + &GetCodec()); if (api != nullptr) { - channel->SetMessageHandler([api](const EncodableValue& message, const flutter::MessageReply& reply) { - try { - api->VoidVoid([reply](std::optional&& output) { - if (output.has_value()) { - reply(WrapError(output.value())); - return; + channel->SetMessageHandler( + [api](const EncodableValue& message, + const flutter::MessageReply& reply) { + try { + api->VoidVoid([reply](std::optional&& output) { + if (output.has_value()) { + reply(WrapError(output.value())); + return; + } + EncodableList wrapped; + wrapped.push_back(EncodableValue()); + reply(EncodableValue(std::move(wrapped))); + }); + } catch (const std::exception& exception) { + reply(WrapError(exception.what())); } - EncodableList wrapped; - wrapped.push_back(EncodableValue()); - reply(EncodableValue(std::move(wrapped))); }); - } catch (const std::exception& exception) { - reply(WrapError(exception.what())); - } - }); } else { channel->SetMessageHandler(nullptr); } @@ -2698,61 +3689,75 @@ void HostSmallApi::SetUp(flutter::BinaryMessenger* binary_messenger, HostSmallAp } EncodableValue HostSmallApi::WrapError(std::string_view error_message) { - return EncodableValue(EncodableList{ - EncodableValue(std::string(error_message)), - EncodableValue("Error"), - EncodableValue() - }); + return EncodableValue( + EncodableList{EncodableValue(std::string(error_message)), + EncodableValue("Error"), EncodableValue()}); } EncodableValue HostSmallApi::WrapError(const FlutterError& error) { - return EncodableValue(EncodableList{ - EncodableValue(error.code()), - EncodableValue(error.message()), - error.details() - }); + return EncodableValue(EncodableList{EncodableValue(error.code()), + EncodableValue(error.message()), + error.details()}); } - FlutterSmallApiCodecSerializer::FlutterSmallApiCodecSerializer() {} -EncodableValue FlutterSmallApiCodecSerializer::ReadValueOfType(uint8_t type, flutter::ByteStreamReader* stream) const { +EncodableValue FlutterSmallApiCodecSerializer::ReadValueOfType( + uint8_t type, flutter::ByteStreamReader* stream) const { switch (type) { case 128: - return CustomEncodableValue(TestMessage::FromEncodableList(std::get(ReadValue(stream)))); + return CustomEncodableValue(TestMessage::FromEncodableList( + std::get(ReadValue(stream)))); default: return flutter::StandardCodecSerializer::ReadValueOfType(type, stream); } } -void FlutterSmallApiCodecSerializer::WriteValue(const EncodableValue& value, flutter::ByteStreamWriter* stream) const { - if (const CustomEncodableValue* custom_value = std::get_if(&value)) { +void FlutterSmallApiCodecSerializer::WriteValue( + const EncodableValue& value, flutter::ByteStreamWriter* stream) const { + if (const CustomEncodableValue* custom_value = + std::get_if(&value)) { if (custom_value->type() == typeid(TestMessage)) { stream->WriteByte(128); - WriteValue(EncodableValue(std::any_cast(*custom_value).ToEncodableList()), stream); + WriteValue( + EncodableValue( + std::any_cast(*custom_value).ToEncodableList()), + stream); return; } } flutter::StandardCodecSerializer::WriteValue(value, stream); } -// Generated class from Pigeon that represents Flutter messages that can be called from C++. +// Generated class from Pigeon that represents Flutter messages that can be +// called from C++. FlutterSmallApi::FlutterSmallApi(flutter::BinaryMessenger* binary_messenger) { this->binary_messenger_ = binary_messenger; } const flutter::StandardMessageCodec& FlutterSmallApi::GetCodec() { - return flutter::StandardMessageCodec::GetInstance(&FlutterSmallApiCodecSerializer::GetInstance()); + return flutter::StandardMessageCodec::GetInstance( + &FlutterSmallApiCodecSerializer::GetInstance()); } -void FlutterSmallApi::EchoWrappedList(const TestMessage& msg_arg, std::function&& on_success, std::function&& on_error) { - auto channel = std::make_unique>(binary_messenger_, "dev.flutter.pigeon.FlutterSmallApi.echoWrappedList", &GetCodec()); +void FlutterSmallApi::EchoWrappedList( + const TestMessage& msg_arg, + std::function&& on_success, + std::function&& on_error) { + auto channel = std::make_unique>( + binary_messenger_, "dev.flutter.pigeon.FlutterSmallApi.echoWrappedList", + &GetCodec()); EncodableValue encoded_api_arguments = EncodableValue(EncodableList{ - CustomEncodableValue(msg_arg), - }); - channel->Send(encoded_api_arguments, [on_success = std::move(on_success), on_error = std::move(on_error)](const uint8_t* reply, size_t reply_size) { - std::unique_ptr response = GetCodec().DecodeMessage(reply, reply_size); - const auto& encodable_return_value = *response; - const auto& return_value = std::any_cast(std::get(encodable_return_value)); - on_success(return_value); + CustomEncodableValue(msg_arg), }); + channel->Send( + encoded_api_arguments, + [on_success = std::move(on_success), on_error = std::move(on_error)]( + const uint8_t* reply, size_t reply_size) { + std::unique_ptr response = + GetCodec().DecodeMessage(reply, reply_size); + const auto& encodable_return_value = *response; + const auto& return_value = std::any_cast( + std::get(encodable_return_value)); + on_success(return_value); + }); } } // namespace core_tests_pigeontest diff --git a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h index a8d0669e3fce..bc72a8ae3ce8 100644 --- a/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h +++ b/packages/pigeon/platform_tests/test_plugin/windows/pigeon/core_tests.gen.h @@ -1,7 +1,7 @@ // Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// +// // Autogenerated from Pigeon (v9.1.4), do not edit directly. // See also: https://pub.dev/packages/pigeon @@ -24,12 +24,12 @@ class CoreTestsTest; class FlutterError { public: - explicit FlutterError(const std::string& code) - : code_(code) {} + explicit FlutterError(const std::string& code) : code_(code) {} explicit FlutterError(const std::string& code, const std::string& message) - : code_(code), message_(message) {} - explicit FlutterError(const std::string& code, const std::string& message, const flutter::EncodableValue& details) - : code_(code), message_(message), details_(details) {} + : code_(code), message_(message) {} + explicit FlutterError(const std::string& code, const std::string& message, + const flutter::EncodableValue& details) + : code_(code), message_(message), details_(details) {} const std::string& code() const { return code_; } const std::string& message() const { return message_; } @@ -41,7 +41,8 @@ class FlutterError { flutter::EncodableValue details_; }; -template class ErrorOr { +template +class ErrorOr { public: ErrorOr(const T& rhs) : v_(rhs) {} ErrorOr(const T&& rhs) : v_(std::move(rhs)) {} @@ -64,30 +65,20 @@ template class ErrorOr { std::variant v_; }; - -enum class AnEnum { - one = 0, - two = 1, - three = 2 -}; +enum class AnEnum { one = 0, two = 1, three = 2 }; // Generated class from Pigeon that represents data sent in messages. class AllTypes { public: // Constructs an object setting all fields. - explicit AllTypes( - bool a_bool, - int64_t an_int, - int64_t an_int64, - double a_double, - const std::vector& a_byte_array, - const std::vector& a4_byte_array, - const std::vector& a8_byte_array, - const std::vector& a_float_array, - const flutter::EncodableList& a_list, - const flutter::EncodableMap& a_map, - const AnEnum& an_enum, - const std::string& a_string); + explicit AllTypes(bool a_bool, int64_t an_int, int64_t an_int64, + double a_double, const std::vector& a_byte_array, + const std::vector& a4_byte_array, + const std::vector& a8_byte_array, + const std::vector& a_float_array, + const flutter::EncodableList& a_list, + const flutter::EncodableMap& a_map, const AnEnum& an_enum, + const std::string& a_string); bool a_bool() const; void set_a_bool(bool value_arg); @@ -125,7 +116,6 @@ class AllTypes { const std::string& a_string() const; void set_a_string(std::string_view value_arg); - private: static AllTypes FromEncodableList(const flutter::EncodableList& list); flutter::EncodableList ToEncodableList() const; @@ -152,10 +142,8 @@ class AllTypes { flutter::EncodableMap a_map_; AnEnum an_enum_; std::string a_string_; - }; - // Generated class from Pigeon that represents data sent in messages. class AllNullableTypes { public: @@ -164,21 +152,18 @@ class AllNullableTypes { // Constructs an object setting all fields. explicit AllNullableTypes( - const bool* a_nullable_bool, - const int64_t* a_nullable_int, - const int64_t* a_nullable_int64, - const double* a_nullable_double, - const std::vector* a_nullable_byte_array, - const std::vector* a_nullable4_byte_array, - const std::vector* a_nullable8_byte_array, - const std::vector* a_nullable_float_array, - const flutter::EncodableList* a_nullable_list, - const flutter::EncodableMap* a_nullable_map, - const flutter::EncodableList* nullable_nested_list, - const flutter::EncodableMap* nullable_map_with_annotations, - const flutter::EncodableMap* nullable_map_with_object, - const AnEnum* a_nullable_enum, - const std::string* a_nullable_string); + const bool* a_nullable_bool, const int64_t* a_nullable_int, + const int64_t* a_nullable_int64, const double* a_nullable_double, + const std::vector* a_nullable_byte_array, + const std::vector* a_nullable4_byte_array, + const std::vector* a_nullable8_byte_array, + const std::vector* a_nullable_float_array, + const flutter::EncodableList* a_nullable_list, + const flutter::EncodableMap* a_nullable_map, + const flutter::EncodableList* nullable_nested_list, + const flutter::EncodableMap* nullable_map_with_annotations, + const flutter::EncodableMap* nullable_map_with_object, + const AnEnum* a_nullable_enum, const std::string* a_nullable_string); const bool* a_nullable_bool() const; void set_a_nullable_bool(const bool* value_arg); @@ -225,8 +210,10 @@ class AllNullableTypes { void set_nullable_nested_list(const flutter::EncodableList& value_arg); const flutter::EncodableMap* nullable_map_with_annotations() const; - void set_nullable_map_with_annotations(const flutter::EncodableMap* value_arg); - void set_nullable_map_with_annotations(const flutter::EncodableMap& value_arg); + void set_nullable_map_with_annotations( + const flutter::EncodableMap* value_arg); + void set_nullable_map_with_annotations( + const flutter::EncodableMap& value_arg); const flutter::EncodableMap* nullable_map_with_object() const; void set_nullable_map_with_object(const flutter::EncodableMap* value_arg); @@ -240,7 +227,6 @@ class AllNullableTypes { void set_a_nullable_string(const std::string_view* value_arg); void set_a_nullable_string(std::string_view value_arg); - private: static AllNullableTypes FromEncodableList(const flutter::EncodableList& list); flutter::EncodableList ToEncodableList() const; @@ -271,23 +257,20 @@ class AllNullableTypes { std::optional nullable_map_with_object_; std::optional a_nullable_enum_; std::optional a_nullable_string_; - }; - // Generated class from Pigeon that represents data sent in messages. class AllNullableTypesWrapper { public: // Constructs an object setting all fields. - explicit AllNullableTypesWrapper( - const AllNullableTypes& values); + explicit AllNullableTypesWrapper(const AllNullableTypes& values); const AllNullableTypes& values() const; void set_values(const AllNullableTypes& value_arg); - private: - static AllNullableTypesWrapper FromEncodableList(const flutter::EncodableList& list); + static AllNullableTypesWrapper FromEncodableList( + const flutter::EncodableList& list); flutter::EncodableList ToEncodableList() const; friend class HostIntegrationCoreApi; friend class HostIntegrationCoreApiCodecSerializer; @@ -301,10 +284,8 @@ class AllNullableTypesWrapper { friend class FlutterSmallApiCodecSerializer; friend class CoreTestsTest; AllNullableTypes values_; - }; - // A data class containing a List, used in unit tests. // // Generated class from Pigeon that represents data sent in messages. @@ -314,14 +295,12 @@ class TestMessage { TestMessage(); // Constructs an object setting all fields. - explicit TestMessage( - const flutter::EncodableList* test_list); + explicit TestMessage(const flutter::EncodableList* test_list); const flutter::EncodableList* test_list() const; void set_test_list(const flutter::EncodableList* value_arg); void set_test_list(const flutter::EncodableList& value_arg); - private: static TestMessage FromEncodableList(const flutter::EncodableList& list); flutter::EncodableList ToEncodableList() const; @@ -337,12 +316,11 @@ class TestMessage { friend class FlutterSmallApiCodecSerializer; friend class CoreTestsTest; std::optional test_list_; - }; -class HostIntegrationCoreApiCodecSerializer : public flutter::StandardCodecSerializer { +class HostIntegrationCoreApiCodecSerializer + : public flutter::StandardCodecSerializer { public: - inline static HostIntegrationCoreApiCodecSerializer& GetInstance() { static HostIntegrationCoreApiCodecSerializer sInstance; return sInstance; @@ -351,17 +329,19 @@ class HostIntegrationCoreApiCodecSerializer : public flutter::StandardCodecSeria HostIntegrationCoreApiCodecSerializer(); public: - void WriteValue(const flutter::EncodableValue& value, flutter::ByteStreamWriter* stream) const override; + void WriteValue(const flutter::EncodableValue& value, + flutter::ByteStreamWriter* stream) const override; protected: - flutter::EncodableValue ReadValueOfType(uint8_t type, flutter::ByteStreamReader* stream) const override; - + flutter::EncodableValue ReadValueOfType( + uint8_t type, flutter::ByteStreamReader* stream) const override; }; // The core interface that each host language plugin must implement in // platform_test integration tests. // -// Generated interface from Pigeon that represents a handler of messages from Flutter. +// Generated interface from Pigeon that represents a handler of messages from +// Flutter. class HostIntegrationCoreApi { public: HostIntegrationCoreApi(const HostIntegrationCoreApi&) = delete; @@ -377,7 +357,8 @@ class HostIntegrationCoreApi { // Returns an error from a void function, to test error handling. virtual std::optional ThrowErrorFromVoid() = 0; // Returns a Flutter error, to test error handling. - virtual ErrorOr> ThrowFlutterError() = 0; + virtual ErrorOr> + ThrowFlutterError() = 0; // Returns passed in int. virtual ErrorOr EchoInt(int64_t an_int) = 0; // Returns passed in double. @@ -387,118 +368,223 @@ class HostIntegrationCoreApi { // Returns the passed in string. virtual ErrorOr EchoString(const std::string& a_string) = 0; // Returns the passed in Uint8List. - virtual ErrorOr> EchoUint8List(const std::vector& a_uint8_list) = 0; + virtual ErrorOr> EchoUint8List( + const std::vector& a_uint8_list) = 0; // Returns the passed in generic Object. - virtual ErrorOr EchoObject(const flutter::EncodableValue& an_object) = 0; + virtual ErrorOr EchoObject( + const flutter::EncodableValue& an_object) = 0; // Returns the passed list, to test serialization and deserialization. - virtual ErrorOr EchoList(const flutter::EncodableList& a_list) = 0; + virtual ErrorOr EchoList( + const flutter::EncodableList& a_list) = 0; // Returns the passed map, to test serialization and deserialization. - virtual ErrorOr EchoMap(const flutter::EncodableMap& a_map) = 0; + virtual ErrorOr EchoMap( + const flutter::EncodableMap& a_map) = 0; // Returns the passed object, to test serialization and deserialization. - virtual ErrorOr> EchoAllNullableTypes(const AllNullableTypes* everything) = 0; + virtual ErrorOr> EchoAllNullableTypes( + const AllNullableTypes* everything) = 0; // Returns the inner `aString` value from the wrapped object, to test // sending of nested objects. - virtual ErrorOr> ExtractNestedNullableString(const AllNullableTypesWrapper& wrapper) = 0; + virtual ErrorOr> ExtractNestedNullableString( + const AllNullableTypesWrapper& wrapper) = 0; // Returns the inner `aString` value from the wrapped object, to test // sending of nested objects. - virtual ErrorOr CreateNestedNullableString(const std::string* nullable_string) = 0; + virtual ErrorOr CreateNestedNullableString( + const std::string* nullable_string) = 0; // Returns passed in arguments of multiple types. - virtual ErrorOr SendMultipleNullableTypes(const bool* a_nullable_bool, const int64_t* a_nullable_int, const std::string* a_nullable_string) = 0; + virtual ErrorOr SendMultipleNullableTypes( + const bool* a_nullable_bool, const int64_t* a_nullable_int, + const std::string* a_nullable_string) = 0; // Returns passed in int. - virtual ErrorOr> EchoNullableInt(const int64_t* a_nullable_int) = 0; + virtual ErrorOr> EchoNullableInt( + const int64_t* a_nullable_int) = 0; // Returns passed in double. - virtual ErrorOr> EchoNullableDouble(const double* a_nullable_double) = 0; + virtual ErrorOr> EchoNullableDouble( + const double* a_nullable_double) = 0; // Returns the passed in boolean. - virtual ErrorOr> EchoNullableBool(const bool* a_nullable_bool) = 0; + virtual ErrorOr> EchoNullableBool( + const bool* a_nullable_bool) = 0; // Returns the passed in string. - virtual ErrorOr> EchoNullableString(const std::string* a_nullable_string) = 0; + virtual ErrorOr> EchoNullableString( + const std::string* a_nullable_string) = 0; // Returns the passed in Uint8List. - virtual ErrorOr>> EchoNullableUint8List(const std::vector* a_nullable_uint8_list) = 0; + virtual ErrorOr>> EchoNullableUint8List( + const std::vector* a_nullable_uint8_list) = 0; // Returns the passed in generic Object. - virtual ErrorOr> EchoNullableObject(const flutter::EncodableValue* a_nullable_object) = 0; + virtual ErrorOr> EchoNullableObject( + const flutter::EncodableValue* a_nullable_object) = 0; // Returns the passed list, to test serialization and deserialization. - virtual ErrorOr> EchoNullableList(const flutter::EncodableList* a_nullable_list) = 0; + virtual ErrorOr> EchoNullableList( + const flutter::EncodableList* a_nullable_list) = 0; // Returns the passed map, to test serialization and deserialization. - virtual ErrorOr> EchoNullableMap(const flutter::EncodableMap* a_nullable_map) = 0; + virtual ErrorOr> EchoNullableMap( + const flutter::EncodableMap* a_nullable_map) = 0; // A no-op function taking no arguments and returning no value, to sanity // test basic asynchronous calling. - virtual void NoopAsync(std::function reply)> result) = 0; + virtual void NoopAsync( + std::function reply)> result) = 0; // Returns passed in int asynchronously. - virtual void EchoAsyncInt(int64_t an_int, std::function reply)> result) = 0; + virtual void EchoAsyncInt( + int64_t an_int, std::function reply)> result) = 0; // Returns passed in double asynchronously. - virtual void EchoAsyncDouble(double a_double, std::function reply)> result) = 0; + virtual void EchoAsyncDouble( + double a_double, std::function reply)> result) = 0; // Returns the passed in boolean asynchronously. - virtual void EchoAsyncBool(bool a_bool, std::function reply)> result) = 0; + virtual void EchoAsyncBool( + bool a_bool, std::function reply)> result) = 0; // Returns the passed string asynchronously. - virtual void EchoAsyncString(const std::string& a_string, std::function reply)> result) = 0; + virtual void EchoAsyncString( + const std::string& a_string, + std::function reply)> result) = 0; // Returns the passed in Uint8List asynchronously. - virtual void EchoAsyncUint8List(const std::vector& a_uint8_list, std::function> reply)> result) = 0; + virtual void EchoAsyncUint8List( + const std::vector& a_uint8_list, + std::function> reply)> result) = 0; // Returns the passed in generic Object asynchronously. - virtual void EchoAsyncObject(const flutter::EncodableValue& an_object, std::function reply)> result) = 0; - // Returns the passed list, to test serialization and deserialization asynchronously. - virtual void EchoAsyncList(const flutter::EncodableList& a_list, std::function reply)> result) = 0; - // Returns the passed map, to test serialization and deserialization asynchronously. - virtual void EchoAsyncMap(const flutter::EncodableMap& a_map, std::function reply)> result) = 0; + virtual void EchoAsyncObject( + const flutter::EncodableValue& an_object, + std::function reply)> result) = 0; + // Returns the passed list, to test serialization and deserialization + // asynchronously. + virtual void EchoAsyncList( + const flutter::EncodableList& a_list, + std::function reply)> result) = 0; + // Returns the passed map, to test serialization and deserialization + // asynchronously. + virtual void EchoAsyncMap( + const flutter::EncodableMap& a_map, + std::function reply)> result) = 0; // Responds with an error from an async function returning a value. - virtual void ThrowAsyncError(std::function> reply)> result) = 0; + virtual void ThrowAsyncError( + std::function> reply)> + result) = 0; // Responds with an error from an async void function. - virtual void ThrowAsyncErrorFromVoid(std::function reply)> result) = 0; + virtual void ThrowAsyncErrorFromVoid( + std::function reply)> result) = 0; // Responds with a Flutter error from an async function returning a value. - virtual void ThrowAsyncFlutterError(std::function> reply)> result) = 0; + virtual void ThrowAsyncFlutterError( + std::function> reply)> + result) = 0; // Returns the passed object, to test async serialization and deserialization. - virtual void EchoAsyncAllTypes(const AllTypes& everything, std::function reply)> result) = 0; + virtual void EchoAsyncAllTypes( + const AllTypes& everything, + std::function reply)> result) = 0; // Returns the passed object, to test serialization and deserialization. - virtual void EchoAsyncNullableAllNullableTypes(const AllNullableTypes* everything, std::function> reply)> result) = 0; + virtual void EchoAsyncNullableAllNullableTypes( + const AllNullableTypes* everything, + std::function> reply)> + result) = 0; // Returns passed in int asynchronously. - virtual void EchoAsyncNullableInt(const int64_t* an_int, std::function> reply)> result) = 0; + virtual void EchoAsyncNullableInt( + const int64_t* an_int, + std::function> reply)> result) = 0; // Returns passed in double asynchronously. - virtual void EchoAsyncNullableDouble(const double* a_double, std::function> reply)> result) = 0; + virtual void EchoAsyncNullableDouble( + const double* a_double, + std::function> reply)> result) = 0; // Returns the passed in boolean asynchronously. - virtual void EchoAsyncNullableBool(const bool* a_bool, std::function> reply)> result) = 0; + virtual void EchoAsyncNullableBool( + const bool* a_bool, + std::function> reply)> result) = 0; // Returns the passed string asynchronously. - virtual void EchoAsyncNullableString(const std::string* a_string, std::function> reply)> result) = 0; + virtual void EchoAsyncNullableString( + const std::string* a_string, + std::function> reply)> + result) = 0; // Returns the passed in Uint8List asynchronously. - virtual void EchoAsyncNullableUint8List(const std::vector* a_uint8_list, std::function>> reply)> result) = 0; + virtual void EchoAsyncNullableUint8List( + const std::vector* a_uint8_list, + std::function>> reply)> + result) = 0; // Returns the passed in generic Object asynchronously. - virtual void EchoAsyncNullableObject(const flutter::EncodableValue* an_object, std::function> reply)> result) = 0; - // Returns the passed list, to test serialization and deserialization asynchronously. - virtual void EchoAsyncNullableList(const flutter::EncodableList* a_list, std::function> reply)> result) = 0; - // Returns the passed map, to test serialization and deserialization asynchronously. - virtual void EchoAsyncNullableMap(const flutter::EncodableMap* a_map, std::function> reply)> result) = 0; - virtual void CallFlutterNoop(std::function reply)> result) = 0; - virtual void CallFlutterThrowError(std::function> reply)> result) = 0; - virtual void CallFlutterThrowErrorFromVoid(std::function reply)> result) = 0; - virtual void CallFlutterEchoAllTypes(const AllTypes& everything, std::function reply)> result) = 0; - virtual void CallFlutterSendMultipleNullableTypes(const bool* a_nullable_bool, const int64_t* a_nullable_int, const std::string* a_nullable_string, std::function reply)> result) = 0; - virtual void CallFlutterEchoBool(bool a_bool, std::function reply)> result) = 0; - virtual void CallFlutterEchoInt(int64_t an_int, std::function reply)> result) = 0; - virtual void CallFlutterEchoDouble(double a_double, std::function reply)> result) = 0; - virtual void CallFlutterEchoString(const std::string& a_string, std::function reply)> result) = 0; - virtual void CallFlutterEchoUint8List(const std::vector& a_list, std::function> reply)> result) = 0; - virtual void CallFlutterEchoList(const flutter::EncodableList& a_list, std::function reply)> result) = 0; - virtual void CallFlutterEchoMap(const flutter::EncodableMap& a_map, std::function reply)> result) = 0; - virtual void CallFlutterEchoNullableBool(const bool* a_bool, std::function> reply)> result) = 0; - virtual void CallFlutterEchoNullableInt(const int64_t* an_int, std::function> reply)> result) = 0; - virtual void CallFlutterEchoNullableDouble(const double* a_double, std::function> reply)> result) = 0; - virtual void CallFlutterEchoNullableString(const std::string* a_string, std::function> reply)> result) = 0; - virtual void CallFlutterEchoNullableUint8List(const std::vector* a_list, std::function>> reply)> result) = 0; - virtual void CallFlutterEchoNullableList(const flutter::EncodableList* a_list, std::function> reply)> result) = 0; - virtual void CallFlutterEchoNullableMap(const flutter::EncodableMap* a_map, std::function> reply)> result) = 0; + virtual void EchoAsyncNullableObject( + const flutter::EncodableValue* an_object, + std::function> reply)> + result) = 0; + // Returns the passed list, to test serialization and deserialization + // asynchronously. + virtual void EchoAsyncNullableList( + const flutter::EncodableList* a_list, + std::function> reply)> + result) = 0; + // Returns the passed map, to test serialization and deserialization + // asynchronously. + virtual void EchoAsyncNullableMap( + const flutter::EncodableMap* a_map, + std::function> reply)> + result) = 0; + virtual void CallFlutterNoop( + std::function reply)> result) = 0; + virtual void CallFlutterThrowError( + std::function> reply)> + result) = 0; + virtual void CallFlutterThrowErrorFromVoid( + std::function reply)> result) = 0; + virtual void CallFlutterEchoAllTypes( + const AllTypes& everything, + std::function reply)> result) = 0; + virtual void CallFlutterSendMultipleNullableTypes( + const bool* a_nullable_bool, const int64_t* a_nullable_int, + const std::string* a_nullable_string, + std::function reply)> result) = 0; + virtual void CallFlutterEchoBool( + bool a_bool, std::function reply)> result) = 0; + virtual void CallFlutterEchoInt( + int64_t an_int, std::function reply)> result) = 0; + virtual void CallFlutterEchoDouble( + double a_double, std::function reply)> result) = 0; + virtual void CallFlutterEchoString( + const std::string& a_string, + std::function reply)> result) = 0; + virtual void CallFlutterEchoUint8List( + const std::vector& a_list, + std::function> reply)> result) = 0; + virtual void CallFlutterEchoList( + const flutter::EncodableList& a_list, + std::function reply)> result) = 0; + virtual void CallFlutterEchoMap( + const flutter::EncodableMap& a_map, + std::function reply)> result) = 0; + virtual void CallFlutterEchoNullableBool( + const bool* a_bool, + std::function> reply)> result) = 0; + virtual void CallFlutterEchoNullableInt( + const int64_t* an_int, + std::function> reply)> result) = 0; + virtual void CallFlutterEchoNullableDouble( + const double* a_double, + std::function> reply)> result) = 0; + virtual void CallFlutterEchoNullableString( + const std::string* a_string, + std::function> reply)> + result) = 0; + virtual void CallFlutterEchoNullableUint8List( + const std::vector* a_list, + std::function>> reply)> + result) = 0; + virtual void CallFlutterEchoNullableList( + const flutter::EncodableList* a_list, + std::function> reply)> + result) = 0; + virtual void CallFlutterEchoNullableMap( + const flutter::EncodableMap* a_map, + std::function> reply)> + result) = 0; // The codec used by HostIntegrationCoreApi. static const flutter::StandardMessageCodec& GetCodec(); - // Sets up an instance of `HostIntegrationCoreApi` to handle messages through the `binary_messenger`. - static void SetUp(flutter::BinaryMessenger* binary_messenger, HostIntegrationCoreApi* api); + // Sets up an instance of `HostIntegrationCoreApi` to handle messages through + // the `binary_messenger`. + static void SetUp(flutter::BinaryMessenger* binary_messenger, + HostIntegrationCoreApi* api); static flutter::EncodableValue WrapError(std::string_view error_message); static flutter::EncodableValue WrapError(const FlutterError& error); protected: HostIntegrationCoreApi() = default; - }; -class FlutterIntegrationCoreApiCodecSerializer : public flutter::StandardCodecSerializer { +class FlutterIntegrationCoreApiCodecSerializer + : public flutter::StandardCodecSerializer { public: - inline static FlutterIntegrationCoreApiCodecSerializer& GetInstance() { static FlutterIntegrationCoreApiCodecSerializer sInstance; return sInstance; @@ -507,17 +593,19 @@ class FlutterIntegrationCoreApiCodecSerializer : public flutter::StandardCodecSe FlutterIntegrationCoreApiCodecSerializer(); public: - void WriteValue(const flutter::EncodableValue& value, flutter::ByteStreamWriter* stream) const override; + void WriteValue(const flutter::EncodableValue& value, + flutter::ByteStreamWriter* stream) const override; protected: - flutter::EncodableValue ReadValueOfType(uint8_t type, flutter::ByteStreamReader* stream) const override; - + flutter::EncodableValue ReadValueOfType( + uint8_t type, flutter::ByteStreamReader* stream) const override; }; // 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 C++. +// Generated class from Pigeon that represents Flutter messages that can be +// called from C++. class FlutterIntegrationCoreApi { private: flutter::BinaryMessenger* binary_messenger_; @@ -527,58 +615,103 @@ class FlutterIntegrationCoreApi { static const flutter::StandardMessageCodec& GetCodec(); // A no-op function taking no arguments and returning no value, to sanity // test basic calling. - void Noop(std::function&& on_success, std::function&& on_error); + void Noop(std::function&& on_success, + std::function&& on_error); // Responds with an error from an async function returning a value. - void ThrowError(std::function&& on_success, std::function&& on_error); + void ThrowError( + std::function&& on_success, + std::function&& on_error); // Responds with an error from an async void function. - void ThrowErrorFromVoid(std::function&& on_success, std::function&& on_error); + void ThrowErrorFromVoid(std::function&& on_success, + std::function&& on_error); // Returns the passed object, to test serialization and deserialization. - void EchoAllTypes(const AllTypes& everything, std::function&& on_success, std::function&& on_error); + void EchoAllTypes(const AllTypes& everything, + std::function&& on_success, + std::function&& on_error); // Returns the passed object, to test serialization and deserialization. - void EchoAllNullableTypes(const AllNullableTypes& everything, std::function&& on_success, std::function&& on_error); + void EchoAllNullableTypes( + const AllNullableTypes& everything, + std::function&& on_success, + std::function&& on_error); // Returns passed in arguments of multiple types. // // Tests multiple-arity FlutterApi handling. - void SendMultipleNullableTypes(const bool* a_nullable_bool, const int64_t* a_nullable_int, const std::string* a_nullable_string, std::function&& on_success, std::function&& on_error); + void SendMultipleNullableTypes( + const bool* a_nullable_bool, const int64_t* a_nullable_int, + const std::string* a_nullable_string, + std::function&& on_success, + std::function&& on_error); // Returns the passed boolean, to test serialization and deserialization. - void EchoBool(bool a_bool, std::function&& on_success, std::function&& on_error); + void EchoBool(bool a_bool, std::function&& on_success, + std::function&& on_error); // Returns the passed int, to test serialization and deserialization. - void EchoInt(int64_t an_int, std::function&& on_success, std::function&& on_error); + void EchoInt(int64_t an_int, std::function&& on_success, + std::function&& on_error); // Returns the passed double, to test serialization and deserialization. - void EchoDouble(double a_double, std::function&& on_success, std::function&& on_error); + void EchoDouble(double a_double, std::function&& on_success, + std::function&& on_error); // Returns the passed string, to test serialization and deserialization. - void EchoString(const std::string& a_string, std::function&& on_success, std::function&& on_error); + void EchoString(const std::string& a_string, + std::function&& on_success, + std::function&& on_error); // Returns the passed byte list, to test serialization and deserialization. - void EchoUint8List(const std::vector& a_list, std::function&)>&& on_success, std::function&& on_error); + void EchoUint8List( + const std::vector& a_list, + std::function&)>&& on_success, + std::function&& on_error); // Returns the passed list, to test serialization and deserialization. - void EchoList(const flutter::EncodableList& a_list, std::function&& on_success, std::function&& on_error); + void EchoList(const flutter::EncodableList& a_list, + std::function&& on_success, + std::function&& on_error); // Returns the passed map, to test serialization and deserialization. - void EchoMap(const flutter::EncodableMap& a_map, std::function&& on_success, std::function&& on_error); + void EchoMap(const flutter::EncodableMap& a_map, + std::function&& on_success, + std::function&& on_error); // Returns the passed boolean, to test serialization and deserialization. - void EchoNullableBool(const bool* a_bool, std::function&& on_success, std::function&& on_error); + void EchoNullableBool(const bool* a_bool, + std::function&& on_success, + std::function&& on_error); // Returns the passed int, to test serialization and deserialization. - void EchoNullableInt(const int64_t* an_int, std::function&& on_success, std::function&& on_error); + void EchoNullableInt(const int64_t* an_int, + std::function&& on_success, + std::function&& on_error); // Returns the passed double, to test serialization and deserialization. - void EchoNullableDouble(const double* a_double, std::function&& on_success, std::function&& on_error); + void EchoNullableDouble(const double* a_double, + std::function&& on_success, + std::function&& on_error); // Returns the passed string, to test serialization and deserialization. - void EchoNullableString(const std::string* a_string, std::function&& on_success, std::function&& on_error); + void EchoNullableString(const std::string* a_string, + std::function&& on_success, + std::function&& on_error); // Returns the passed byte list, to test serialization and deserialization. - void EchoNullableUint8List(const std::vector* a_list, std::function*)>&& on_success, std::function&& on_error); + void EchoNullableUint8List( + const std::vector* a_list, + std::function*)>&& on_success, + std::function&& on_error); // Returns the passed list, to test serialization and deserialization. - void EchoNullableList(const flutter::EncodableList* a_list, std::function&& on_success, std::function&& on_error); + void EchoNullableList( + const flutter::EncodableList* a_list, + std::function&& on_success, + std::function&& on_error); // Returns the passed map, to test serialization and deserialization. - void EchoNullableMap(const flutter::EncodableMap* a_map, std::function&& on_success, std::function&& on_error); + void EchoNullableMap( + const flutter::EncodableMap* a_map, + std::function&& on_success, + std::function&& on_error); // A no-op function taking no arguments and returning no value, to sanity // test basic asynchronous calling. - void NoopAsync(std::function&& on_success, std::function&& on_error); + void NoopAsync(std::function&& on_success, + std::function&& on_error); // Returns the passed in generic Object asynchronously. - void EchoAsyncString(const std::string& a_string, std::function&& on_success, std::function&& on_error); - + void EchoAsyncString(const std::string& a_string, + std::function&& on_success, + std::function&& on_error); }; // An API that can be implemented for minimal, compile-only tests. // -// Generated interface from Pigeon that represents a handler of messages from Flutter. +// Generated interface from Pigeon that represents a handler of messages from +// Flutter. class HostTrivialApi { public: HostTrivialApi(const HostTrivialApi&) = delete; @@ -588,40 +721,44 @@ class HostTrivialApi { // The codec used by HostTrivialApi. static const flutter::StandardMessageCodec& GetCodec(); - // Sets up an instance of `HostTrivialApi` to handle messages through the `binary_messenger`. - static void SetUp(flutter::BinaryMessenger* binary_messenger, HostTrivialApi* api); + // Sets up an instance of `HostTrivialApi` to handle messages through the + // `binary_messenger`. + static void SetUp(flutter::BinaryMessenger* binary_messenger, + HostTrivialApi* api); static flutter::EncodableValue WrapError(std::string_view error_message); static flutter::EncodableValue WrapError(const FlutterError& error); protected: HostTrivialApi() = default; - }; // A simple API implemented in some unit tests. // -// Generated interface from Pigeon that represents a handler of messages from Flutter. +// Generated interface from Pigeon that represents a handler of messages from +// Flutter. class HostSmallApi { public: HostSmallApi(const HostSmallApi&) = delete; HostSmallApi& operator=(const HostSmallApi&) = delete; virtual ~HostSmallApi() {} - virtual void Echo(const std::string& a_string, std::function reply)> result) = 0; - virtual void VoidVoid(std::function reply)> result) = 0; + virtual void Echo(const std::string& a_string, + std::function reply)> result) = 0; + virtual void VoidVoid( + std::function reply)> result) = 0; // The codec used by HostSmallApi. static const flutter::StandardMessageCodec& GetCodec(); - // Sets up an instance of `HostSmallApi` to handle messages through the `binary_messenger`. - static void SetUp(flutter::BinaryMessenger* binary_messenger, HostSmallApi* api); + // Sets up an instance of `HostSmallApi` to handle messages through the + // `binary_messenger`. + static void SetUp(flutter::BinaryMessenger* binary_messenger, + HostSmallApi* api); static flutter::EncodableValue WrapError(std::string_view error_message); static flutter::EncodableValue WrapError(const FlutterError& error); protected: HostSmallApi() = default; - }; class FlutterSmallApiCodecSerializer : public flutter::StandardCodecSerializer { public: - inline static FlutterSmallApiCodecSerializer& GetInstance() { static FlutterSmallApiCodecSerializer sInstance; return sInstance; @@ -630,16 +767,18 @@ class FlutterSmallApiCodecSerializer : public flutter::StandardCodecSerializer { FlutterSmallApiCodecSerializer(); public: - void WriteValue(const flutter::EncodableValue& value, flutter::ByteStreamWriter* stream) const override; + void WriteValue(const flutter::EncodableValue& value, + flutter::ByteStreamWriter* stream) const override; protected: - flutter::EncodableValue ReadValueOfType(uint8_t type, flutter::ByteStreamReader* stream) const override; - + flutter::EncodableValue ReadValueOfType( + uint8_t type, flutter::ByteStreamReader* stream) const override; }; // A simple API called in some unit tests. // -// Generated class from Pigeon that represents Flutter messages that can be called from C++. +// Generated class from Pigeon that represents Flutter messages that can be +// called from C++. class FlutterSmallApi { private: flutter::BinaryMessenger* binary_messenger_; @@ -647,8 +786,9 @@ class FlutterSmallApi { public: FlutterSmallApi(flutter::BinaryMessenger* binary_messenger); static const flutter::StandardMessageCodec& GetCodec(); - void EchoWrappedList(const TestMessage& msg, std::function&& on_success, std::function&& on_error); - + void EchoWrappedList(const TestMessage& msg, + std::function&& on_success, + std::function&& on_error); }; } // namespace core_tests_pigeontest From 46c672d53e1123f46f29dc0e3ead803b8afc5d26 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Thu, 30 Mar 2023 16:39:17 -0700 Subject: [PATCH 4/6] fix analyzer --- packages/pigeon/lib/dart_generator.dart | 6 +++++- .../pigeon/mock_handler_tester/test/test.dart | 16 ++++++++++------ .../test_plugin/example/android/build.gradle | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/packages/pigeon/lib/dart_generator.dart b/packages/pigeon/lib/dart_generator.dart index 8fbdfe8e942a..128f91aed8db 100644 --- a/packages/pigeon/lib/dart_generator.dart +++ b/packages/pigeon/lib/dart_generator.dart @@ -296,6 +296,10 @@ $resultAt != null indent.write('abstract class ${api.name} '); indent.addScoped('{', '}', () { + if (isMockHandler) { + indent.writeln( + 'static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => TestDefaultBinaryMessengerBinding.instance;'); + } indent .writeln('static const MessageCodec codec = $codecName();'); indent.newln(); @@ -333,7 +337,7 @@ $resultAt != null ); }); final String messageHandlerSetter = isMockHandler - ? 'TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, ' + ? '_testBinaryMessengerBinding!.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, ' : 'channel.setMessageHandler('; indent.write('if (api == null) '); indent.addScoped('{', '}', () { diff --git a/packages/pigeon/mock_handler_tester/test/test.dart b/packages/pigeon/mock_handler_tester/test/test.dart index b5cae089112d..64699622a2f5 100644 --- a/packages/pigeon/mock_handler_tester/test/test.dart +++ b/packages/pigeon/mock_handler_tester/test/test.dart @@ -46,6 +46,8 @@ class _TestHostApiCodec extends StandardMessageCodec { /// /// This comment also tests multiple line comments. abstract class TestHostApi { + static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => + TestDefaultBinaryMessengerBinding.instance; static const MessageCodec codec = _TestHostApiCodec(); /// This comment is to test documentation comments. @@ -62,10 +64,10 @@ abstract class TestHostApi { 'dev.flutter.pigeon.MessageApi.initialize', codec, binaryMessenger: binaryMessenger); if (api == null) { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + _testBinaryMessengerBinding!.defaultBinaryMessenger .setMockDecodedMessageHandler(channel, null); } else { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + _testBinaryMessengerBinding!.defaultBinaryMessenger .setMockDecodedMessageHandler(channel, (Object? message) async { // ignore message @@ -79,10 +81,10 @@ abstract class TestHostApi { 'dev.flutter.pigeon.MessageApi.search', codec, binaryMessenger: binaryMessenger); if (api == null) { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + _testBinaryMessengerBinding!.defaultBinaryMessenger .setMockDecodedMessageHandler(channel, null); } else { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + _testBinaryMessengerBinding!.defaultBinaryMessenger .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, @@ -135,6 +137,8 @@ class _TestNestedApiCodec extends StandardMessageCodec { /// This comment is to test api documentation comments. abstract class TestNestedApi { + static TestDefaultBinaryMessengerBinding? get _testBinaryMessengerBinding => + TestDefaultBinaryMessengerBinding.instance; static const MessageCodec codec = _TestNestedApiCodec(); /// This comment is to test method documentation comments. @@ -148,10 +152,10 @@ abstract class TestNestedApi { 'dev.flutter.pigeon.MessageNestedApi.search', codec, binaryMessenger: binaryMessenger); if (api == null) { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + _testBinaryMessengerBinding!.defaultBinaryMessenger .setMockDecodedMessageHandler(channel, null); } else { - TestDefaultBinaryMessengerBinding.instance.defaultBinaryMessenger + _testBinaryMessengerBinding!.defaultBinaryMessenger .setMockDecodedMessageHandler(channel, (Object? message) async { assert(message != null, diff --git a/packages/pigeon/platform_tests/test_plugin/example/android/build.gradle b/packages/pigeon/platform_tests/test_plugin/example/android/build.gradle index b68b7af5f8ed..9ed60439e9b8 100644 --- a/packages/pigeon/platform_tests/test_plugin/example/android/build.gradle +++ b/packages/pigeon/platform_tests/test_plugin/example/android/build.gradle @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } From 17d477cb00378081427021e6e319c6cc15ff1712 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Fri, 31 Mar 2023 15:52:17 -0700 Subject: [PATCH 5/6] review --- packages/pigeon/lib/dart_generator.dart | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/pigeon/lib/dart_generator.dart b/packages/pigeon/lib/dart_generator.dart index 128f91aed8db..855c329976a8 100644 --- a/packages/pigeon/lib/dart_generator.dart +++ b/packages/pigeon/lib/dart_generator.dart @@ -336,17 +336,18 @@ $resultAt != null 'binaryMessenger: binaryMessenger);', ); }); - final String messageHandlerSetter = isMockHandler + final String messageHandlerSetterWithOpeningParentheses = isMockHandler ? '_testBinaryMessengerBinding!.defaultBinaryMessenger.setMockDecodedMessageHandler(channel, ' : 'channel.setMessageHandler('; indent.write('if (api == null) '); indent.addScoped('{', '}', () { - indent.writeln('${messageHandlerSetter}null);'); + indent.writeln( + '${messageHandlerSetterWithOpeningParentheses}null);'); }, addTrailingNewline: false); indent.add(' else '); indent.addScoped('{', '}', () { indent.write( - '$messageHandlerSetter(Object? message) async ', + '$messageHandlerSetterWithOpeningParentheses(Object? message) async ', ); indent.addScoped('{', '});', () { final String returnType = From 9d42503f16c87ea939e4acdaf710980ef51b3807 Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Fri, 31 Mar 2023 16:30:54 -0700 Subject: [PATCH 6/6] revert gradle --- .../alternate_language_test_plugin/example/android/build.gradle | 2 +- .../platform_tests/test_plugin/example/android/build.gradle | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/build.gradle b/packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/build.gradle index 9ed60439e9b8..b68b7af5f8ed 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/build.gradle +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/build.gradle @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -tasks.register("clean", Delete) { +task clean(type: Delete) { delete rootProject.buildDir } diff --git a/packages/pigeon/platform_tests/test_plugin/example/android/build.gradle b/packages/pigeon/platform_tests/test_plugin/example/android/build.gradle index 9ed60439e9b8..b68b7af5f8ed 100644 --- a/packages/pigeon/platform_tests/test_plugin/example/android/build.gradle +++ b/packages/pigeon/platform_tests/test_plugin/example/android/build.gradle @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -tasks.register("clean", Delete) { +task clean(type: Delete) { delete rootProject.buildDir }