diff --git a/packages/pigeon/CHANGELOG.md b/packages/pigeon/CHANGELOG.md index 368abc59a80f..93f0a562f713 100644 --- a/packages/pigeon/CHANGELOG.md +++ b/packages/pigeon/CHANGELOG.md @@ -1,3 +1,8 @@ +## 26.3.4 + +* [dart] Supports serializing Lists of Lists and Maps, and serializing Maps of + Lists and Maps. + ## 26.3.3 * Updates `analyzer` dependency to support versions 10 through 12. diff --git a/packages/pigeon/lib/src/dart/dart_generator.dart b/packages/pigeon/lib/src/dart/dart_generator.dart index 435df247c0c2..e1cbbb2e378a 100644 --- a/packages/pigeon/lib/src/dart/dart_generator.dart +++ b/packages/pigeon/lib/src/dart/dart_generator.dart @@ -1597,9 +1597,43 @@ String _castValue(String value, TypeDeclaration type) { } final nullAwareOperator = type.isNullable ? '?' : ''; - final castCall = - '$nullAwareOperator.cast<${_flattenTypeArguments(typeArguments)}>()'; - return '($valueWithTypeCast)$castCall'; + return '($valueWithTypeCast)$nullAwareOperator.${_castCall(type)}'; +} + +/// Returns the code that casts a `List` or a `Map` +/// to a specific List or Map [type], considering nested List or Map type +/// arguments. +/// +/// Given a simple [type], like `List`, the returned code is a simple call +/// to [List.cast]: `cast()`. +/// +/// Given a deep List type, like `List>`, the returned code uses +/// [List.map] and [List.cast]: +/// `map((e) => (e! as List).cast()).toList()`. +/// +/// Given a deep Map type, like `Map>`, the returned code uses +/// [Map.map] and [Map.cast]: +/// `map((k, v) => MapEntry(k! as int, (v! as List).cast()))`. +String _castCall(TypeDeclaration type) { + if (type.baseName == 'List') { + final TypeDeclaration typeArgument = type.typeArguments.first; + if (typeArgument.baseName == 'List' || typeArgument.baseName == 'Map') { + // We must cast each element in `valueWithTypeCast`. + return 'map((e) => ${_castValue('e', typeArgument)}).toList()'; + } + } else if (type.baseName == 'Map') { + if (type.typeArguments.any( + (e) => e.baseName == 'List' || e.baseName == 'Map', + )) { + final TypeDeclaration keyTypeArgument = type.typeArguments[0]; + final TypeDeclaration valueTypeArgument = type.typeArguments[1]; + return 'map((k, v) => MapEntry(' + '${_castValue('k', keyTypeArgument)}, ' + '${_castValue('v', valueTypeArgument)}))'; + } + } + + return 'cast<${_flattenTypeArguments(type.typeArguments)}>()'; } /// Returns an argument name that can be used in a context where it is possible to collide. diff --git a/packages/pigeon/lib/src/generator_tools.dart b/packages/pigeon/lib/src/generator_tools.dart index 604691d46d3e..55874a95684a 100644 --- a/packages/pigeon/lib/src/generator_tools.dart +++ b/packages/pigeon/lib/src/generator_tools.dart @@ -15,7 +15,7 @@ import 'generator.dart'; /// The current version of pigeon. /// /// This must match the version in pubspec.yaml. -const String pigeonVersion = '26.3.3'; +const String pigeonVersion = '26.3.4'; /// Default plugin package name. const String defaultPluginPackageName = 'dev.flutter.pigeon'; diff --git a/packages/pigeon/pigeons/core_tests.dart b/packages/pigeon/pigeons/core_tests.dart index f55c0bbfd519..6c94d46acadc 100644 --- a/packages/pigeon/pigeons/core_tests.dart +++ b/packages/pigeon/pigeons/core_tests.dart @@ -44,7 +44,9 @@ class AllTypes { required this.enumList, required this.objectList, required this.listList, + required this.boolListList, required this.mapList, + required this.boolMapList, // Maps required this.map, @@ -53,6 +55,7 @@ class AllTypes { required this.enumMap, required this.objectMap, required this.listMap, + required this.boolListMap, required this.mapMap, }); @@ -79,7 +82,9 @@ class AllTypes { List enumList; List objectList; List> listList; + List> boolListList; List> mapList; + List> boolMapList; // Maps // ignore: strict_raw_type, always_specify_types @@ -89,6 +94,7 @@ class AllTypes { Map enumMap; Map objectMap; Map> listMap; + Map> boolListMap; Map> mapMap; } @@ -121,6 +127,7 @@ class AllNullableTypes { this.enumList, this.objectList, this.listList, + this.boolListList, this.mapList, this.recursiveClassList, @@ -131,6 +138,7 @@ class AllNullableTypes { this.enumMap, this.objectMap, this.listMap, + this.boolListMap, this.mapMap, this.recursiveClassMap, ); @@ -159,6 +167,7 @@ class AllNullableTypes { List? enumList; List? objectList; List?>? listList; + List?>? boolListList; List?>? mapList; List? recursiveClassList; @@ -170,6 +179,7 @@ class AllNullableTypes { Map? enumMap; Map? objectMap; Map?>? listMap; + Map?>? boolListMap; Map?>? mapMap; Map? recursiveClassMap; } @@ -354,6 +364,11 @@ abstract class HostIntegrationCoreApi { @SwiftFunction('echoNonNull(classList:)') List echoNonNullClassList(List classList); + /// Returns the passed list, to test serialization and deserialization. + @ObjCSelector('echoNonNullBoolListList:') + @SwiftFunction('echoNonNull(boolListList:)') + List> echoNonNullBoolListList(List> list); + /// Returns the passed map, to test serialization and deserialization. @ObjCSelector('echoMap:') @SwiftFunction('echo(_:)') 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 8b3825849e95..0f62ade6f987 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 @@ -583,6 +583,19 @@ public void setListList(@NonNull List> setterArg) { this.listList = setterArg; } + private @NonNull List> boolListList; + + public @NonNull List> getBoolListList() { + return boolListList; + } + + public void setBoolListList(@NonNull List> setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"boolListList\" is null."); + } + this.boolListList = setterArg; + } + private @NonNull List> mapList; public @NonNull List> getMapList() { @@ -596,6 +609,19 @@ public void setMapList(@NonNull List> setterArg) { this.mapList = setterArg; } + private @NonNull List> boolMapList; + + public @NonNull List> getBoolMapList() { + return boolMapList; + } + + public void setBoolMapList(@NonNull List> setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"boolMapList\" is null."); + } + this.boolMapList = setterArg; + } + private @NonNull Map map; public @NonNull Map getMap() { @@ -674,6 +700,19 @@ public void setListMap(@NonNull Map> setterArg) { this.listMap = setterArg; } + private @NonNull Map> boolListMap; + + public @NonNull Map> getBoolListMap() { + return boolListMap; + } + + public void setBoolListMap(@NonNull Map> setterArg) { + if (setterArg == null) { + throw new IllegalStateException("Nonnull field \"boolListMap\" is null."); + } + this.boolListMap = setterArg; + } + private @NonNull Map> mapMap; public @NonNull Map> getMapMap() { @@ -719,13 +758,16 @@ && pigeonDeepEquals(boolList, that.boolList) && pigeonDeepEquals(enumList, that.enumList) && pigeonDeepEquals(objectList, that.objectList) && pigeonDeepEquals(listList, that.listList) + && pigeonDeepEquals(boolListList, that.boolListList) && pigeonDeepEquals(mapList, that.mapList) + && pigeonDeepEquals(boolMapList, that.boolMapList) && pigeonDeepEquals(map, that.map) && pigeonDeepEquals(stringMap, that.stringMap) && pigeonDeepEquals(intMap, that.intMap) && pigeonDeepEquals(enumMap, that.enumMap) && pigeonDeepEquals(objectMap, that.objectMap) && pigeonDeepEquals(listMap, that.listMap) + && pigeonDeepEquals(boolListMap, that.boolListMap) && pigeonDeepEquals(mapMap, that.mapMap); } @@ -754,13 +796,16 @@ public int hashCode() { enumList, objectList, listList, + boolListList, mapList, + boolMapList, map, stringMap, intMap, enumMap, objectMap, listMap, + boolListMap, mapMap }; return pigeonDeepHashCode(fields); @@ -928,6 +973,14 @@ public static final class Builder { return this; } + private @Nullable List> boolListList; + + @CanIgnoreReturnValue + public @NonNull Builder setBoolListList(@NonNull List> setterArg) { + this.boolListList = setterArg; + return this; + } + private @Nullable List> mapList; @CanIgnoreReturnValue @@ -936,6 +989,14 @@ public static final class Builder { return this; } + private @Nullable List> boolMapList; + + @CanIgnoreReturnValue + public @NonNull Builder setBoolMapList(@NonNull List> setterArg) { + this.boolMapList = setterArg; + return this; + } + private @Nullable Map map; @CanIgnoreReturnValue @@ -984,6 +1045,14 @@ public static final class Builder { return this; } + private @Nullable Map> boolListMap; + + @CanIgnoreReturnValue + public @NonNull Builder setBoolListMap(@NonNull Map> setterArg) { + this.boolListMap = setterArg; + return this; + } + private @Nullable Map> mapMap; @CanIgnoreReturnValue @@ -1014,13 +1083,16 @@ public static final class Builder { pigeonReturn.setEnumList(enumList); pigeonReturn.setObjectList(objectList); pigeonReturn.setListList(listList); + pigeonReturn.setBoolListList(boolListList); pigeonReturn.setMapList(mapList); + pigeonReturn.setBoolMapList(boolMapList); pigeonReturn.setMap(map); pigeonReturn.setStringMap(stringMap); pigeonReturn.setIntMap(intMap); pigeonReturn.setEnumMap(enumMap); pigeonReturn.setObjectMap(objectMap); pigeonReturn.setListMap(listMap); + pigeonReturn.setBoolListMap(boolListMap); pigeonReturn.setMapMap(mapMap); return pigeonReturn; } @@ -1028,7 +1100,7 @@ public static final class Builder { @NonNull ArrayList toList() { - ArrayList toListResult = new ArrayList<>(28); + ArrayList toListResult = new ArrayList<>(31); toListResult.add(aBool); toListResult.add(anInt); toListResult.add(anInt64); @@ -1049,13 +1121,16 @@ ArrayList toList() { toListResult.add(enumList); toListResult.add(objectList); toListResult.add(listList); + toListResult.add(boolListList); toListResult.add(mapList); + toListResult.add(boolMapList); toListResult.add(map); toListResult.add(stringMap); toListResult.add(intMap); toListResult.add(enumMap); toListResult.add(objectMap); toListResult.add(listMap); + toListResult.add(boolListMap); toListResult.add(mapMap); return toListResult; } @@ -1102,21 +1177,27 @@ ArrayList toList() { pigeonResult.setObjectList((List) objectList); Object listList = pigeonVar_list.get(19); pigeonResult.setListList((List>) listList); - Object mapList = pigeonVar_list.get(20); + Object boolListList = pigeonVar_list.get(20); + pigeonResult.setBoolListList((List>) boolListList); + Object mapList = pigeonVar_list.get(21); pigeonResult.setMapList((List>) mapList); - Object map = pigeonVar_list.get(21); + Object boolMapList = pigeonVar_list.get(22); + pigeonResult.setBoolMapList((List>) boolMapList); + Object map = pigeonVar_list.get(23); pigeonResult.setMap((Map) map); - Object stringMap = pigeonVar_list.get(22); + Object stringMap = pigeonVar_list.get(24); pigeonResult.setStringMap((Map) stringMap); - Object intMap = pigeonVar_list.get(23); + Object intMap = pigeonVar_list.get(25); pigeonResult.setIntMap((Map) intMap); - Object enumMap = pigeonVar_list.get(24); + Object enumMap = pigeonVar_list.get(26); pigeonResult.setEnumMap((Map) enumMap); - Object objectMap = pigeonVar_list.get(25); + Object objectMap = pigeonVar_list.get(27); pigeonResult.setObjectMap((Map) objectMap); - Object listMap = pigeonVar_list.get(26); + Object listMap = pigeonVar_list.get(28); pigeonResult.setListMap((Map>) listMap); - Object mapMap = pigeonVar_list.get(27); + Object boolListMap = pigeonVar_list.get(29); + pigeonResult.setBoolListMap((Map>) boolListMap); + Object mapMap = pigeonVar_list.get(30); pigeonResult.setMapMap((Map>) mapMap); return pigeonResult; } @@ -1338,6 +1419,16 @@ public void setListList(@Nullable List> setterArg) { this.listList = setterArg; } + private @Nullable List> boolListList; + + public @Nullable List> getBoolListList() { + return boolListList; + } + + public void setBoolListList(@Nullable List> setterArg) { + this.boolListList = setterArg; + } + private @Nullable List> mapList; public @Nullable List> getMapList() { @@ -1418,6 +1509,16 @@ public void setListMap(@Nullable Map> setterArg) { this.listMap = setterArg; } + private @Nullable Map> boolListMap; + + public @Nullable Map> getBoolListMap() { + return boolListMap; + } + + public void setBoolListMap(@Nullable Map> setterArg) { + this.boolListMap = setterArg; + } + private @Nullable Map> mapMap; public @Nullable Map> getMapMap() { @@ -1468,6 +1569,7 @@ && pigeonDeepEquals(boolList, that.boolList) && pigeonDeepEquals(enumList, that.enumList) && pigeonDeepEquals(objectList, that.objectList) && pigeonDeepEquals(listList, that.listList) + && pigeonDeepEquals(boolListList, that.boolListList) && pigeonDeepEquals(mapList, that.mapList) && pigeonDeepEquals(recursiveClassList, that.recursiveClassList) && pigeonDeepEquals(map, that.map) @@ -1476,6 +1578,7 @@ && pigeonDeepEquals(intMap, that.intMap) && pigeonDeepEquals(enumMap, that.enumMap) && pigeonDeepEquals(objectMap, that.objectMap) && pigeonDeepEquals(listMap, that.listMap) + && pigeonDeepEquals(boolListMap, that.boolListMap) && pigeonDeepEquals(mapMap, that.mapMap) && pigeonDeepEquals(recursiveClassMap, that.recursiveClassMap); } @@ -1506,6 +1609,7 @@ public int hashCode() { enumList, objectList, listList, + boolListList, mapList, recursiveClassList, map, @@ -1514,6 +1618,7 @@ public int hashCode() { enumMap, objectMap, listMap, + boolListMap, mapMap, recursiveClassMap }; @@ -1690,6 +1795,14 @@ public static final class Builder { return this; } + private @Nullable List> boolListList; + + @CanIgnoreReturnValue + public @NonNull Builder setBoolListList(@Nullable List> setterArg) { + this.boolListList = setterArg; + return this; + } + private @Nullable List> mapList; @CanIgnoreReturnValue @@ -1754,6 +1867,14 @@ public static final class Builder { return this; } + private @Nullable Map> boolListMap; + + @CanIgnoreReturnValue + public @NonNull Builder setBoolListMap(@Nullable Map> setterArg) { + this.boolListMap = setterArg; + return this; + } + private @Nullable Map> mapMap; @CanIgnoreReturnValue @@ -1794,6 +1915,7 @@ public static final class Builder { pigeonReturn.setEnumList(enumList); pigeonReturn.setObjectList(objectList); pigeonReturn.setListList(listList); + pigeonReturn.setBoolListList(boolListList); pigeonReturn.setMapList(mapList); pigeonReturn.setRecursiveClassList(recursiveClassList); pigeonReturn.setMap(map); @@ -1802,6 +1924,7 @@ public static final class Builder { pigeonReturn.setEnumMap(enumMap); pigeonReturn.setObjectMap(objectMap); pigeonReturn.setListMap(listMap); + pigeonReturn.setBoolListMap(boolListMap); pigeonReturn.setMapMap(mapMap); pigeonReturn.setRecursiveClassMap(recursiveClassMap); return pigeonReturn; @@ -1810,7 +1933,7 @@ public static final class Builder { @NonNull ArrayList toList() { - ArrayList toListResult = new ArrayList<>(31); + ArrayList toListResult = new ArrayList<>(33); toListResult.add(aNullableBool); toListResult.add(aNullableInt); toListResult.add(aNullableInt64); @@ -1832,6 +1955,7 @@ ArrayList toList() { toListResult.add(enumList); toListResult.add(objectList); toListResult.add(listList); + toListResult.add(boolListList); toListResult.add(mapList); toListResult.add(recursiveClassList); toListResult.add(map); @@ -1840,6 +1964,7 @@ ArrayList toList() { toListResult.add(enumMap); toListResult.add(objectMap); toListResult.add(listMap); + toListResult.add(boolListMap); toListResult.add(mapMap); toListResult.add(recursiveClassMap); return toListResult; @@ -1889,25 +2014,29 @@ ArrayList toList() { pigeonResult.setObjectList((List) objectList); Object listList = pigeonVar_list.get(20); pigeonResult.setListList((List>) listList); - Object mapList = pigeonVar_list.get(21); + Object boolListList = pigeonVar_list.get(21); + pigeonResult.setBoolListList((List>) boolListList); + Object mapList = pigeonVar_list.get(22); pigeonResult.setMapList((List>) mapList); - Object recursiveClassList = pigeonVar_list.get(22); + Object recursiveClassList = pigeonVar_list.get(23); pigeonResult.setRecursiveClassList((List) recursiveClassList); - Object map = pigeonVar_list.get(23); + Object map = pigeonVar_list.get(24); pigeonResult.setMap((Map) map); - Object stringMap = pigeonVar_list.get(24); + Object stringMap = pigeonVar_list.get(25); pigeonResult.setStringMap((Map) stringMap); - Object intMap = pigeonVar_list.get(25); + Object intMap = pigeonVar_list.get(26); pigeonResult.setIntMap((Map) intMap); - Object enumMap = pigeonVar_list.get(26); + Object enumMap = pigeonVar_list.get(27); pigeonResult.setEnumMap((Map) enumMap); - Object objectMap = pigeonVar_list.get(27); + Object objectMap = pigeonVar_list.get(28); pigeonResult.setObjectMap((Map) objectMap); - Object listMap = pigeonVar_list.get(28); + Object listMap = pigeonVar_list.get(29); pigeonResult.setListMap((Map>) listMap); - Object mapMap = pigeonVar_list.get(29); + Object boolListMap = pigeonVar_list.get(30); + pigeonResult.setBoolListMap((Map>) boolListMap); + Object mapMap = pigeonVar_list.get(31); pigeonResult.setMapMap((Map>) mapMap); - Object recursiveClassMap = pigeonVar_list.get(30); + Object recursiveClassMap = pigeonVar_list.get(32); pigeonResult.setRecursiveClassMap((Map) recursiveClassMap); return pigeonResult; } @@ -3083,6 +3212,9 @@ public interface HostIntegrationCoreApi { /** Returns the passed list, to test serialization and deserialization. */ @NonNull List echoNonNullClassList(@NonNull List classList); + /** Returns the passed list, to test serialization and deserialization. */ + @NonNull + List> echoNonNullBoolListList(@NonNull List> list); /** Returns the passed map, to test serialization and deserialization. */ @NonNull Map echoMap(@NonNull Map map); @@ -3923,6 +4055,31 @@ static void setUp( channel.setMessageHandler(null); } } + { + BasicMessageChannel channel = + new BasicMessageChannel<>( + binaryMessenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi.echoNonNullBoolListList" + + messageChannelSuffix, + getCodec()); + if (api != null) { + channel.setMessageHandler( + (message, reply) -> { + ArrayList wrapped = new ArrayList<>(); + ArrayList args = (ArrayList) message; + List> listArg = (List>) args.get(0); + try { + List> output = api.echoNonNullBoolListList(listArg); + wrapped.add(0, output); + } catch (Throwable exception) { + wrapped = wrapError(exception); + } + reply.reply(wrapped); + }); + } else { + channel.setMessageHandler(null); + } + } { BasicMessageChannel channel = new BasicMessageChannel<>( diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/darwin/alternate_language_test_plugin/Sources/alternate_language_test_plugin/CoreTests.gen.m b/packages/pigeon/platform_tests/alternate_language_test_plugin/darwin/alternate_language_test_plugin/Sources/alternate_language_test_plugin/CoreTests.gen.m index 7c114f8fa47b..964bd0e0c389 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/darwin/alternate_language_test_plugin/Sources/alternate_language_test_plugin/CoreTests.gen.m +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/darwin/alternate_language_test_plugin/Sources/alternate_language_test_plugin/CoreTests.gen.m @@ -241,13 +241,16 @@ + (instancetype)makeWithABool:(BOOL)aBool enumList:(NSArray *)enumList objectList:(NSArray *)objectList listList:(NSArray *> *)listList + boolListList:(NSArray *> *)boolListList mapList:(NSArray *> *)mapList + boolMapList:(NSArray *> *)boolMapList map:(NSDictionary *)map stringMap:(NSDictionary *)stringMap intMap:(NSDictionary *)intMap enumMap:(NSDictionary *)enumMap objectMap:(NSDictionary *)objectMap listMap:(NSDictionary *> *)listMap + boolListMap:(NSDictionary *> *)boolListMap mapMap:(NSDictionary *> *)mapMap { FLTAllTypes *pigeonResult = [[FLTAllTypes alloc] init]; pigeonResult.aBool = aBool; @@ -270,13 +273,16 @@ + (instancetype)makeWithABool:(BOOL)aBool pigeonResult.enumList = enumList; pigeonResult.objectList = objectList; pigeonResult.listList = listList; + pigeonResult.boolListList = boolListList; pigeonResult.mapList = mapList; + pigeonResult.boolMapList = boolMapList; pigeonResult.map = map; pigeonResult.stringMap = stringMap; pigeonResult.intMap = intMap; pigeonResult.enumMap = enumMap; pigeonResult.objectMap = objectMap; pigeonResult.listMap = listMap; + pigeonResult.boolListMap = boolListMap; pigeonResult.mapMap = mapMap; return pigeonResult; } @@ -304,14 +310,17 @@ + (FLTAllTypes *)fromList:(NSArray *)list { pigeonResult.enumList = GetNullableObjectAtIndex(list, 17); pigeonResult.objectList = GetNullableObjectAtIndex(list, 18); pigeonResult.listList = GetNullableObjectAtIndex(list, 19); - pigeonResult.mapList = GetNullableObjectAtIndex(list, 20); - pigeonResult.map = GetNullableObjectAtIndex(list, 21); - pigeonResult.stringMap = GetNullableObjectAtIndex(list, 22); - pigeonResult.intMap = GetNullableObjectAtIndex(list, 23); - pigeonResult.enumMap = GetNullableObjectAtIndex(list, 24); - pigeonResult.objectMap = GetNullableObjectAtIndex(list, 25); - pigeonResult.listMap = GetNullableObjectAtIndex(list, 26); - pigeonResult.mapMap = GetNullableObjectAtIndex(list, 27); + pigeonResult.boolListList = GetNullableObjectAtIndex(list, 20); + pigeonResult.mapList = GetNullableObjectAtIndex(list, 21); + pigeonResult.boolMapList = GetNullableObjectAtIndex(list, 22); + pigeonResult.map = GetNullableObjectAtIndex(list, 23); + pigeonResult.stringMap = GetNullableObjectAtIndex(list, 24); + pigeonResult.intMap = GetNullableObjectAtIndex(list, 25); + pigeonResult.enumMap = GetNullableObjectAtIndex(list, 26); + pigeonResult.objectMap = GetNullableObjectAtIndex(list, 27); + pigeonResult.listMap = GetNullableObjectAtIndex(list, 28); + pigeonResult.boolListMap = GetNullableObjectAtIndex(list, 29); + pigeonResult.mapMap = GetNullableObjectAtIndex(list, 30); return pigeonResult; } + (nullable FLTAllTypes *)nullableFromList:(NSArray *)list { @@ -339,13 +348,16 @@ + (nullable FLTAllTypes *)nullableFromList:(NSArray *)list { self.enumList ?: [NSNull null], self.objectList ?: [NSNull null], self.listList ?: [NSNull null], + self.boolListList ?: [NSNull null], self.mapList ?: [NSNull null], + self.boolMapList ?: [NSNull null], self.map ?: [NSNull null], self.stringMap ?: [NSNull null], self.intMap ?: [NSNull null], self.enumMap ?: [NSNull null], self.objectMap ?: [NSNull null], self.listMap ?: [NSNull null], + self.boolListMap ?: [NSNull null], self.mapMap ?: [NSNull null], ]; } @@ -374,13 +386,16 @@ - (BOOL)isEqual:(id)object { FLTPigeonDeepEquals(self.enumList, other.enumList) && FLTPigeonDeepEquals(self.objectList, other.objectList) && FLTPigeonDeepEquals(self.listList, other.listList) && + FLTPigeonDeepEquals(self.boolListList, other.boolListList) && FLTPigeonDeepEquals(self.mapList, other.mapList) && + FLTPigeonDeepEquals(self.boolMapList, other.boolMapList) && FLTPigeonDeepEquals(self.map, other.map) && FLTPigeonDeepEquals(self.stringMap, other.stringMap) && FLTPigeonDeepEquals(self.intMap, other.intMap) && FLTPigeonDeepEquals(self.enumMap, other.enumMap) && FLTPigeonDeepEquals(self.objectMap, other.objectMap) && FLTPigeonDeepEquals(self.listMap, other.listMap) && + FLTPigeonDeepEquals(self.boolListMap, other.boolListMap) && FLTPigeonDeepEquals(self.mapMap, other.mapMap); } @@ -407,13 +422,16 @@ - (NSUInteger)hash { result = result * 31 + FLTPigeonDeepHash(self.enumList); result = result * 31 + FLTPigeonDeepHash(self.objectList); result = result * 31 + FLTPigeonDeepHash(self.listList); + result = result * 31 + FLTPigeonDeepHash(self.boolListList); result = result * 31 + FLTPigeonDeepHash(self.mapList); + result = result * 31 + FLTPigeonDeepHash(self.boolMapList); result = result * 31 + FLTPigeonDeepHash(self.map); result = result * 31 + FLTPigeonDeepHash(self.stringMap); result = result * 31 + FLTPigeonDeepHash(self.intMap); result = result * 31 + FLTPigeonDeepHash(self.enumMap); result = result * 31 + FLTPigeonDeepHash(self.objectMap); result = result * 31 + FLTPigeonDeepHash(self.listMap); + result = result * 31 + FLTPigeonDeepHash(self.boolListMap); result = result * 31 + FLTPigeonDeepHash(self.mapMap); return result; } @@ -442,6 +460,7 @@ @implementation FLTAllNullableTypes enumList:(nullable NSArray *)enumList objectList:(nullable NSArray *)objectList listList:(nullable NSArray *> *)listList + boolListList:(nullable NSArray *> *)boolListList mapList:(nullable NSArray *> *)mapList recursiveClassList:(nullable NSArray *)recursiveClassList map:(nullable NSDictionary *)map @@ -450,6 +469,7 @@ @implementation FLTAllNullableTypes enumMap:(nullable NSDictionary *)enumMap objectMap:(nullable NSDictionary *)objectMap listMap:(nullable NSDictionary *> *)listMap + boolListMap:(nullable NSDictionary *> *)boolListMap mapMap:(nullable NSDictionary *> *)mapMap recursiveClassMap: (nullable NSDictionary *)recursiveClassMap { @@ -475,6 +495,7 @@ @implementation FLTAllNullableTypes pigeonResult.enumList = enumList; pigeonResult.objectList = objectList; pigeonResult.listList = listList; + pigeonResult.boolListList = boolListList; pigeonResult.mapList = mapList; pigeonResult.recursiveClassList = recursiveClassList; pigeonResult.map = map; @@ -483,6 +504,7 @@ @implementation FLTAllNullableTypes pigeonResult.enumMap = enumMap; pigeonResult.objectMap = objectMap; pigeonResult.listMap = listMap; + pigeonResult.boolListMap = boolListMap; pigeonResult.mapMap = mapMap; pigeonResult.recursiveClassMap = recursiveClassMap; return pigeonResult; @@ -510,16 +532,18 @@ + (FLTAllNullableTypes *)fromList:(NSArray *)list { pigeonResult.enumList = GetNullableObjectAtIndex(list, 18); pigeonResult.objectList = GetNullableObjectAtIndex(list, 19); pigeonResult.listList = GetNullableObjectAtIndex(list, 20); - pigeonResult.mapList = GetNullableObjectAtIndex(list, 21); - pigeonResult.recursiveClassList = GetNullableObjectAtIndex(list, 22); - pigeonResult.map = GetNullableObjectAtIndex(list, 23); - pigeonResult.stringMap = GetNullableObjectAtIndex(list, 24); - pigeonResult.intMap = GetNullableObjectAtIndex(list, 25); - pigeonResult.enumMap = GetNullableObjectAtIndex(list, 26); - pigeonResult.objectMap = GetNullableObjectAtIndex(list, 27); - pigeonResult.listMap = GetNullableObjectAtIndex(list, 28); - pigeonResult.mapMap = GetNullableObjectAtIndex(list, 29); - pigeonResult.recursiveClassMap = GetNullableObjectAtIndex(list, 30); + pigeonResult.boolListList = GetNullableObjectAtIndex(list, 21); + pigeonResult.mapList = GetNullableObjectAtIndex(list, 22); + pigeonResult.recursiveClassList = GetNullableObjectAtIndex(list, 23); + pigeonResult.map = GetNullableObjectAtIndex(list, 24); + pigeonResult.stringMap = GetNullableObjectAtIndex(list, 25); + pigeonResult.intMap = GetNullableObjectAtIndex(list, 26); + pigeonResult.enumMap = GetNullableObjectAtIndex(list, 27); + pigeonResult.objectMap = GetNullableObjectAtIndex(list, 28); + pigeonResult.listMap = GetNullableObjectAtIndex(list, 29); + pigeonResult.boolListMap = GetNullableObjectAtIndex(list, 30); + pigeonResult.mapMap = GetNullableObjectAtIndex(list, 31); + pigeonResult.recursiveClassMap = GetNullableObjectAtIndex(list, 32); return pigeonResult; } + (nullable FLTAllNullableTypes *)nullableFromList:(NSArray *)list { @@ -548,6 +572,7 @@ + (nullable FLTAllNullableTypes *)nullableFromList:(NSArray *)list { self.enumList ?: [NSNull null], self.objectList ?: [NSNull null], self.listList ?: [NSNull null], + self.boolListList ?: [NSNull null], self.mapList ?: [NSNull null], self.recursiveClassList ?: [NSNull null], self.map ?: [NSNull null], @@ -556,6 +581,7 @@ + (nullable FLTAllNullableTypes *)nullableFromList:(NSArray *)list { self.enumMap ?: [NSNull null], self.objectMap ?: [NSNull null], self.listMap ?: [NSNull null], + self.boolListMap ?: [NSNull null], self.mapMap ?: [NSNull null], self.recursiveClassMap ?: [NSNull null], ]; @@ -589,6 +615,7 @@ - (BOOL)isEqual:(id)object { FLTPigeonDeepEquals(self.enumList, other.enumList) && FLTPigeonDeepEquals(self.objectList, other.objectList) && FLTPigeonDeepEquals(self.listList, other.listList) && + FLTPigeonDeepEquals(self.boolListList, other.boolListList) && FLTPigeonDeepEquals(self.mapList, other.mapList) && FLTPigeonDeepEquals(self.recursiveClassList, other.recursiveClassList) && FLTPigeonDeepEquals(self.map, other.map) && @@ -597,6 +624,7 @@ - (BOOL)isEqual:(id)object { FLTPigeonDeepEquals(self.enumMap, other.enumMap) && FLTPigeonDeepEquals(self.objectMap, other.objectMap) && FLTPigeonDeepEquals(self.listMap, other.listMap) && + FLTPigeonDeepEquals(self.boolListMap, other.boolListMap) && FLTPigeonDeepEquals(self.mapMap, other.mapMap) && FLTPigeonDeepEquals(self.recursiveClassMap, other.recursiveClassMap); } @@ -624,6 +652,7 @@ - (NSUInteger)hash { result = result * 31 + FLTPigeonDeepHash(self.enumList); result = result * 31 + FLTPigeonDeepHash(self.objectList); result = result * 31 + FLTPigeonDeepHash(self.listList); + result = result * 31 + FLTPigeonDeepHash(self.boolListList); result = result * 31 + FLTPigeonDeepHash(self.mapList); result = result * 31 + FLTPigeonDeepHash(self.recursiveClassList); result = result * 31 + FLTPigeonDeepHash(self.map); @@ -632,6 +661,7 @@ - (NSUInteger)hash { result = result * 31 + FLTPigeonDeepHash(self.enumMap); result = result * 31 + FLTPigeonDeepHash(self.objectMap); result = result * 31 + FLTPigeonDeepHash(self.listMap); + result = result * 31 + FLTPigeonDeepHash(self.boolListMap); result = result * 31 + FLTPigeonDeepHash(self.mapMap); result = result * 31 + FLTPigeonDeepHash(self.recursiveClassMap); return result; @@ -1453,6 +1483,33 @@ void SetUpFLTHostIntegrationCoreApiWithSuffix(id binaryM [channel setMessageHandler:nil]; } } + /// Returns the passed list, to test serialization and deserialization. + { + FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] + initWithName:[NSString + stringWithFormat:@"%@%@", + @"dev.flutter.pigeon.pigeon_integration_tests." + @"HostIntegrationCoreApi.echoNonNullBoolListList", + messageChannelSuffix] + binaryMessenger:binaryMessenger + codec:FLTGetCoreTestsCodec()]; + if (api) { + NSCAssert([api respondsToSelector:@selector(echoNonNullBoolListList:error:)], + @"FLTHostIntegrationCoreApi api (%@) doesn't respond to " + @"@selector(echoNonNullBoolListList:error:)", + api); + [channel setMessageHandler:^(id _Nullable message, FlutterReply callback) { + NSArray *args = message; + NSArray *> *arg_list = GetNullableObjectAtIndex(args, 0); + FlutterError *error; + NSArray *> *output = [api echoNonNullBoolListList:arg_list + error:&error]; + callback(wrapResult(output, error)); + }]; + } else { + [channel setMessageHandler:nil]; + } + } /// Returns the passed map, to test serialization and deserialization. { FlutterBasicMessageChannel *channel = [[FlutterBasicMessageChannel alloc] diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/darwin/alternate_language_test_plugin/Sources/alternate_language_test_plugin/include/alternate_language_test_plugin/CoreTests.gen.h b/packages/pigeon/platform_tests/alternate_language_test_plugin/darwin/alternate_language_test_plugin/Sources/alternate_language_test_plugin/include/alternate_language_test_plugin/CoreTests.gen.h index 2b620a11104a..709d1e30b5dd 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/darwin/alternate_language_test_plugin/Sources/alternate_language_test_plugin/include/alternate_language_test_plugin/CoreTests.gen.h +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/darwin/alternate_language_test_plugin/Sources/alternate_language_test_plugin/include/alternate_language_test_plugin/CoreTests.gen.h @@ -74,13 +74,16 @@ typedef NS_ENUM(NSUInteger, FLTAnotherEnum) { enumList:(NSArray *)enumList objectList:(NSArray *)objectList listList:(NSArray *> *)listList + boolListList:(NSArray *> *)boolListList mapList:(NSArray *> *)mapList + boolMapList:(NSArray *> *)boolMapList map:(NSDictionary *)map stringMap:(NSDictionary *)stringMap intMap:(NSDictionary *)intMap enumMap:(NSDictionary *)enumMap objectMap:(NSDictionary *)objectMap listMap:(NSDictionary *> *)listMap + boolListMap:(NSDictionary *> *)boolListMap mapMap:(NSDictionary *> *)mapMap; @property(nonatomic, assign) BOOL aBool; @property(nonatomic, assign) NSInteger anInt; @@ -102,13 +105,16 @@ typedef NS_ENUM(NSUInteger, FLTAnotherEnum) { @property(nonatomic, copy) NSArray *enumList; @property(nonatomic, copy) NSArray *objectList; @property(nonatomic, copy) NSArray *> *listList; +@property(nonatomic, copy) NSArray *> *boolListList; @property(nonatomic, copy) NSArray *> *mapList; +@property(nonatomic, copy) NSArray *> *boolMapList; @property(nonatomic, copy) NSDictionary *map; @property(nonatomic, copy) NSDictionary *stringMap; @property(nonatomic, copy) NSDictionary *intMap; @property(nonatomic, copy) NSDictionary *enumMap; @property(nonatomic, copy) NSDictionary *objectMap; @property(nonatomic, copy) NSDictionary *> *listMap; +@property(nonatomic, copy) NSDictionary *> *boolListMap; @property(nonatomic, copy) NSDictionary *> *mapMap; @end @@ -136,6 +142,7 @@ typedef NS_ENUM(NSUInteger, FLTAnotherEnum) { enumList:(nullable NSArray *)enumList objectList:(nullable NSArray *)objectList listList:(nullable NSArray *> *)listList + boolListList:(nullable NSArray *> *)boolListList mapList:(nullable NSArray *> *)mapList recursiveClassList:(nullable NSArray *)recursiveClassList map:(nullable NSDictionary *)map @@ -144,6 +151,7 @@ typedef NS_ENUM(NSUInteger, FLTAnotherEnum) { enumMap:(nullable NSDictionary *)enumMap objectMap:(nullable NSDictionary *)objectMap listMap:(nullable NSDictionary *> *)listMap + boolListMap:(nullable NSDictionary *> *)boolListMap mapMap:(nullable NSDictionary *> *)mapMap recursiveClassMap: (nullable NSDictionary *)recursiveClassMap; @@ -168,6 +176,7 @@ typedef NS_ENUM(NSUInteger, FLTAnotherEnum) { @property(nonatomic, copy, nullable) NSArray *enumList; @property(nonatomic, copy, nullable) NSArray *objectList; @property(nonatomic, copy, nullable) NSArray *> *listList; +@property(nonatomic, copy, nullable) NSArray *> *boolListList; @property(nonatomic, copy, nullable) NSArray *> *mapList; @property(nonatomic, copy, nullable) NSArray *recursiveClassList; @property(nonatomic, copy, nullable) NSDictionary *map; @@ -176,6 +185,7 @@ typedef NS_ENUM(NSUInteger, FLTAnotherEnum) { @property(nonatomic, copy, nullable) NSDictionary *enumMap; @property(nonatomic, copy, nullable) NSDictionary *objectMap; @property(nonatomic, copy, nullable) NSDictionary *> *listMap; +@property(nonatomic, copy, nullable) NSDictionary *> *boolListMap; @property(nonatomic, copy, nullable) NSDictionary *> *mapMap; @property(nonatomic, copy, nullable) NSDictionary *recursiveClassMap; @@ -355,6 +365,12 @@ NSObject *FLTGetCoreTestsCodec(void); - (nullable NSArray *) echoNonNullClassList:(NSArray *)classList error:(FlutterError *_Nullable *_Nonnull)error; +/// Returns the passed list, to test serialization and deserialization. +/// +/// @return `nil` only when `error != nil`. +- (nullable NSArray *> *) + echoNonNullBoolListList:(NSArray *> *)list + error:(FlutterError *_Nullable *_Nonnull)error; /// Returns the passed map, to test serialization and deserialization. /// /// @return `nil` only when `error != nil`. diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart index 9ed43123a701..23ca7657dc51 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/integration_tests.dart @@ -404,6 +404,17 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) { expect(listEquals(echoObject, list), true); }); + testWidgets('deep lists serialize and deserialize correctly', ( + WidgetTester _, + ) async { + final api = HostIntegrationCoreApi(); + + final List> echoObject = await api.echoNonNullBoolListList( + nonNullBoolListList, + ); + expect(echoObject, equals(nonNullBoolListList)); + }); + testWidgets('enum lists serialize and deserialize correctly', ( WidgetTester _, ) async { 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 482368add83b..de1cab95b191 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 @@ -177,13 +177,16 @@ class AllTypes { required this.enumList, required this.objectList, required this.listList, + required this.boolListList, required this.mapList, + required this.boolMapList, required this.map, required this.stringMap, required this.intMap, required this.enumMap, required this.objectMap, required this.listMap, + required this.boolListMap, required this.mapMap, }); @@ -227,8 +230,12 @@ class AllTypes { List> listList; + List> boolListList; + List> mapList; + List> boolMapList; + Map map; Map stringMap; @@ -241,6 +248,8 @@ class AllTypes { Map> listMap; + Map> boolListMap; + Map> mapMap; List _toList() { @@ -265,13 +274,16 @@ class AllTypes { enumList, objectList, listList, + boolListList, mapList, + boolMapList, map, stringMap, intMap, enumMap, objectMap, listMap, + boolListMap, mapMap, ]; } @@ -302,17 +314,32 @@ class AllTypes { boolList: (result[16]! as List).cast(), enumList: (result[17]! as List).cast(), objectList: (result[18]! as List).cast(), - listList: (result[19]! as List).cast>(), - mapList: (result[20]! as List).cast>(), - map: result[21]! as Map, - stringMap: (result[22]! as Map).cast(), - intMap: (result[23]! as Map).cast(), - enumMap: (result[24]! as Map).cast(), - objectMap: (result[25]! as Map).cast(), - listMap: (result[26]! as Map) - .cast>(), - mapMap: (result[27]! as Map) - .cast>(), + listList: (result[19]! as List) + .map((e) => e! as List) + .toList(), + boolListList: (result[20]! as List) + .map((e) => (e! as List).cast()) + .toList(), + mapList: (result[21]! as List) + .map((e) => e! as Map) + .toList(), + boolMapList: (result[22]! as List) + .map((e) => (e! as Map).cast()) + .toList(), + map: result[23]! as Map, + stringMap: (result[24]! as Map).cast(), + intMap: (result[25]! as Map).cast(), + enumMap: (result[26]! as Map).cast(), + objectMap: (result[27]! as Map).cast(), + listMap: (result[28]! as Map).map( + (k, v) => MapEntry(k! as int, v! as List), + ), + boolListMap: (result[29]! as Map).map( + (k, v) => MapEntry(k! as int, (v! as List).cast()), + ), + mapMap: (result[30]! as Map).map( + (k, v) => MapEntry(k! as int, v! as Map), + ), ); } @@ -345,13 +372,16 @@ class AllTypes { _deepEquals(enumList, other.enumList) && _deepEquals(objectList, other.objectList) && _deepEquals(listList, other.listList) && + _deepEquals(boolListList, other.boolListList) && _deepEquals(mapList, other.mapList) && + _deepEquals(boolMapList, other.boolMapList) && _deepEquals(map, other.map) && _deepEquals(stringMap, other.stringMap) && _deepEquals(intMap, other.intMap) && _deepEquals(enumMap, other.enumMap) && _deepEquals(objectMap, other.objectMap) && _deepEquals(listMap, other.listMap) && + _deepEquals(boolListMap, other.boolListMap) && _deepEquals(mapMap, other.mapMap); } @@ -384,6 +414,7 @@ class AllNullableTypes { this.enumList, this.objectList, this.listList, + this.boolListList, this.mapList, this.recursiveClassList, this.map, @@ -392,6 +423,7 @@ class AllNullableTypes { this.enumMap, this.objectMap, this.listMap, + this.boolListMap, this.mapMap, this.recursiveClassMap, }); @@ -438,6 +470,8 @@ class AllNullableTypes { List?>? listList; + List?>? boolListList; + List?>? mapList; List? recursiveClassList; @@ -454,6 +488,8 @@ class AllNullableTypes { Map?>? listMap; + Map?>? boolListMap; + Map?>? mapMap; Map? recursiveClassMap; @@ -481,6 +517,7 @@ class AllNullableTypes { enumList, objectList, listList, + boolListList, mapList, recursiveClassList, map, @@ -489,6 +526,7 @@ class AllNullableTypes { enumMap, objectMap, listMap, + boolListMap, mapMap, recursiveClassMap, ]; @@ -521,21 +559,33 @@ class AllNullableTypes { boolList: (result[17] as List?)?.cast(), enumList: (result[18] as List?)?.cast(), objectList: result[19] as List?, - listList: (result[20] as List?)?.cast?>(), - mapList: (result[21] as List?)?.cast?>(), - recursiveClassList: (result[22] as List?) + listList: (result[20] as List?) + ?.map((e) => e as List?) + .toList(), + boolListList: (result[21] as List?) + ?.map((e) => (e as List?)?.cast()) + .toList(), + mapList: (result[22] as List?) + ?.map((e) => e as Map?) + .toList(), + recursiveClassList: (result[23] as List?) ?.cast(), - map: result[23] as Map?, - stringMap: (result[24] as Map?) + map: result[24] as Map?, + stringMap: (result[25] as Map?) ?.cast(), - intMap: (result[25] as Map?)?.cast(), - enumMap: (result[26] as Map?)?.cast(), - objectMap: result[27] as Map?, - listMap: (result[28] as Map?) - ?.cast?>(), - mapMap: (result[29] as Map?) - ?.cast?>(), - recursiveClassMap: (result[30] as Map?) + intMap: (result[26] as Map?)?.cast(), + enumMap: (result[27] as Map?)?.cast(), + objectMap: result[28] as Map?, + listMap: (result[29] as Map?)?.map( + (k, v) => MapEntry(k as int?, v as List?), + ), + boolListMap: (result[30] as Map?)?.map( + (k, v) => MapEntry(k as int?, (v as List?)?.cast()), + ), + mapMap: (result[31] as Map?)?.map( + (k, v) => MapEntry(k as int?, v as Map?), + ), + recursiveClassMap: (result[32] as Map?) ?.cast(), ); } @@ -570,6 +620,7 @@ class AllNullableTypes { _deepEquals(enumList, other.enumList) && _deepEquals(objectList, other.objectList) && _deepEquals(listList, other.listList) && + _deepEquals(boolListList, other.boolListList) && _deepEquals(mapList, other.mapList) && _deepEquals(recursiveClassList, other.recursiveClassList) && _deepEquals(map, other.map) && @@ -578,6 +629,7 @@ class AllNullableTypes { _deepEquals(enumMap, other.enumMap) && _deepEquals(objectMap, other.objectMap) && _deepEquals(listMap, other.listMap) && + _deepEquals(boolListMap, other.boolListMap) && _deepEquals(mapMap, other.mapMap) && _deepEquals(recursiveClassMap, other.recursiveClassMap); } @@ -737,18 +789,24 @@ class AllNullableTypesWithoutRecursion { boolList: (result[16] as List?)?.cast(), enumList: (result[17] as List?)?.cast(), objectList: result[18] as List?, - listList: (result[19] as List?)?.cast?>(), - mapList: (result[20] as List?)?.cast?>(), + listList: (result[19] as List?) + ?.map((e) => e as List?) + .toList(), + mapList: (result[20] as List?) + ?.map((e) => e as Map?) + .toList(), map: result[21] as Map?, stringMap: (result[22] as Map?) ?.cast(), intMap: (result[23] as Map?)?.cast(), enumMap: (result[24] as Map?)?.cast(), objectMap: result[25] as Map?, - listMap: (result[26] as Map?) - ?.cast?>(), - mapMap: (result[27] as Map?) - ?.cast?>(), + listMap: (result[26] as Map?)?.map( + (k, v) => MapEntry(k as int?, v as List?), + ), + mapMap: (result[27] as Map?)?.map( + (k, v) => MapEntry(k as int?, v as Map?), + ), ); } @@ -1350,6 +1408,32 @@ class HostIntegrationCoreApi { return (pigeonVar_replyValue! as List).cast(); } + /// Returns the passed list, to test serialization and deserialization. + Future>> echoNonNullBoolListList( + List> list, + ) async { + final pigeonVar_channelName = + 'dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi.echoNonNullBoolListList$pigeonVar_messageChannelSuffix'; + final pigeonVar_channel = BasicMessageChannel( + pigeonVar_channelName, + pigeonChannelCodec, + binaryMessenger: pigeonVar_binaryMessenger, + ); + final Future pigeonVar_sendFuture = pigeonVar_channel.send( + [list], + ); + final pigeonVar_replyList = await pigeonVar_sendFuture as List?; + + final Object? pigeonVar_replyValue = _extractReplyValueOrThrow( + pigeonVar_replyList, + pigeonVar_channelName, + isNullValid: false, + ); + return (pigeonVar_replyValue! as List) + .map((e) => (e! as List).cast()) + .toList(); + } + /// Returns the passed map, to test serialization and deserialization. Future> echoMap(Map map) async { final pigeonVar_channelName = diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_tests.gen.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_tests.gen.dart index 4734c4b0cdb0..d9f32f5ef70b 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_tests.gen.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/src/generated/event_channel_tests.gen.dart @@ -241,8 +241,12 @@ class EventAllNullableTypes { boolList: (result[17] as List?)?.cast(), enumList: (result[18] as List?)?.cast(), objectList: result[19] as List?, - listList: (result[20] as List?)?.cast?>(), - mapList: (result[21] as List?)?.cast?>(), + listList: (result[20] as List?) + ?.map((e) => e as List?) + .toList(), + mapList: (result[21] as List?) + ?.map((e) => e as Map?) + .toList(), recursiveClassList: (result[22] as List?) ?.cast(), map: result[23] as Map?, @@ -252,10 +256,12 @@ class EventAllNullableTypes { enumMap: (result[26] as Map?) ?.cast(), objectMap: result[27] as Map?, - listMap: (result[28] as Map?) - ?.cast?>(), - mapMap: (result[29] as Map?) - ?.cast?>(), + listMap: (result[28] as Map?)?.map( + (k, v) => MapEntry(k as int?, v as List?), + ), + mapMap: (result[29] as Map?)?.map( + (k, v) => MapEntry(k as int?, v as Map?), + ), recursiveClassMap: (result[30] as Map?) ?.cast(), ); diff --git a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/test_types.dart b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/test_types.dart index 2f24d9bb2e44..eda172ac3432 100644 --- a/packages/pigeon/platform_tests/shared_test_plugin_code/lib/test_types.dart +++ b/packages/pigeon/platform_tests/shared_test_plugin_code/lib/test_types.dart @@ -39,6 +39,8 @@ final List> nonNullListList = >[ nonNullEnumList, ]; +final List> nonNullBoolListList = >[nonNullBoolList]; + final Map nonNullMap = { 'a': 1, 'b': 2.0, @@ -80,6 +82,10 @@ final Map> nonNullListMap = >{ 6: nonNullEnumList, }; +final Map> nonNullBoolListMap = >{ + 0: nonNullBoolList, +}; + final Map> nonNullMapMap = >{ 0: nonNullMap, 1: nonNullStringMap, @@ -98,6 +104,10 @@ final List> nonNullMapList = >[ nonNullEnumMap, ]; +final List> nonNullBoolMapList = >[ + nonNullBoolMap, +]; + final List list = ['Thing 1', 2, true, 3.14, null]; final List stringList = [ @@ -271,7 +281,9 @@ final AllTypes genericAllTypes = AllTypes( enumList: nonNullEnumList, objectList: nonNullList, listList: nonNullListList, + boolListList: nonNullBoolListList, mapList: nonNullMapList, + boolMapList: nonNullBoolMapList, map: nonNullMap, stringMap: nonNullStringMap, intMap: nonNullIntMap, @@ -280,6 +292,7 @@ final AllTypes genericAllTypes = AllTypes( enumMap: nonNullEnumMap, objectMap: nonNullMap, listMap: nonNullListMap, + boolListMap: nonNullBoolListMap, mapMap: nonNullMapMap, ); 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 338a53b8e3b3..530c752c15c4 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 @@ -279,13 +279,16 @@ data class AllTypes( val enumList: List, val objectList: List, val listList: List>, + val boolListList: List>, val mapList: List>, + val boolMapList: List>, val map: Map, val stringMap: Map, val intMap: Map, val enumMap: Map, val objectMap: Map, val listMap: Map>, + val boolListMap: Map>, val mapMap: Map> ) { companion object { @@ -310,14 +313,17 @@ data class AllTypes( val enumList = pigeonVar_list[17] as List val objectList = pigeonVar_list[18] as List val listList = pigeonVar_list[19] as List> - val mapList = pigeonVar_list[20] as List> - val map = pigeonVar_list[21] as Map - val stringMap = pigeonVar_list[22] as Map - val intMap = pigeonVar_list[23] as Map - val enumMap = pigeonVar_list[24] as Map - val objectMap = pigeonVar_list[25] as Map - val listMap = pigeonVar_list[26] as Map> - val mapMap = pigeonVar_list[27] as Map> + val boolListList = pigeonVar_list[20] as List> + val mapList = pigeonVar_list[21] as List> + val boolMapList = pigeonVar_list[22] as List> + val map = pigeonVar_list[23] as Map + val stringMap = pigeonVar_list[24] as Map + val intMap = pigeonVar_list[25] as Map + val enumMap = pigeonVar_list[26] as Map + val objectMap = pigeonVar_list[27] as Map + val listMap = pigeonVar_list[28] as Map> + val boolListMap = pigeonVar_list[29] as Map> + val mapMap = pigeonVar_list[30] as Map> return AllTypes( aBool, anInt, @@ -339,13 +345,16 @@ data class AllTypes( enumList, objectList, listList, + boolListList, mapList, + boolMapList, map, stringMap, intMap, enumMap, objectMap, listMap, + boolListMap, mapMap) } } @@ -372,13 +381,16 @@ data class AllTypes( enumList, objectList, listList, + boolListList, mapList, + boolMapList, map, stringMap, intMap, enumMap, objectMap, listMap, + boolListMap, mapMap, ) } @@ -411,13 +423,16 @@ data class AllTypes( CoreTestsPigeonUtils.deepEquals(this.enumList, other.enumList) && CoreTestsPigeonUtils.deepEquals(this.objectList, other.objectList) && CoreTestsPigeonUtils.deepEquals(this.listList, other.listList) && + CoreTestsPigeonUtils.deepEquals(this.boolListList, other.boolListList) && CoreTestsPigeonUtils.deepEquals(this.mapList, other.mapList) && + CoreTestsPigeonUtils.deepEquals(this.boolMapList, other.boolMapList) && CoreTestsPigeonUtils.deepEquals(this.map, other.map) && CoreTestsPigeonUtils.deepEquals(this.stringMap, other.stringMap) && CoreTestsPigeonUtils.deepEquals(this.intMap, other.intMap) && CoreTestsPigeonUtils.deepEquals(this.enumMap, other.enumMap) && CoreTestsPigeonUtils.deepEquals(this.objectMap, other.objectMap) && CoreTestsPigeonUtils.deepEquals(this.listMap, other.listMap) && + CoreTestsPigeonUtils.deepEquals(this.boolListMap, other.boolListMap) && CoreTestsPigeonUtils.deepEquals(this.mapMap, other.mapMap) } @@ -443,13 +458,16 @@ data class AllTypes( result = 31 * result + CoreTestsPigeonUtils.deepHash(this.enumList) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.objectList) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.listList) + result = 31 * result + CoreTestsPigeonUtils.deepHash(this.boolListList) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.mapList) + result = 31 * result + CoreTestsPigeonUtils.deepHash(this.boolMapList) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.map) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.stringMap) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.intMap) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.enumMap) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.objectMap) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.listMap) + result = 31 * result + CoreTestsPigeonUtils.deepHash(this.boolListMap) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.mapMap) return result } @@ -482,6 +500,7 @@ data class AllNullableTypes( val enumList: List? = null, val objectList: List? = null, val listList: List?>? = null, + val boolListList: List?>? = null, val mapList: List?>? = null, val recursiveClassList: List? = null, val map: Map? = null, @@ -490,6 +509,7 @@ data class AllNullableTypes( val enumMap: Map? = null, val objectMap: Map? = null, val listMap: Map?>? = null, + val boolListMap: Map?>? = null, val mapMap: Map?>? = null, val recursiveClassMap: Map? = null ) { @@ -516,16 +536,18 @@ data class AllNullableTypes( val enumList = pigeonVar_list[18] as List? val objectList = pigeonVar_list[19] as List? val listList = pigeonVar_list[20] as List?>? - val mapList = pigeonVar_list[21] as List?>? - val recursiveClassList = pigeonVar_list[22] as List? - val map = pigeonVar_list[23] as Map? - val stringMap = pigeonVar_list[24] as Map? - val intMap = pigeonVar_list[25] as Map? - val enumMap = pigeonVar_list[26] as Map? - val objectMap = pigeonVar_list[27] as Map? - val listMap = pigeonVar_list[28] as Map?>? - val mapMap = pigeonVar_list[29] as Map?>? - val recursiveClassMap = pigeonVar_list[30] as Map? + val boolListList = pigeonVar_list[21] as List?>? + val mapList = pigeonVar_list[22] as List?>? + val recursiveClassList = pigeonVar_list[23] as List? + val map = pigeonVar_list[24] as Map? + val stringMap = pigeonVar_list[25] as Map? + val intMap = pigeonVar_list[26] as Map? + val enumMap = pigeonVar_list[27] as Map? + val objectMap = pigeonVar_list[28] as Map? + val listMap = pigeonVar_list[29] as Map?>? + val boolListMap = pigeonVar_list[30] as Map?>? + val mapMap = pigeonVar_list[31] as Map?>? + val recursiveClassMap = pigeonVar_list[32] as Map? return AllNullableTypes( aNullableBool, aNullableInt, @@ -548,6 +570,7 @@ data class AllNullableTypes( enumList, objectList, listList, + boolListList, mapList, recursiveClassList, map, @@ -556,6 +579,7 @@ data class AllNullableTypes( enumMap, objectMap, listMap, + boolListMap, mapMap, recursiveClassMap) } @@ -584,6 +608,7 @@ data class AllNullableTypes( enumList, objectList, listList, + boolListList, mapList, recursiveClassList, map, @@ -592,6 +617,7 @@ data class AllNullableTypes( enumMap, objectMap, listMap, + boolListMap, mapMap, recursiveClassMap, ) @@ -626,6 +652,7 @@ data class AllNullableTypes( CoreTestsPigeonUtils.deepEquals(this.enumList, other.enumList) && CoreTestsPigeonUtils.deepEquals(this.objectList, other.objectList) && CoreTestsPigeonUtils.deepEquals(this.listList, other.listList) && + CoreTestsPigeonUtils.deepEquals(this.boolListList, other.boolListList) && CoreTestsPigeonUtils.deepEquals(this.mapList, other.mapList) && CoreTestsPigeonUtils.deepEquals(this.recursiveClassList, other.recursiveClassList) && CoreTestsPigeonUtils.deepEquals(this.map, other.map) && @@ -634,6 +661,7 @@ data class AllNullableTypes( CoreTestsPigeonUtils.deepEquals(this.enumMap, other.enumMap) && CoreTestsPigeonUtils.deepEquals(this.objectMap, other.objectMap) && CoreTestsPigeonUtils.deepEquals(this.listMap, other.listMap) && + CoreTestsPigeonUtils.deepEquals(this.boolListMap, other.boolListMap) && CoreTestsPigeonUtils.deepEquals(this.mapMap, other.mapMap) && CoreTestsPigeonUtils.deepEquals(this.recursiveClassMap, other.recursiveClassMap) } @@ -661,6 +689,7 @@ data class AllNullableTypes( result = 31 * result + CoreTestsPigeonUtils.deepHash(this.enumList) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.objectList) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.listList) + result = 31 * result + CoreTestsPigeonUtils.deepHash(this.boolListList) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.mapList) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.recursiveClassList) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.map) @@ -669,6 +698,7 @@ data class AllNullableTypes( result = 31 * result + CoreTestsPigeonUtils.deepHash(this.enumMap) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.objectMap) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.listMap) + result = 31 * result + CoreTestsPigeonUtils.deepHash(this.boolListMap) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.mapMap) result = 31 * result + CoreTestsPigeonUtils.deepHash(this.recursiveClassMap) return result @@ -1107,6 +1137,8 @@ interface HostIntegrationCoreApi { fun echoNonNullEnumList(enumList: List): List /** Returns the passed list, to test serialization and deserialization. */ fun echoNonNullClassList(classList: List): List + /** Returns the passed list, to test serialization and deserialization. */ + fun echoNonNullBoolListList(list: List>): List> /** Returns the passed map, to test serialization and deserialization. */ fun echoMap(map: Map): Map /** Returns the passed map, to test serialization and deserialization. */ @@ -1905,6 +1937,28 @@ interface HostIntegrationCoreApi { channel.setMessageHandler(null) } } + run { + val channel = + BasicMessageChannel( + binaryMessenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi.echoNonNullBoolListList$separatedMessageChannelSuffix", + codec) + if (api != null) { + channel.setMessageHandler { message, reply -> + val args = message as List + val listArg = args[0] as List> + val wrapped: List = + try { + listOf(api.echoNonNullBoolListList(listArg)) + } catch (exception: Throwable) { + CoreTestsPigeonUtils.wrapError(exception) + } + reply.reply(wrapped) + } + } else { + channel.setMessageHandler(null) + } + } run { val channel = BasicMessageChannel( diff --git a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/CoreTests.gen.swift b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/CoreTests.gen.swift index 606d58783837..01d5bbecba6a 100644 --- a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/CoreTests.gen.swift +++ b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/CoreTests.gen.swift @@ -249,13 +249,16 @@ struct AllTypes: Hashable { var enumList: [AnEnum] var objectList: [Any] var listList: [[Any?]] + var boolListList: [[Bool]] var mapList: [[AnyHashable?: Any?]] + var boolMapList: [[Int64: Bool]] var map: [AnyHashable?: Any?] var stringMap: [String: String] var intMap: [Int64: Int64] var enumMap: [AnEnum: AnEnum] var objectMap: [AnyHashable: Any] var listMap: [Int64: [Any?]] + var boolListMap: [Int64: [Bool]] var mapMap: [Int64: [AnyHashable?: Any?]] // swift-format-ignore: AlwaysUseLowerCamelCase @@ -280,14 +283,17 @@ struct AllTypes: Hashable { let enumList = pigeonVar_list[17] as! [AnEnum] let objectList = pigeonVar_list[18] as! [Any] let listList = pigeonVar_list[19] as! [[Any?]] - let mapList = pigeonVar_list[20] as! [[AnyHashable?: Any?]] - let map = pigeonVar_list[21] as! [AnyHashable?: Any?] - let stringMap = pigeonVar_list[22] as! [String: String] - let intMap = pigeonVar_list[23] as! [Int64: Int64] - let enumMap = pigeonVar_list[24] as? [AnEnum: AnEnum] - let objectMap = pigeonVar_list[25] as! [AnyHashable: Any] - let listMap = pigeonVar_list[26] as! [Int64: [Any?]] - let mapMap = pigeonVar_list[27] as! [Int64: [AnyHashable?: Any?]] + let boolListList = pigeonVar_list[20] as! [[Bool]] + let mapList = pigeonVar_list[21] as! [[AnyHashable?: Any?]] + let boolMapList = pigeonVar_list[22] as! [[Int64: Bool]] + let map = pigeonVar_list[23] as! [AnyHashable?: Any?] + let stringMap = pigeonVar_list[24] as! [String: String] + let intMap = pigeonVar_list[25] as! [Int64: Int64] + let enumMap = pigeonVar_list[26] as? [AnEnum: AnEnum] + let objectMap = pigeonVar_list[27] as! [AnyHashable: Any] + let listMap = pigeonVar_list[28] as! [Int64: [Any?]] + let boolListMap = pigeonVar_list[29] as! [Int64: [Bool]] + let mapMap = pigeonVar_list[30] as! [Int64: [AnyHashable?: Any?]] return AllTypes( aBool: aBool, @@ -310,13 +316,16 @@ struct AllTypes: Hashable { enumList: enumList, objectList: objectList, listList: listList, + boolListList: boolListList, mapList: mapList, + boolMapList: boolMapList, map: map, stringMap: stringMap, intMap: intMap, enumMap: enumMap!, objectMap: objectMap, listMap: listMap, + boolListMap: boolListMap, mapMap: mapMap ) } @@ -342,13 +351,16 @@ struct AllTypes: Hashable { enumList, objectList, listList, + boolListList, mapList, + boolMapList, map, stringMap, intMap, enumMap, objectMap, listMap, + boolListMap, mapMap, ] } @@ -374,12 +386,15 @@ struct AllTypes: Hashable { && deepEqualsCoreTests(lhs.enumList, rhs.enumList) && deepEqualsCoreTests(lhs.objectList, rhs.objectList) && deepEqualsCoreTests(lhs.listList, rhs.listList) - && deepEqualsCoreTests(lhs.mapList, rhs.mapList) && deepEqualsCoreTests(lhs.map, rhs.map) - && deepEqualsCoreTests(lhs.stringMap, rhs.stringMap) + && deepEqualsCoreTests(lhs.boolListList, rhs.boolListList) + && deepEqualsCoreTests(lhs.mapList, rhs.mapList) + && deepEqualsCoreTests(lhs.boolMapList, rhs.boolMapList) + && deepEqualsCoreTests(lhs.map, rhs.map) && deepEqualsCoreTests(lhs.stringMap, rhs.stringMap) && deepEqualsCoreTests(lhs.intMap, rhs.intMap) && deepEqualsCoreTests(lhs.enumMap, rhs.enumMap) && deepEqualsCoreTests(lhs.objectMap, rhs.objectMap) && deepEqualsCoreTests(lhs.listMap, rhs.listMap) + && deepEqualsCoreTests(lhs.boolListMap, rhs.boolListMap) && deepEqualsCoreTests(lhs.mapMap, rhs.mapMap) } @@ -405,13 +420,16 @@ struct AllTypes: Hashable { deepHashCoreTests(value: enumList, hasher: &hasher) deepHashCoreTests(value: objectList, hasher: &hasher) deepHashCoreTests(value: listList, hasher: &hasher) + deepHashCoreTests(value: boolListList, hasher: &hasher) deepHashCoreTests(value: mapList, hasher: &hasher) + deepHashCoreTests(value: boolMapList, hasher: &hasher) deepHashCoreTests(value: map, hasher: &hasher) deepHashCoreTests(value: stringMap, hasher: &hasher) deepHashCoreTests(value: intMap, hasher: &hasher) deepHashCoreTests(value: enumMap, hasher: &hasher) deepHashCoreTests(value: objectMap, hasher: &hasher) deepHashCoreTests(value: listMap, hasher: &hasher) + deepHashCoreTests(value: boolListMap, hasher: &hasher) deepHashCoreTests(value: mapMap, hasher: &hasher) } } @@ -442,6 +460,7 @@ class AllNullableTypes: Hashable { enumList: [AnEnum?]? = nil, objectList: [Any?]? = nil, listList: [[Any?]?]? = nil, + boolListList: [[Bool?]?]? = nil, mapList: [[AnyHashable?: Any?]?]? = nil, recursiveClassList: [AllNullableTypes?]? = nil, map: [AnyHashable?: Any?]? = nil, @@ -450,6 +469,7 @@ class AllNullableTypes: Hashable { enumMap: [AnEnum?: AnEnum?]? = nil, objectMap: [AnyHashable?: Any?]? = nil, listMap: [Int64?: [Any?]?]? = nil, + boolListMap: [Int64?: [Bool?]?]? = nil, mapMap: [Int64?: [AnyHashable?: Any?]?]? = nil, recursiveClassMap: [Int64?: AllNullableTypes?]? = nil ) { @@ -474,6 +494,7 @@ class AllNullableTypes: Hashable { self.enumList = enumList self.objectList = objectList self.listList = listList + self.boolListList = boolListList self.mapList = mapList self.recursiveClassList = recursiveClassList self.map = map @@ -482,6 +503,7 @@ class AllNullableTypes: Hashable { self.enumMap = enumMap self.objectMap = objectMap self.listMap = listMap + self.boolListMap = boolListMap self.mapMap = mapMap self.recursiveClassMap = recursiveClassMap } @@ -506,6 +528,7 @@ class AllNullableTypes: Hashable { var enumList: [AnEnum?]? var objectList: [Any?]? var listList: [[Any?]?]? + var boolListList: [[Bool?]?]? var mapList: [[AnyHashable?: Any?]?]? var recursiveClassList: [AllNullableTypes?]? var map: [AnyHashable?: Any?]? @@ -514,6 +537,7 @@ class AllNullableTypes: Hashable { var enumMap: [AnEnum?: AnEnum?]? var objectMap: [AnyHashable?: Any?]? var listMap: [Int64?: [Any?]?]? + var boolListMap: [Int64?: [Bool?]?]? var mapMap: [Int64?: [AnyHashable?: Any?]?]? var recursiveClassMap: [Int64?: AllNullableTypes?]? @@ -540,16 +564,18 @@ class AllNullableTypes: Hashable { let enumList: [AnEnum?]? = nilOrValue(pigeonVar_list[18]) let objectList: [Any?]? = nilOrValue(pigeonVar_list[19]) let listList: [[Any?]?]? = nilOrValue(pigeonVar_list[20]) - let mapList: [[AnyHashable?: Any?]?]? = nilOrValue(pigeonVar_list[21]) - let recursiveClassList: [AllNullableTypes?]? = nilOrValue(pigeonVar_list[22]) - let map: [AnyHashable?: Any?]? = nilOrValue(pigeonVar_list[23]) - let stringMap: [String?: String?]? = nilOrValue(pigeonVar_list[24]) - let intMap: [Int64?: Int64?]? = nilOrValue(pigeonVar_list[25]) - let enumMap: [AnEnum?: AnEnum?]? = pigeonVar_list[26] as? [AnEnum?: AnEnum?] - let objectMap: [AnyHashable?: Any?]? = nilOrValue(pigeonVar_list[27]) - let listMap: [Int64?: [Any?]?]? = nilOrValue(pigeonVar_list[28]) - let mapMap: [Int64?: [AnyHashable?: Any?]?]? = nilOrValue(pigeonVar_list[29]) - let recursiveClassMap: [Int64?: AllNullableTypes?]? = nilOrValue(pigeonVar_list[30]) + let boolListList: [[Bool?]?]? = nilOrValue(pigeonVar_list[21]) + let mapList: [[AnyHashable?: Any?]?]? = nilOrValue(pigeonVar_list[22]) + let recursiveClassList: [AllNullableTypes?]? = nilOrValue(pigeonVar_list[23]) + let map: [AnyHashable?: Any?]? = nilOrValue(pigeonVar_list[24]) + let stringMap: [String?: String?]? = nilOrValue(pigeonVar_list[25]) + let intMap: [Int64?: Int64?]? = nilOrValue(pigeonVar_list[26]) + let enumMap: [AnEnum?: AnEnum?]? = pigeonVar_list[27] as? [AnEnum?: AnEnum?] + let objectMap: [AnyHashable?: Any?]? = nilOrValue(pigeonVar_list[28]) + let listMap: [Int64?: [Any?]?]? = nilOrValue(pigeonVar_list[29]) + let boolListMap: [Int64?: [Bool?]?]? = nilOrValue(pigeonVar_list[30]) + let mapMap: [Int64?: [AnyHashable?: Any?]?]? = nilOrValue(pigeonVar_list[31]) + let recursiveClassMap: [Int64?: AllNullableTypes?]? = nilOrValue(pigeonVar_list[32]) return AllNullableTypes( aNullableBool: aNullableBool, @@ -573,6 +599,7 @@ class AllNullableTypes: Hashable { enumList: enumList, objectList: objectList, listList: listList, + boolListList: boolListList, mapList: mapList, recursiveClassList: recursiveClassList, map: map, @@ -581,6 +608,7 @@ class AllNullableTypes: Hashable { enumMap: enumMap, objectMap: objectMap, listMap: listMap, + boolListMap: boolListMap, mapMap: mapMap, recursiveClassMap: recursiveClassMap ) @@ -608,6 +636,7 @@ class AllNullableTypes: Hashable { enumList, objectList, listList, + boolListList, mapList, recursiveClassList, map, @@ -616,6 +645,7 @@ class AllNullableTypes: Hashable { enumMap, objectMap, listMap, + boolListMap, mapMap, recursiveClassMap, ] @@ -648,6 +678,7 @@ class AllNullableTypes: Hashable { && deepEqualsCoreTests(lhs.enumList, rhs.enumList) && deepEqualsCoreTests(lhs.objectList, rhs.objectList) && deepEqualsCoreTests(lhs.listList, rhs.listList) + && deepEqualsCoreTests(lhs.boolListList, rhs.boolListList) && deepEqualsCoreTests(lhs.mapList, rhs.mapList) && deepEqualsCoreTests(lhs.recursiveClassList, rhs.recursiveClassList) && deepEqualsCoreTests(lhs.map, rhs.map) && deepEqualsCoreTests(lhs.stringMap, rhs.stringMap) @@ -655,6 +686,7 @@ class AllNullableTypes: Hashable { && deepEqualsCoreTests(lhs.enumMap, rhs.enumMap) && deepEqualsCoreTests(lhs.objectMap, rhs.objectMap) && deepEqualsCoreTests(lhs.listMap, rhs.listMap) + && deepEqualsCoreTests(lhs.boolListMap, rhs.boolListMap) && deepEqualsCoreTests(lhs.mapMap, rhs.mapMap) && deepEqualsCoreTests(lhs.recursiveClassMap, rhs.recursiveClassMap) } @@ -682,6 +714,7 @@ class AllNullableTypes: Hashable { deepHashCoreTests(value: enumList, hasher: &hasher) deepHashCoreTests(value: objectList, hasher: &hasher) deepHashCoreTests(value: listList, hasher: &hasher) + deepHashCoreTests(value: boolListList, hasher: &hasher) deepHashCoreTests(value: mapList, hasher: &hasher) deepHashCoreTests(value: recursiveClassList, hasher: &hasher) deepHashCoreTests(value: map, hasher: &hasher) @@ -690,6 +723,7 @@ class AllNullableTypes: Hashable { deepHashCoreTests(value: enumMap, hasher: &hasher) deepHashCoreTests(value: objectMap, hasher: &hasher) deepHashCoreTests(value: listMap, hasher: &hasher) + deepHashCoreTests(value: boolListMap, hasher: &hasher) deepHashCoreTests(value: mapMap, hasher: &hasher) deepHashCoreTests(value: recursiveClassMap, hasher: &hasher) } @@ -1116,6 +1150,8 @@ protocol HostIntegrationCoreApi { func echoNonNull(enumList: [AnEnum]) throws -> [AnEnum] /// Returns the passed list, to test serialization and deserialization. func echoNonNull(classList: [AllNullableTypes]) throws -> [AllNullableTypes] + /// Returns the passed list, to test serialization and deserialization. + func echoNonNull(boolListList list: [[Bool]]) throws -> [[Bool]] /// Returns the passed map, to test serialization and deserialization. func echo(_ map: [AnyHashable?: Any?]) throws -> [AnyHashable?: Any?] /// Returns the passed map, to test serialization and deserialization. @@ -1760,6 +1796,25 @@ class HostIntegrationCoreApiSetup { } else { echoNonNullClassListChannel.setMessageHandler(nil) } + /// Returns the passed list, to test serialization and deserialization. + let echoNonNullBoolListListChannel = FlutterBasicMessageChannel( + name: + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi.echoNonNullBoolListList\(channelSuffix)", + binaryMessenger: binaryMessenger, codec: codec) + if let api = api { + echoNonNullBoolListListChannel.setMessageHandler { message, reply in + let args = message as! [Any?] + let listArg = args[0] as! [[Bool]] + do { + let result = try api.echoNonNull(boolListList: listArg) + reply(wrapResult(result)) + } catch { + reply(wrapError(error)) + } + } + } else { + echoNonNullBoolListListChannel.setMessageHandler(nil) + } /// Returns the passed map, to test serialization and deserialization. let echoMapChannel = FlutterBasicMessageChannel( name: diff --git a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/TestPlugin.swift b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/TestPlugin.swift index 89d25d32f58e..dea6ac7bb2fb 100644 --- a/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/TestPlugin.swift +++ b/packages/pigeon/platform_tests/test_plugin/darwin/test_plugin/Sources/test_plugin/TestPlugin.swift @@ -148,6 +148,10 @@ public class TestPlugin: NSObject, FlutterPlugin, HostIntegrationCoreApi { return classList } + func echoNonNull(boolListList: [[Bool]]) throws -> [[Bool]] { + return boolListList + } + func echo(_ map: [AnyHashable?: Any?]) throws -> [AnyHashable?: Any?] { return map } diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc index 023cd1ed85db..d0add334369f 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.cc @@ -309,13 +309,16 @@ struct _CoreTestsPigeonTestAllTypes { FlValue* enum_list; FlValue* object_list; FlValue* list_list; + FlValue* bool_list_list; FlValue* map_list; + FlValue* bool_map_list; FlValue* map; FlValue* string_map; FlValue* int_map; FlValue* enum_map; FlValue* object_map; FlValue* list_map; + FlValue* bool_list_map; FlValue* map_map; }; @@ -334,13 +337,16 @@ static void core_tests_pigeon_test_all_types_dispose(GObject* object) { g_clear_pointer(&self->enum_list, fl_value_unref); g_clear_pointer(&self->object_list, fl_value_unref); g_clear_pointer(&self->list_list, fl_value_unref); + g_clear_pointer(&self->bool_list_list, fl_value_unref); g_clear_pointer(&self->map_list, fl_value_unref); + g_clear_pointer(&self->bool_map_list, fl_value_unref); g_clear_pointer(&self->map, fl_value_unref); g_clear_pointer(&self->string_map, fl_value_unref); g_clear_pointer(&self->int_map, fl_value_unref); g_clear_pointer(&self->enum_map, fl_value_unref); g_clear_pointer(&self->object_map, fl_value_unref); g_clear_pointer(&self->list_map, fl_value_unref); + g_clear_pointer(&self->bool_list_map, fl_value_unref); g_clear_pointer(&self->map_map, fl_value_unref); G_OBJECT_CLASS(core_tests_pigeon_test_all_types_parent_class) ->dispose(object); @@ -364,9 +370,11 @@ CoreTestsPigeonTestAllTypes* core_tests_pigeon_test_all_types_new( CoreTestsPigeonTestAnotherEnum another_enum, const gchar* a_string, FlValue* an_object, FlValue* list, FlValue* string_list, FlValue* int_list, FlValue* double_list, FlValue* bool_list, FlValue* enum_list, - FlValue* object_list, FlValue* list_list, FlValue* map_list, FlValue* map, + FlValue* object_list, FlValue* list_list, FlValue* bool_list_list, + FlValue* map_list, FlValue* bool_map_list, FlValue* map, FlValue* string_map, FlValue* int_map, FlValue* enum_map, - FlValue* object_map, FlValue* list_map, FlValue* map_map) { + FlValue* object_map, FlValue* list_map, FlValue* bool_list_map, + FlValue* map_map) { CoreTestsPigeonTestAllTypes* self = CORE_TESTS_PIGEON_TEST_ALL_TYPES( g_object_new(core_tests_pigeon_test_all_types_get_type(), nullptr)); self->a_bool = a_bool; @@ -400,13 +408,16 @@ CoreTestsPigeonTestAllTypes* core_tests_pigeon_test_all_types_new( self->enum_list = fl_value_ref(enum_list); self->object_list = fl_value_ref(object_list); self->list_list = fl_value_ref(list_list); + self->bool_list_list = fl_value_ref(bool_list_list); self->map_list = fl_value_ref(map_list); + self->bool_map_list = fl_value_ref(bool_map_list); self->map = fl_value_ref(map); self->string_map = fl_value_ref(string_map); self->int_map = fl_value_ref(int_map); self->enum_map = fl_value_ref(enum_map); self->object_map = fl_value_ref(object_map); self->list_map = fl_value_ref(list_map); + self->bool_list_map = fl_value_ref(bool_list_map); self->map_map = fl_value_ref(map_map); return self; } @@ -538,12 +549,24 @@ FlValue* core_tests_pigeon_test_all_types_get_list_list( return self->list_list; } +FlValue* core_tests_pigeon_test_all_types_get_bool_list_list( + CoreTestsPigeonTestAllTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); + return self->bool_list_list; +} + FlValue* core_tests_pigeon_test_all_types_get_map_list( CoreTestsPigeonTestAllTypes* self) { g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); return self->map_list; } +FlValue* core_tests_pigeon_test_all_types_get_bool_map_list( + CoreTestsPigeonTestAllTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); + return self->bool_map_list; +} + FlValue* core_tests_pigeon_test_all_types_get_map( CoreTestsPigeonTestAllTypes* self) { g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); @@ -580,6 +603,12 @@ FlValue* core_tests_pigeon_test_all_types_get_list_map( return self->list_map; } +FlValue* core_tests_pigeon_test_all_types_get_bool_list_map( + CoreTestsPigeonTestAllTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); + return self->bool_list_map; +} + FlValue* core_tests_pigeon_test_all_types_get_map_map( CoreTestsPigeonTestAllTypes* self) { g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_TYPES(self), nullptr); @@ -623,13 +652,16 @@ static FlValue* core_tests_pigeon_test_all_types_to_list( fl_value_append_take(values, fl_value_ref(self->enum_list)); fl_value_append_take(values, fl_value_ref(self->object_list)); fl_value_append_take(values, fl_value_ref(self->list_list)); + fl_value_append_take(values, fl_value_ref(self->bool_list_list)); fl_value_append_take(values, fl_value_ref(self->map_list)); + fl_value_append_take(values, fl_value_ref(self->bool_map_list)); fl_value_append_take(values, fl_value_ref(self->map)); fl_value_append_take(values, fl_value_ref(self->string_map)); fl_value_append_take(values, fl_value_ref(self->int_map)); fl_value_append_take(values, fl_value_ref(self->enum_map)); fl_value_append_take(values, fl_value_ref(self->object_map)); fl_value_append_take(values, fl_value_ref(self->list_map)); + fl_value_append_take(values, fl_value_ref(self->bool_list_map)); fl_value_append_take(values, fl_value_ref(self->map_map)); return values; } @@ -686,28 +718,35 @@ core_tests_pigeon_test_all_types_new_from_list(FlValue* values) { FlValue* value19 = fl_value_get_list_value(values, 19); FlValue* list_list = value19; FlValue* value20 = fl_value_get_list_value(values, 20); - FlValue* map_list = value20; + FlValue* bool_list_list = value20; FlValue* value21 = fl_value_get_list_value(values, 21); - FlValue* map = value21; + FlValue* map_list = value21; FlValue* value22 = fl_value_get_list_value(values, 22); - FlValue* string_map = value22; + FlValue* bool_map_list = value22; FlValue* value23 = fl_value_get_list_value(values, 23); - FlValue* int_map = value23; + FlValue* map = value23; FlValue* value24 = fl_value_get_list_value(values, 24); - FlValue* enum_map = value24; + FlValue* string_map = value24; FlValue* value25 = fl_value_get_list_value(values, 25); - FlValue* object_map = value25; + FlValue* int_map = value25; FlValue* value26 = fl_value_get_list_value(values, 26); - FlValue* list_map = value26; + FlValue* enum_map = value26; FlValue* value27 = fl_value_get_list_value(values, 27); - FlValue* map_map = value27; + FlValue* object_map = value27; + FlValue* value28 = fl_value_get_list_value(values, 28); + FlValue* list_map = value28; + FlValue* value29 = fl_value_get_list_value(values, 29); + FlValue* bool_list_map = value29; + FlValue* value30 = fl_value_get_list_value(values, 30); + FlValue* map_map = value30; return core_tests_pigeon_test_all_types_new( a_bool, an_int, an_int64, a_double, a_byte_array, a_byte_array_length, a4_byte_array, a4_byte_array_length, a8_byte_array, a8_byte_array_length, a_float_array, a_float_array_length, an_enum, another_enum, a_string, an_object, list, string_list, int_list, double_list, bool_list, enum_list, - object_list, list_list, map_list, map, string_map, int_map, enum_map, - object_map, list_map, map_map); + object_list, list_list, bool_list_list, map_list, bool_map_list, map, + string_map, int_map, enum_map, object_map, list_map, bool_list_map, + map_map); } gboolean core_tests_pigeon_test_all_types_equals( @@ -815,9 +854,15 @@ gboolean core_tests_pigeon_test_all_types_equals( if (!flpigeon_deep_equals(a->list_list, b->list_list)) { return FALSE; } + if (!flpigeon_deep_equals(a->bool_list_list, b->bool_list_list)) { + return FALSE; + } if (!flpigeon_deep_equals(a->map_list, b->map_list)) { return FALSE; } + if (!flpigeon_deep_equals(a->bool_map_list, b->bool_map_list)) { + return FALSE; + } if (!flpigeon_deep_equals(a->map, b->map)) { return FALSE; } @@ -836,6 +881,9 @@ gboolean core_tests_pigeon_test_all_types_equals( if (!flpigeon_deep_equals(a->list_map, b->list_map)) { return FALSE; } + if (!flpigeon_deep_equals(a->bool_list_map, b->bool_list_map)) { + return FALSE; + } if (!flpigeon_deep_equals(a->map_map, b->map_map)) { return FALSE; } @@ -898,13 +946,16 @@ guint core_tests_pigeon_test_all_types_hash(CoreTestsPigeonTestAllTypes* self) { result = result * 31 + flpigeon_deep_hash(self->enum_list); result = result * 31 + flpigeon_deep_hash(self->object_list); result = result * 31 + flpigeon_deep_hash(self->list_list); + result = result * 31 + flpigeon_deep_hash(self->bool_list_list); result = result * 31 + flpigeon_deep_hash(self->map_list); + result = result * 31 + flpigeon_deep_hash(self->bool_map_list); result = result * 31 + flpigeon_deep_hash(self->map); result = result * 31 + flpigeon_deep_hash(self->string_map); result = result * 31 + flpigeon_deep_hash(self->int_map); result = result * 31 + flpigeon_deep_hash(self->enum_map); result = result * 31 + flpigeon_deep_hash(self->object_map); result = result * 31 + flpigeon_deep_hash(self->list_map); + result = result * 31 + flpigeon_deep_hash(self->bool_list_map); result = result * 31 + flpigeon_deep_hash(self->map_map); return result; } @@ -937,6 +988,7 @@ struct _CoreTestsPigeonTestAllNullableTypes { FlValue* enum_list; FlValue* object_list; FlValue* list_list; + FlValue* bool_list_list; FlValue* map_list; FlValue* recursive_class_list; FlValue* map; @@ -945,6 +997,7 @@ struct _CoreTestsPigeonTestAllNullableTypes { FlValue* enum_map; FlValue* object_map; FlValue* list_map; + FlValue* bool_list_map; FlValue* map_map; FlValue* recursive_class_map; }; @@ -972,6 +1025,7 @@ static void core_tests_pigeon_test_all_nullable_types_dispose(GObject* object) { g_clear_pointer(&self->enum_list, fl_value_unref); g_clear_pointer(&self->object_list, fl_value_unref); g_clear_pointer(&self->list_list, fl_value_unref); + g_clear_pointer(&self->bool_list_list, fl_value_unref); g_clear_pointer(&self->map_list, fl_value_unref); g_clear_pointer(&self->recursive_class_list, fl_value_unref); g_clear_pointer(&self->map, fl_value_unref); @@ -980,6 +1034,7 @@ static void core_tests_pigeon_test_all_nullable_types_dispose(GObject* object) { g_clear_pointer(&self->enum_map, fl_value_unref); g_clear_pointer(&self->object_map, fl_value_unref); g_clear_pointer(&self->list_map, fl_value_unref); + g_clear_pointer(&self->bool_list_map, fl_value_unref); g_clear_pointer(&self->map_map, fl_value_unref); g_clear_pointer(&self->recursive_class_map, fl_value_unref); G_OBJECT_CLASS(core_tests_pigeon_test_all_nullable_types_parent_class) @@ -1009,10 +1064,10 @@ core_tests_pigeon_test_all_nullable_types_new( CoreTestsPigeonTestAllNullableTypes* all_nullable_types, FlValue* list, FlValue* string_list, FlValue* int_list, FlValue* double_list, FlValue* bool_list, FlValue* enum_list, FlValue* object_list, - FlValue* list_list, FlValue* map_list, FlValue* recursive_class_list, - FlValue* map, FlValue* string_map, FlValue* int_map, FlValue* enum_map, - FlValue* object_map, FlValue* list_map, FlValue* map_map, - FlValue* recursive_class_map) { + FlValue* list_list, FlValue* bool_list_list, FlValue* map_list, + FlValue* recursive_class_list, FlValue* map, FlValue* string_map, + FlValue* int_map, FlValue* enum_map, FlValue* object_map, FlValue* list_map, + FlValue* bool_list_map, FlValue* map_map, FlValue* recursive_class_map) { CoreTestsPigeonTestAllNullableTypes* self = CORE_TESTS_PIGEON_TEST_ALL_NULLABLE_TYPES(g_object_new( core_tests_pigeon_test_all_nullable_types_get_type(), nullptr)); @@ -1149,6 +1204,11 @@ core_tests_pigeon_test_all_nullable_types_new( } else { self->list_list = nullptr; } + if (bool_list_list != nullptr) { + self->bool_list_list = fl_value_ref(bool_list_list); + } else { + self->bool_list_list = nullptr; + } if (map_list != nullptr) { self->map_list = fl_value_ref(map_list); } else { @@ -1189,6 +1249,11 @@ core_tests_pigeon_test_all_nullable_types_new( } else { self->list_map = nullptr; } + if (bool_list_map != nullptr) { + self->bool_list_map = fl_value_ref(bool_list_map); + } else { + self->bool_list_map = nullptr; + } if (map_map != nullptr) { self->map_map = fl_value_ref(map_map); } else { @@ -1360,6 +1425,13 @@ FlValue* core_tests_pigeon_test_all_nullable_types_get_list_list( return self->list_list; } +FlValue* core_tests_pigeon_test_all_nullable_types_get_bool_list_list( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->bool_list_list; +} + FlValue* core_tests_pigeon_test_all_nullable_types_get_map_list( CoreTestsPigeonTestAllNullableTypes* self) { g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), @@ -1416,6 +1488,13 @@ FlValue* core_tests_pigeon_test_all_nullable_types_get_list_map( return self->list_map; } +FlValue* core_tests_pigeon_test_all_nullable_types_get_bool_list_map( + CoreTestsPigeonTestAllNullableTypes* self) { + g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), + nullptr); + return self->bool_list_map; +} + FlValue* core_tests_pigeon_test_all_nullable_types_get_map_map( CoreTestsPigeonTestAllNullableTypes* self) { g_return_val_if_fail(CORE_TESTS_PIGEON_TEST_IS_ALL_NULLABLE_TYPES(self), @@ -1516,6 +1595,9 @@ static FlValue* core_tests_pigeon_test_all_nullable_types_to_list( fl_value_append_take(values, self->list_list != nullptr ? fl_value_ref(self->list_list) : fl_value_new_null()); + fl_value_append_take(values, self->bool_list_list != nullptr + ? fl_value_ref(self->bool_list_list) + : fl_value_new_null()); fl_value_append_take(values, self->map_list != nullptr ? fl_value_ref(self->map_list) : fl_value_new_null()); @@ -1539,6 +1621,9 @@ static FlValue* core_tests_pigeon_test_all_nullable_types_to_list( fl_value_append_take(values, self->list_map != nullptr ? fl_value_ref(self->list_map) : fl_value_new_null()); + fl_value_append_take(values, self->bool_list_map != nullptr + ? fl_value_ref(self->bool_list_map) + : fl_value_new_null()); fl_value_append_take(values, self->map_map != nullptr ? fl_value_ref(self->map_map) : fl_value_new_null()); @@ -1681,54 +1766,64 @@ core_tests_pigeon_test_all_nullable_types_new_from_list(FlValue* values) { list_list = value20; } FlValue* value21 = fl_value_get_list_value(values, 21); - FlValue* map_list = nullptr; + FlValue* bool_list_list = nullptr; if (fl_value_get_type(value21) != FL_VALUE_TYPE_NULL) { - map_list = value21; + bool_list_list = value21; } FlValue* value22 = fl_value_get_list_value(values, 22); - FlValue* recursive_class_list = nullptr; + FlValue* map_list = nullptr; if (fl_value_get_type(value22) != FL_VALUE_TYPE_NULL) { - recursive_class_list = value22; + map_list = value22; } FlValue* value23 = fl_value_get_list_value(values, 23); - FlValue* map = nullptr; + FlValue* recursive_class_list = nullptr; if (fl_value_get_type(value23) != FL_VALUE_TYPE_NULL) { - map = value23; + recursive_class_list = value23; } FlValue* value24 = fl_value_get_list_value(values, 24); - FlValue* string_map = nullptr; + FlValue* map = nullptr; if (fl_value_get_type(value24) != FL_VALUE_TYPE_NULL) { - string_map = value24; + map = value24; } FlValue* value25 = fl_value_get_list_value(values, 25); - FlValue* int_map = nullptr; + FlValue* string_map = nullptr; if (fl_value_get_type(value25) != FL_VALUE_TYPE_NULL) { - int_map = value25; + string_map = value25; } FlValue* value26 = fl_value_get_list_value(values, 26); - FlValue* enum_map = nullptr; + FlValue* int_map = nullptr; if (fl_value_get_type(value26) != FL_VALUE_TYPE_NULL) { - enum_map = value26; + int_map = value26; } FlValue* value27 = fl_value_get_list_value(values, 27); - FlValue* object_map = nullptr; + FlValue* enum_map = nullptr; if (fl_value_get_type(value27) != FL_VALUE_TYPE_NULL) { - object_map = value27; + enum_map = value27; } FlValue* value28 = fl_value_get_list_value(values, 28); - FlValue* list_map = nullptr; + FlValue* object_map = nullptr; if (fl_value_get_type(value28) != FL_VALUE_TYPE_NULL) { - list_map = value28; + object_map = value28; } FlValue* value29 = fl_value_get_list_value(values, 29); - FlValue* map_map = nullptr; + FlValue* list_map = nullptr; if (fl_value_get_type(value29) != FL_VALUE_TYPE_NULL) { - map_map = value29; + list_map = value29; } FlValue* value30 = fl_value_get_list_value(values, 30); - FlValue* recursive_class_map = nullptr; + FlValue* bool_list_map = nullptr; if (fl_value_get_type(value30) != FL_VALUE_TYPE_NULL) { - recursive_class_map = value30; + bool_list_map = value30; + } + FlValue* value31 = fl_value_get_list_value(values, 31); + FlValue* map_map = nullptr; + if (fl_value_get_type(value31) != FL_VALUE_TYPE_NULL) { + map_map = value31; + } + FlValue* value32 = fl_value_get_list_value(values, 32); + FlValue* recursive_class_map = nullptr; + if (fl_value_get_type(value32) != FL_VALUE_TYPE_NULL) { + recursive_class_map = value32; } return core_tests_pigeon_test_all_nullable_types_new( a_nullable_bool, a_nullable_int, a_nullable_int64, a_nullable_double, @@ -1738,9 +1833,9 @@ core_tests_pigeon_test_all_nullable_types_new_from_list(FlValue* values) { a_nullable_float_array, a_nullable_float_array_length, a_nullable_enum, another_nullable_enum, a_nullable_string, a_nullable_object, all_nullable_types, list, string_list, int_list, double_list, bool_list, - enum_list, object_list, list_list, map_list, recursive_class_list, map, - string_map, int_map, enum_map, object_map, list_map, map_map, - recursive_class_map); + enum_list, object_list, list_list, bool_list_list, map_list, + recursive_class_list, map, string_map, int_map, enum_map, object_map, + list_map, bool_list_map, map_map, recursive_class_map); } gboolean core_tests_pigeon_test_all_nullable_types_equals( @@ -1883,6 +1978,9 @@ gboolean core_tests_pigeon_test_all_nullable_types_equals( if (!flpigeon_deep_equals(a->list_list, b->list_list)) { return FALSE; } + if (!flpigeon_deep_equals(a->bool_list_list, b->bool_list_list)) { + return FALSE; + } if (!flpigeon_deep_equals(a->map_list, b->map_list)) { return FALSE; } @@ -1907,6 +2005,9 @@ gboolean core_tests_pigeon_test_all_nullable_types_equals( if (!flpigeon_deep_equals(a->list_map, b->list_map)) { return FALSE; } + if (!flpigeon_deep_equals(a->bool_list_map, b->bool_list_map)) { + return FALSE; + } if (!flpigeon_deep_equals(a->map_map, b->map_map)) { return FALSE; } @@ -1988,6 +2089,7 @@ guint core_tests_pigeon_test_all_nullable_types_hash( result = result * 31 + flpigeon_deep_hash(self->enum_list); result = result * 31 + flpigeon_deep_hash(self->object_list); result = result * 31 + flpigeon_deep_hash(self->list_list); + result = result * 31 + flpigeon_deep_hash(self->bool_list_list); result = result * 31 + flpigeon_deep_hash(self->map_list); result = result * 31 + flpigeon_deep_hash(self->recursive_class_list); result = result * 31 + flpigeon_deep_hash(self->map); @@ -1996,6 +2098,7 @@ guint core_tests_pigeon_test_all_nullable_types_hash( result = result * 31 + flpigeon_deep_hash(self->enum_map); result = result * 31 + flpigeon_deep_hash(self->object_map); result = result * 31 + flpigeon_deep_hash(self->list_map); + result = result * 31 + flpigeon_deep_hash(self->bool_list_map); result = result * 31 + flpigeon_deep_hash(self->map_map); result = result * 31 + flpigeon_deep_hash(self->recursive_class_map); return result; @@ -4847,6 +4950,73 @@ core_tests_pigeon_test_host_integration_core_api_echo_non_null_class_list_respon return self; } +struct + _CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullBoolListListResponse { + GObject parent_instance; + + FlValue* value; +}; + +G_DEFINE_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullBoolListListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_non_null_bool_list_list_response, + G_TYPE_OBJECT) + +static void +core_tests_pigeon_test_host_integration_core_api_echo_non_null_bool_list_list_response_dispose( + GObject* object) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullBoolListListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NON_NULL_BOOL_LIST_LIST_RESPONSE( + object); + g_clear_pointer(&self->value, fl_value_unref); + G_OBJECT_CLASS( + core_tests_pigeon_test_host_integration_core_api_echo_non_null_bool_list_list_response_parent_class) + ->dispose(object); +} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_non_null_bool_list_list_response_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullBoolListListResponse* + self) {} + +static void +core_tests_pigeon_test_host_integration_core_api_echo_non_null_bool_list_list_response_class_init( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullBoolListListResponseClass* + klass) { + G_OBJECT_CLASS(klass)->dispose = + core_tests_pigeon_test_host_integration_core_api_echo_non_null_bool_list_list_response_dispose; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullBoolListListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_non_null_bool_list_list_response_new( + FlValue* return_value) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullBoolListListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NON_NULL_BOOL_LIST_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_non_null_bool_list_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_ref(return_value)); + return self; +} + +CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullBoolListListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_non_null_bool_list_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details) { + CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullBoolListListResponse* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API_ECHO_NON_NULL_BOOL_LIST_LIST_RESPONSE( + g_object_new( + core_tests_pigeon_test_host_integration_core_api_echo_non_null_bool_list_list_response_get_type(), + nullptr)); + self->value = fl_value_new_list(); + fl_value_append_take(self->value, fl_value_new_string(code)); + fl_value_append_take(self->value, + fl_value_new_string(message != nullptr ? message : "")); + fl_value_append_take(self->value, details != nullptr ? fl_value_ref(details) + : fl_value_new_null()); + return self; +} + struct _CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse { GObject parent_instance; @@ -15467,6 +15637,38 @@ core_tests_pigeon_test_host_integration_core_api_echo_non_null_class_list_cb( } } +static void +core_tests_pigeon_test_host_integration_core_api_echo_non_null_bool_list_list_cb( + FlBasicMessageChannel* channel, FlValue* message_, + FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { + CoreTestsPigeonTestHostIntegrationCoreApi* self = + CORE_TESTS_PIGEON_TEST_HOST_INTEGRATION_CORE_API(user_data); + + if (self->vtable == nullptr || + self->vtable->echo_non_null_bool_list_list == nullptr) { + return; + } + + FlValue* value0 = fl_value_get_list_value(message_, 0); + FlValue* list = value0; + g_autoptr( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullBoolListListResponse) + response = + self->vtable->echo_non_null_bool_list_list(list, self->user_data); + if (response == nullptr) { + g_warning("No response returned to %s.%s", "HostIntegrationCoreApi", + "echoNonNullBoolListList"); + return; + } + + g_autoptr(GError) error = NULL; + if (!fl_basic_message_channel_respond(channel, response_handle, + response->value, &error)) { + g_warning("Failed to send response to %s.%s: %s", "HostIntegrationCoreApi", + "echoNonNullBoolListList", error->message); + } +} + static void core_tests_pigeon_test_host_integration_core_api_echo_map_cb( FlBasicMessageChannel* channel, FlValue* message_, FlBasicMessageChannelResponseHandle* response_handle, gpointer user_data) { @@ -19209,6 +19411,18 @@ void core_tests_pigeon_test_host_integration_core_api_set_method_handlers( echo_non_null_class_list_channel, core_tests_pigeon_test_host_integration_core_api_echo_non_null_class_list_cb, g_object_ref(api_data), g_object_unref); + g_autofree gchar* echo_non_null_bool_list_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNonNullBoolListList%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_non_null_bool_list_list_channel = + fl_basic_message_channel_new(messenger, + echo_non_null_bool_list_list_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_non_null_bool_list_list_channel, + core_tests_pigeon_test_host_integration_core_api_echo_non_null_bool_list_list_cb, + g_object_ref(api_data), g_object_unref); g_autofree gchar* echo_map_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoMap%s", @@ -21113,6 +21327,16 @@ void core_tests_pigeon_test_host_integration_core_api_clear_method_handlers( FL_MESSAGE_CODEC(codec)); fl_basic_message_channel_set_message_handler(echo_non_null_class_list_channel, nullptr, nullptr, nullptr); + g_autofree gchar* echo_non_null_bool_list_list_channel_name = g_strdup_printf( + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNonNullBoolListList%s", + dot_suffix); + g_autoptr(FlBasicMessageChannel) echo_non_null_bool_list_list_channel = + fl_basic_message_channel_new(messenger, + echo_non_null_bool_list_list_channel_name, + FL_MESSAGE_CODEC(codec)); + fl_basic_message_channel_set_message_handler( + echo_non_null_bool_list_list_channel, nullptr, nullptr, nullptr); g_autofree gchar* echo_map_channel_name = g_strdup_printf( "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." "echoMap%s", diff --git a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h index 322b9bc8a6b5..eb8bab4bb28e 100644 --- a/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h +++ b/packages/pigeon/platform_tests/test_plugin/linux/pigeon/core_tests.gen.h @@ -128,13 +128,16 @@ G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestAllTypes, * enum_list: field in this object. * object_list: field in this object. * list_list: field in this object. + * bool_list_list: field in this object. * map_list: field in this object. + * bool_map_list: field in this object. * map: field in this object. * string_map: field in this object. * int_map: field in this object. * enum_map: field in this object. * object_map: field in this object. * list_map: field in this object. + * bool_list_map: field in this object. * map_map: field in this object. * * Creates a new #AllTypes object. @@ -151,9 +154,11 @@ CoreTestsPigeonTestAllTypes* core_tests_pigeon_test_all_types_new( CoreTestsPigeonTestAnotherEnum another_enum, const gchar* a_string, FlValue* an_object, FlValue* list, FlValue* string_list, FlValue* int_list, FlValue* double_list, FlValue* bool_list, FlValue* enum_list, - FlValue* object_list, FlValue* list_list, FlValue* map_list, FlValue* map, + FlValue* object_list, FlValue* list_list, FlValue* bool_list_list, + FlValue* map_list, FlValue* bool_map_list, FlValue* map, FlValue* string_map, FlValue* int_map, FlValue* enum_map, - FlValue* object_map, FlValue* list_map, FlValue* map_map); + FlValue* object_map, FlValue* list_map, FlValue* bool_list_map, + FlValue* map_map); /** * core_tests_pigeon_test_all_types_get_a_bool @@ -380,6 +385,17 @@ FlValue* core_tests_pigeon_test_all_types_get_object_list( FlValue* core_tests_pigeon_test_all_types_get_list_list( CoreTestsPigeonTestAllTypes* object); +/** + * core_tests_pigeon_test_all_types_get_bool_list_list + * @object: a #CoreTestsPigeonTestAllTypes. + * + * Gets the value of the boolListList field of @object. + * + * Returns: the field value. + */ +FlValue* core_tests_pigeon_test_all_types_get_bool_list_list( + CoreTestsPigeonTestAllTypes* object); + /** * core_tests_pigeon_test_all_types_get_map_list * @object: a #CoreTestsPigeonTestAllTypes. @@ -391,6 +407,17 @@ FlValue* core_tests_pigeon_test_all_types_get_list_list( FlValue* core_tests_pigeon_test_all_types_get_map_list( CoreTestsPigeonTestAllTypes* object); +/** + * core_tests_pigeon_test_all_types_get_bool_map_list + * @object: a #CoreTestsPigeonTestAllTypes. + * + * Gets the value of the boolMapList field of @object. + * + * Returns: the field value. + */ +FlValue* core_tests_pigeon_test_all_types_get_bool_map_list( + CoreTestsPigeonTestAllTypes* object); + /** * core_tests_pigeon_test_all_types_get_map * @object: a #CoreTestsPigeonTestAllTypes. @@ -457,6 +484,17 @@ FlValue* core_tests_pigeon_test_all_types_get_object_map( FlValue* core_tests_pigeon_test_all_types_get_list_map( CoreTestsPigeonTestAllTypes* object); +/** + * core_tests_pigeon_test_all_types_get_bool_list_map + * @object: a #CoreTestsPigeonTestAllTypes. + * + * Gets the value of the boolListMap field of @object. + * + * Returns: the field value. + */ +FlValue* core_tests_pigeon_test_all_types_get_bool_list_map( + CoreTestsPigeonTestAllTypes* object); + /** * core_tests_pigeon_test_all_types_get_map_map * @object: a #CoreTestsPigeonTestAllTypes. @@ -528,6 +566,7 @@ G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestAllNullableTypes, * enum_list: field in this object. * object_list: field in this object. * list_list: field in this object. + * bool_list_list: field in this object. * map_list: field in this object. * recursive_class_list: field in this object. * map: field in this object. @@ -536,6 +575,7 @@ G_DECLARE_FINAL_TYPE(CoreTestsPigeonTestAllNullableTypes, * enum_map: field in this object. * object_map: field in this object. * list_map: field in this object. + * bool_list_map: field in this object. * map_map: field in this object. * recursive_class_map: field in this object. * @@ -557,10 +597,10 @@ core_tests_pigeon_test_all_nullable_types_new( CoreTestsPigeonTestAllNullableTypes* all_nullable_types, FlValue* list, FlValue* string_list, FlValue* int_list, FlValue* double_list, FlValue* bool_list, FlValue* enum_list, FlValue* object_list, - FlValue* list_list, FlValue* map_list, FlValue* recursive_class_list, - FlValue* map, FlValue* string_map, FlValue* int_map, FlValue* enum_map, - FlValue* object_map, FlValue* list_map, FlValue* map_map, - FlValue* recursive_class_map); + FlValue* list_list, FlValue* bool_list_list, FlValue* map_list, + FlValue* recursive_class_list, FlValue* map, FlValue* string_map, + FlValue* int_map, FlValue* enum_map, FlValue* object_map, FlValue* list_map, + FlValue* bool_list_map, FlValue* map_map, FlValue* recursive_class_map); /** * core_tests_pigeon_test_all_nullable_types_get_a_nullable_bool @@ -804,6 +844,17 @@ FlValue* core_tests_pigeon_test_all_nullable_types_get_object_list( FlValue* core_tests_pigeon_test_all_nullable_types_get_list_list( CoreTestsPigeonTestAllNullableTypes* object); +/** + * core_tests_pigeon_test_all_nullable_types_get_bool_list_list + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the boolListList field of @object. + * + * Returns: the field value. + */ +FlValue* core_tests_pigeon_test_all_nullable_types_get_bool_list_list( + CoreTestsPigeonTestAllNullableTypes* object); + /** * core_tests_pigeon_test_all_nullable_types_get_map_list * @object: a #CoreTestsPigeonTestAllNullableTypes. @@ -892,6 +943,17 @@ FlValue* core_tests_pigeon_test_all_nullable_types_get_object_map( FlValue* core_tests_pigeon_test_all_nullable_types_get_list_map( CoreTestsPigeonTestAllNullableTypes* object); +/** + * core_tests_pigeon_test_all_nullable_types_get_bool_list_map + * @object: a #CoreTestsPigeonTestAllNullableTypes. + * + * Gets the value of the boolListMap field of @object. + * + * Returns: the field value. + */ +FlValue* core_tests_pigeon_test_all_nullable_types_get_bool_list_map( + CoreTestsPigeonTestAllNullableTypes* object); + /** * core_tests_pigeon_test_all_nullable_types_get_map_map * @object: a #CoreTestsPigeonTestAllNullableTypes. @@ -2107,6 +2169,40 @@ CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullClassListResponse* core_tests_pigeon_test_host_integration_core_api_echo_non_null_class_list_response_new_error( const gchar* code, const gchar* message, FlValue* details); +G_DECLARE_FINAL_TYPE( + CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullBoolListListResponse, + core_tests_pigeon_test_host_integration_core_api_echo_non_null_bool_list_list_response, + CORE_TESTS_PIGEON_TEST, + HOST_INTEGRATION_CORE_API_ECHO_NON_NULL_BOOL_LIST_LIST_RESPONSE, GObject) + +/** + * core_tests_pigeon_test_host_integration_core_api_echo_non_null_bool_list_list_response_new: + * + * Creates a new response to HostIntegrationCoreApi.echoNonNullBoolListList. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullBoolListListResponse + */ +CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullBoolListListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_non_null_bool_list_list_response_new( + FlValue* return_value); + +/** + * core_tests_pigeon_test_host_integration_core_api_echo_non_null_bool_list_list_response_new_error: + * @code: error code. + * @message: error message. + * @details: (allow-none): error details or %NULL. + * + * Creates a new error response to + * HostIntegrationCoreApi.echoNonNullBoolListList. + * + * Returns: a new + * #CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullBoolListListResponse + */ +CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullBoolListListResponse* +core_tests_pigeon_test_host_integration_core_api_echo_non_null_bool_list_list_response_new_error( + const gchar* code, const gchar* message, FlValue* details); + G_DECLARE_FINAL_TYPE( CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse, core_tests_pigeon_test_host_integration_core_api_echo_map_response, @@ -3820,6 +3916,8 @@ typedef struct { *echo_non_null_enum_list)(FlValue* enum_list, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullClassListResponse* ( *echo_non_null_class_list)(FlValue* class_list, gpointer user_data); + CoreTestsPigeonTestHostIntegrationCoreApiEchoNonNullBoolListListResponse* ( + *echo_non_null_bool_list_list)(FlValue* list, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoMapResponse* (*echo_map)( FlValue* map, gpointer user_data); CoreTestsPigeonTestHostIntegrationCoreApiEchoStringMapResponse* ( 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 f50c8eff918c..9f38cca334fd 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 @@ -295,24 +295,23 @@ size_t PigeonInternalDeepHash(const UnusedClass& v) { return v.Hash(); } // 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 AnEnum& an_enum, const AnotherEnum& another_enum, - const std::string& a_string, const EncodableValue& an_object, - const EncodableList& list, const EncodableList& string_list, - const EncodableList& int_list, - const EncodableList& double_list, - const EncodableList& bool_list, - const EncodableList& enum_list, - const EncodableList& object_list, - const EncodableList& list_list, - const EncodableList& map_list, const EncodableMap& map, - const EncodableMap& string_map, const EncodableMap& int_map, - const EncodableMap& enum_map, const EncodableMap& object_map, - const EncodableMap& list_map, const EncodableMap& map_map) +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 AnEnum& an_enum, + const AnotherEnum& another_enum, const std::string& a_string, + const EncodableValue& an_object, const EncodableList& list, + const EncodableList& string_list, const EncodableList& int_list, + const EncodableList& double_list, const EncodableList& bool_list, + const EncodableList& enum_list, const EncodableList& object_list, + const EncodableList& list_list, const EncodableList& bool_list_list, + const EncodableList& map_list, const EncodableList& bool_map_list, + const EncodableMap& map, const EncodableMap& string_map, + const EncodableMap& int_map, const EncodableMap& enum_map, + const EncodableMap& object_map, const EncodableMap& list_map, + const EncodableMap& bool_list_map, const EncodableMap& map_map) : a_bool_(a_bool), an_int_(an_int), an_int64_(an_int64), @@ -333,13 +332,16 @@ AllTypes::AllTypes(bool a_bool, int64_t an_int, int64_t an_int64, enum_list_(enum_list), object_list_(object_list), list_list_(list_list), + bool_list_list_(bool_list_list), map_list_(map_list), + bool_map_list_(bool_map_list), map_(map), string_map_(string_map), int_map_(int_map), enum_map_(enum_map), object_map_(object_map), list_map_(list_map), + bool_list_map_(bool_list_map), map_map_(map_map) {} bool AllTypes::a_bool() const { return a_bool_; } @@ -458,12 +460,26 @@ void AllTypes::set_list_list(const EncodableList& value_arg) { list_list_ = value_arg; } +const EncodableList& AllTypes::bool_list_list() const { + return bool_list_list_; +} + +void AllTypes::set_bool_list_list(const EncodableList& value_arg) { + bool_list_list_ = value_arg; +} + const EncodableList& AllTypes::map_list() const { return map_list_; } void AllTypes::set_map_list(const EncodableList& value_arg) { map_list_ = value_arg; } +const EncodableList& AllTypes::bool_map_list() const { return bool_map_list_; } + +void AllTypes::set_bool_map_list(const EncodableList& value_arg) { + bool_map_list_ = value_arg; +} + const EncodableMap& AllTypes::map() const { return map_; } void AllTypes::set_map(const EncodableMap& value_arg) { map_ = value_arg; } @@ -498,6 +514,12 @@ void AllTypes::set_list_map(const EncodableMap& value_arg) { list_map_ = value_arg; } +const EncodableMap& AllTypes::bool_list_map() const { return bool_list_map_; } + +void AllTypes::set_bool_list_map(const EncodableMap& value_arg) { + bool_list_map_ = value_arg; +} + const EncodableMap& AllTypes::map_map() const { return map_map_; } void AllTypes::set_map_map(const EncodableMap& value_arg) { @@ -506,7 +528,7 @@ void AllTypes::set_map_map(const EncodableMap& value_arg) { EncodableList AllTypes::ToEncodableList() const { EncodableList list; - list.reserve(28); + list.reserve(31); list.push_back(EncodableValue(a_bool_)); list.push_back(EncodableValue(an_int_)); list.push_back(EncodableValue(an_int64_)); @@ -527,13 +549,16 @@ EncodableList AllTypes::ToEncodableList() const { list.push_back(EncodableValue(enum_list_)); list.push_back(EncodableValue(object_list_)); list.push_back(EncodableValue(list_list_)); + list.push_back(EncodableValue(bool_list_list_)); list.push_back(EncodableValue(map_list_)); + list.push_back(EncodableValue(bool_map_list_)); list.push_back(EncodableValue(map_)); list.push_back(EncodableValue(string_map_)); list.push_back(EncodableValue(int_map_)); list.push_back(EncodableValue(enum_map_)); list.push_back(EncodableValue(object_map_)); list.push_back(EncodableValue(list_map_)); + list.push_back(EncodableValue(bool_list_map_)); list.push_back(EncodableValue(map_map_)); return list; } @@ -554,10 +579,12 @@ AllTypes AllTypes::FromEncodableList(const EncodableList& list) { std::get(list[14]), std::get(list[15]), std::get(list[16]), std::get(list[17]), std::get(list[18]), std::get(list[19]), - std::get(list[20]), std::get(list[21]), - std::get(list[22]), std::get(list[23]), + std::get(list[20]), std::get(list[21]), + std::get(list[22]), std::get(list[23]), std::get(list[24]), std::get(list[25]), - std::get(list[26]), std::get(list[27])); + std::get(list[26]), std::get(list[27]), + std::get(list[28]), std::get(list[29]), + std::get(list[30])); return decoded; } @@ -582,13 +609,16 @@ bool AllTypes::operator==(const AllTypes& other) const { PigeonInternalDeepEquals(enum_list_, other.enum_list_) && PigeonInternalDeepEquals(object_list_, other.object_list_) && PigeonInternalDeepEquals(list_list_, other.list_list_) && + PigeonInternalDeepEquals(bool_list_list_, other.bool_list_list_) && PigeonInternalDeepEquals(map_list_, other.map_list_) && + PigeonInternalDeepEquals(bool_map_list_, other.bool_map_list_) && PigeonInternalDeepEquals(map_, other.map_) && PigeonInternalDeepEquals(string_map_, other.string_map_) && PigeonInternalDeepEquals(int_map_, other.int_map_) && PigeonInternalDeepEquals(enum_map_, other.enum_map_) && PigeonInternalDeepEquals(object_map_, other.object_map_) && PigeonInternalDeepEquals(list_map_, other.list_map_) && + PigeonInternalDeepEquals(bool_list_map_, other.bool_list_map_) && PigeonInternalDeepEquals(map_map_, other.map_map_); } @@ -618,13 +648,16 @@ size_t AllTypes::Hash() const { result = result * 31 + PigeonInternalDeepHash(enum_list_); result = result * 31 + PigeonInternalDeepHash(object_list_); result = result * 31 + PigeonInternalDeepHash(list_list_); + result = result * 31 + PigeonInternalDeepHash(bool_list_list_); result = result * 31 + PigeonInternalDeepHash(map_list_); + result = result * 31 + PigeonInternalDeepHash(bool_map_list_); result = result * 31 + PigeonInternalDeepHash(map_); result = result * 31 + PigeonInternalDeepHash(string_map_); result = result * 31 + PigeonInternalDeepHash(int_map_); result = result * 31 + PigeonInternalDeepHash(enum_map_); result = result * 31 + PigeonInternalDeepHash(object_map_); result = result * 31 + PigeonInternalDeepHash(list_map_); + result = result * 31 + PigeonInternalDeepHash(bool_list_map_); result = result * 31 + PigeonInternalDeepHash(map_map_); return result; } @@ -649,11 +682,12 @@ AllNullableTypes::AllNullableTypes( const EncodableList* string_list, const EncodableList* int_list, const EncodableList* double_list, const EncodableList* bool_list, const EncodableList* enum_list, const EncodableList* object_list, - const EncodableList* list_list, const EncodableList* map_list, - const EncodableList* recursive_class_list, const EncodableMap* map, - const EncodableMap* string_map, const EncodableMap* int_map, - const EncodableMap* enum_map, const EncodableMap* object_map, - const EncodableMap* list_map, const EncodableMap* map_map, + const EncodableList* list_list, const EncodableList* bool_list_list, + const EncodableList* map_list, const EncodableList* recursive_class_list, + const EncodableMap* map, const EncodableMap* string_map, + const EncodableMap* int_map, const EncodableMap* enum_map, + const EncodableMap* object_map, const EncodableMap* list_map, + const EncodableMap* bool_list_map, const EncodableMap* map_map, const EncodableMap* recursive_class_map) : a_nullable_bool_(a_nullable_bool ? std::optional(*a_nullable_bool) : std::nullopt), @@ -711,6 +745,9 @@ AllNullableTypes::AllNullableTypes( : std::nullopt), list_list_(list_list ? std::optional(*list_list) : std::nullopt), + bool_list_list_(bool_list_list + ? std::optional(*bool_list_list) + : std::nullopt), map_list_(map_list ? std::optional(*map_list) : std::nullopt), recursive_class_list_(recursive_class_list ? std::optional( @@ -726,6 +763,8 @@ AllNullableTypes::AllNullableTypes( : std::nullopt), list_map_(list_map ? std::optional(*list_map) : std::nullopt), + bool_list_map_(bool_list_map ? std::optional(*bool_list_map) + : std::nullopt), map_map_(map_map ? std::optional(*map_map) : std::nullopt), recursive_class_map_(recursive_class_map ? std::optional( *recursive_class_map) @@ -801,6 +840,9 @@ AllNullableTypes::AllNullableTypes(const AllNullableTypes& other) list_list_(other.list_list_ ? std::optional(*other.list_list_) : std::nullopt), + bool_list_list_(other.bool_list_list_ + ? std::optional(*other.bool_list_list_) + : std::nullopt), map_list_(other.map_list_ ? std::optional(*other.map_list_) : std::nullopt), recursive_class_list_( @@ -821,6 +863,9 @@ AllNullableTypes::AllNullableTypes(const AllNullableTypes& other) : std::nullopt), list_map_(other.list_map_ ? std::optional(*other.list_map_) : std::nullopt), + bool_list_map_(other.bool_list_map_ + ? std::optional(*other.bool_list_map_) + : std::nullopt), map_map_(other.map_map_ ? std::optional(*other.map_map_) : std::nullopt), recursive_class_map_( @@ -853,6 +898,7 @@ AllNullableTypes& AllNullableTypes::operator=(const AllNullableTypes& other) { enum_list_ = other.enum_list_; object_list_ = other.object_list_; list_list_ = other.list_list_; + bool_list_list_ = other.bool_list_list_; map_list_ = other.map_list_; recursive_class_list_ = other.recursive_class_list_; map_ = other.map_; @@ -861,6 +907,7 @@ AllNullableTypes& AllNullableTypes::operator=(const AllNullableTypes& other) { enum_map_ = other.enum_map_; object_map_ = other.object_map_; list_map_ = other.list_map_; + bool_list_map_ = other.bool_list_map_; map_map_ = other.map_map_; recursive_class_map_ = other.recursive_class_map_; return *this; @@ -1151,6 +1198,19 @@ void AllNullableTypes::set_list_list(const EncodableList& value_arg) { list_list_ = value_arg; } +const EncodableList* AllNullableTypes::bool_list_list() const { + return bool_list_list_ ? &(*bool_list_list_) : nullptr; +} + +void AllNullableTypes::set_bool_list_list(const EncodableList* value_arg) { + bool_list_list_ = + value_arg ? std::optional(*value_arg) : std::nullopt; +} + +void AllNullableTypes::set_bool_list_list(const EncodableList& value_arg) { + bool_list_list_ = value_arg; +} + const EncodableList* AllNullableTypes::map_list() const { return map_list_ ? &(*map_list_) : nullptr; } @@ -1255,6 +1315,19 @@ void AllNullableTypes::set_list_map(const EncodableMap& value_arg) { list_map_ = value_arg; } +const EncodableMap* AllNullableTypes::bool_list_map() const { + return bool_list_map_ ? &(*bool_list_map_) : nullptr; +} + +void AllNullableTypes::set_bool_list_map(const EncodableMap* value_arg) { + bool_list_map_ = + value_arg ? std::optional(*value_arg) : std::nullopt; +} + +void AllNullableTypes::set_bool_list_map(const EncodableMap& value_arg) { + bool_list_map_ = value_arg; +} + const EncodableMap* AllNullableTypes::map_map() const { return map_map_ ? &(*map_map_) : nullptr; } @@ -1282,7 +1355,7 @@ void AllNullableTypes::set_recursive_class_map(const EncodableMap& value_arg) { EncodableList AllNullableTypes::ToEncodableList() const { EncodableList list; - list.reserve(31); + list.reserve(33); list.push_back(a_nullable_bool_ ? EncodableValue(*a_nullable_bool_) : EncodableValue()); list.push_back(a_nullable_int_ ? EncodableValue(*a_nullable_int_) @@ -1325,6 +1398,8 @@ EncodableList AllNullableTypes::ToEncodableList() const { list.push_back(object_list_ ? EncodableValue(*object_list_) : EncodableValue()); list.push_back(list_list_ ? EncodableValue(*list_list_) : EncodableValue()); + list.push_back(bool_list_list_ ? EncodableValue(*bool_list_list_) + : EncodableValue()); list.push_back(map_list_ ? EncodableValue(*map_list_) : EncodableValue()); list.push_back(recursive_class_list_ ? EncodableValue(*recursive_class_list_) : EncodableValue()); @@ -1334,6 +1409,8 @@ EncodableList AllNullableTypes::ToEncodableList() const { list.push_back(enum_map_ ? EncodableValue(*enum_map_) : EncodableValue()); list.push_back(object_map_ ? EncodableValue(*object_map_) : EncodableValue()); list.push_back(list_map_ ? EncodableValue(*list_map_) : EncodableValue()); + list.push_back(bool_list_map_ ? EncodableValue(*bool_list_map_) + : EncodableValue()); list.push_back(map_map_ ? EncodableValue(*map_map_) : EncodableValue()); list.push_back(recursive_class_map_ ? EncodableValue(*recursive_class_map_) : EncodableValue()); @@ -1436,44 +1513,53 @@ AllNullableTypes AllNullableTypes::FromEncodableList( if (!encodable_list_list.IsNull()) { decoded.set_list_list(std::get(encodable_list_list)); } - auto& encodable_map_list = list[21]; + auto& encodable_bool_list_list = list[21]; + if (!encodable_bool_list_list.IsNull()) { + decoded.set_bool_list_list( + std::get(encodable_bool_list_list)); + } + auto& encodable_map_list = list[22]; if (!encodable_map_list.IsNull()) { decoded.set_map_list(std::get(encodable_map_list)); } - auto& encodable_recursive_class_list = list[22]; + auto& encodable_recursive_class_list = list[23]; if (!encodable_recursive_class_list.IsNull()) { decoded.set_recursive_class_list( std::get(encodable_recursive_class_list)); } - auto& encodable_map = list[23]; + auto& encodable_map = list[24]; if (!encodable_map.IsNull()) { decoded.set_map(std::get(encodable_map)); } - auto& encodable_string_map = list[24]; + auto& encodable_string_map = list[25]; if (!encodable_string_map.IsNull()) { decoded.set_string_map(std::get(encodable_string_map)); } - auto& encodable_int_map = list[25]; + auto& encodable_int_map = list[26]; if (!encodable_int_map.IsNull()) { decoded.set_int_map(std::get(encodable_int_map)); } - auto& encodable_enum_map = list[26]; + auto& encodable_enum_map = list[27]; if (!encodable_enum_map.IsNull()) { decoded.set_enum_map(std::get(encodable_enum_map)); } - auto& encodable_object_map = list[27]; + auto& encodable_object_map = list[28]; if (!encodable_object_map.IsNull()) { decoded.set_object_map(std::get(encodable_object_map)); } - auto& encodable_list_map = list[28]; + auto& encodable_list_map = list[29]; if (!encodable_list_map.IsNull()) { decoded.set_list_map(std::get(encodable_list_map)); } - auto& encodable_map_map = list[29]; + auto& encodable_bool_list_map = list[30]; + if (!encodable_bool_list_map.IsNull()) { + decoded.set_bool_list_map(std::get(encodable_bool_list_map)); + } + auto& encodable_map_map = list[31]; if (!encodable_map_map.IsNull()) { decoded.set_map_map(std::get(encodable_map_map)); } - auto& encodable_recursive_class_map = list[30]; + auto& encodable_recursive_class_map = list[32]; if (!encodable_recursive_class_map.IsNull()) { decoded.set_recursive_class_map( std::get(encodable_recursive_class_map)); @@ -1512,6 +1598,7 @@ bool AllNullableTypes::operator==(const AllNullableTypes& other) const { PigeonInternalDeepEquals(enum_list_, other.enum_list_) && PigeonInternalDeepEquals(object_list_, other.object_list_) && PigeonInternalDeepEquals(list_list_, other.list_list_) && + PigeonInternalDeepEquals(bool_list_list_, other.bool_list_list_) && PigeonInternalDeepEquals(map_list_, other.map_list_) && PigeonInternalDeepEquals(recursive_class_list_, other.recursive_class_list_) && @@ -1521,6 +1608,7 @@ bool AllNullableTypes::operator==(const AllNullableTypes& other) const { PigeonInternalDeepEquals(enum_map_, other.enum_map_) && PigeonInternalDeepEquals(object_map_, other.object_map_) && PigeonInternalDeepEquals(list_map_, other.list_map_) && + PigeonInternalDeepEquals(bool_list_map_, other.bool_list_map_) && PigeonInternalDeepEquals(map_map_, other.map_map_) && PigeonInternalDeepEquals(recursive_class_map_, other.recursive_class_map_); @@ -1553,6 +1641,7 @@ size_t AllNullableTypes::Hash() const { result = result * 31 + PigeonInternalDeepHash(enum_list_); result = result * 31 + PigeonInternalDeepHash(object_list_); result = result * 31 + PigeonInternalDeepHash(list_list_); + result = result * 31 + PigeonInternalDeepHash(bool_list_list_); result = result * 31 + PigeonInternalDeepHash(map_list_); result = result * 31 + PigeonInternalDeepHash(recursive_class_list_); result = result * 31 + PigeonInternalDeepHash(map_); @@ -1561,6 +1650,7 @@ size_t AllNullableTypes::Hash() const { result = result * 31 + PigeonInternalDeepHash(enum_map_); result = result * 31 + PigeonInternalDeepHash(object_map_); result = result * 31 + PigeonInternalDeepHash(list_map_); + result = result * 31 + PigeonInternalDeepHash(bool_list_map_); result = result * 31 + PigeonInternalDeepHash(map_map_); result = result * 31 + PigeonInternalDeepHash(recursive_class_map_); return result; @@ -3313,6 +3403,43 @@ void HostIntegrationCoreApi::SetUp(::flutter::BinaryMessenger* binary_messenger, channel.SetMessageHandler(nullptr); } } + { + BasicMessageChannel<> channel( + binary_messenger, + "dev.flutter.pigeon.pigeon_integration_tests.HostIntegrationCoreApi." + "echoNonNullBoolListList" + + prepended_suffix, + &GetCodec()); + if (api != nullptr) { + channel.SetMessageHandler( + [api](const EncodableValue& message, + const ::flutter::MessageReply& reply) { + try { + const auto& args = std::get(message); + const auto& encodable_list_arg = args.at(0); + if (encodable_list_arg.IsNull()) { + reply(WrapError("list_arg unexpectedly null.")); + return; + } + const auto& list_arg = + std::get(encodable_list_arg); + ErrorOr output = + api->EchoNonNullBoolListList(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); + } + } { BasicMessageChannel<> channel(binary_messenger, "dev.flutter.pigeon.pigeon_integration_tests." 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 24ca4540d6a8..b50ff776b336 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 @@ -129,13 +129,16 @@ class AllTypes { const ::flutter::EncodableList& enum_list, const ::flutter::EncodableList& object_list, const ::flutter::EncodableList& list_list, + const ::flutter::EncodableList& bool_list_list, const ::flutter::EncodableList& map_list, + const ::flutter::EncodableList& bool_map_list, const ::flutter::EncodableMap& map, const ::flutter::EncodableMap& string_map, const ::flutter::EncodableMap& int_map, const ::flutter::EncodableMap& enum_map, const ::flutter::EncodableMap& object_map, const ::flutter::EncodableMap& list_map, + const ::flutter::EncodableMap& bool_list_map, const ::flutter::EncodableMap& map_map); bool a_bool() const; @@ -198,9 +201,15 @@ class AllTypes { const ::flutter::EncodableList& list_list() const; void set_list_list(const ::flutter::EncodableList& value_arg); + const ::flutter::EncodableList& bool_list_list() const; + void set_bool_list_list(const ::flutter::EncodableList& value_arg); + const ::flutter::EncodableList& map_list() const; void set_map_list(const ::flutter::EncodableList& value_arg); + const ::flutter::EncodableList& bool_map_list() const; + void set_bool_map_list(const ::flutter::EncodableList& value_arg); + const ::flutter::EncodableMap& map() const; void set_map(const ::flutter::EncodableMap& value_arg); @@ -219,6 +228,9 @@ class AllTypes { const ::flutter::EncodableMap& list_map() const; void set_list_map(const ::flutter::EncodableMap& value_arg); + const ::flutter::EncodableMap& bool_list_map() const; + void set_bool_list_map(const ::flutter::EncodableMap& value_arg); + const ::flutter::EncodableMap& map_map() const; void set_map_map(const ::flutter::EncodableMap& value_arg); @@ -259,13 +271,16 @@ class AllTypes { ::flutter::EncodableList enum_list_; ::flutter::EncodableList object_list_; ::flutter::EncodableList list_list_; + ::flutter::EncodableList bool_list_list_; ::flutter::EncodableList map_list_; + ::flutter::EncodableList bool_map_list_; ::flutter::EncodableMap map_; ::flutter::EncodableMap string_map_; ::flutter::EncodableMap int_map_; ::flutter::EncodableMap enum_map_; ::flutter::EncodableMap object_map_; ::flutter::EncodableMap list_map_; + ::flutter::EncodableMap bool_list_map_; ::flutter::EncodableMap map_map_; }; @@ -297,6 +312,7 @@ class AllNullableTypes { const ::flutter::EncodableList* enum_list, const ::flutter::EncodableList* object_list, const ::flutter::EncodableList* list_list, + const ::flutter::EncodableList* bool_list_list, const ::flutter::EncodableList* map_list, const ::flutter::EncodableList* recursive_class_list, const ::flutter::EncodableMap* map, @@ -305,6 +321,7 @@ class AllNullableTypes { const ::flutter::EncodableMap* enum_map, const ::flutter::EncodableMap* object_map, const ::flutter::EncodableMap* list_map, + const ::flutter::EncodableMap* bool_list_map, const ::flutter::EncodableMap* map_map, const ::flutter::EncodableMap* recursive_class_map); @@ -397,6 +414,10 @@ class AllNullableTypes { void set_list_list(const ::flutter::EncodableList* value_arg); void set_list_list(const ::flutter::EncodableList& value_arg); + const ::flutter::EncodableList* bool_list_list() const; + void set_bool_list_list(const ::flutter::EncodableList* value_arg); + void set_bool_list_list(const ::flutter::EncodableList& value_arg); + const ::flutter::EncodableList* map_list() const; void set_map_list(const ::flutter::EncodableList* value_arg); void set_map_list(const ::flutter::EncodableList& value_arg); @@ -429,6 +450,10 @@ class AllNullableTypes { void set_list_map(const ::flutter::EncodableMap* value_arg); void set_list_map(const ::flutter::EncodableMap& value_arg); + const ::flutter::EncodableMap* bool_list_map() const; + void set_bool_list_map(const ::flutter::EncodableMap* value_arg); + void set_bool_list_map(const ::flutter::EncodableMap& value_arg); + const ::flutter::EncodableMap* map_map() const; void set_map_map(const ::flutter::EncodableMap* value_arg); void set_map_map(const ::flutter::EncodableMap& value_arg); @@ -476,6 +501,7 @@ class AllNullableTypes { std::optional<::flutter::EncodableList> enum_list_; std::optional<::flutter::EncodableList> object_list_; std::optional<::flutter::EncodableList> list_list_; + std::optional<::flutter::EncodableList> bool_list_list_; std::optional<::flutter::EncodableList> map_list_; std::optional<::flutter::EncodableList> recursive_class_list_; std::optional<::flutter::EncodableMap> map_; @@ -484,6 +510,7 @@ class AllNullableTypes { std::optional<::flutter::EncodableMap> enum_map_; std::optional<::flutter::EncodableMap> object_map_; std::optional<::flutter::EncodableMap> list_map_; + std::optional<::flutter::EncodableMap> bool_list_map_; std::optional<::flutter::EncodableMap> map_map_; std::optional<::flutter::EncodableMap> recursive_class_map_; }; @@ -872,6 +899,9 @@ class HostIntegrationCoreApi { // Returns the passed list, to test serialization and deserialization. virtual ErrorOr<::flutter::EncodableList> EchoNonNullClassList( const ::flutter::EncodableList& class_list) = 0; + // Returns the passed list, to test serialization and deserialization. + virtual ErrorOr<::flutter::EncodableList> EchoNonNullBoolListList( + const ::flutter::EncodableList& list) = 0; // Returns the passed map, to test serialization and deserialization. virtual ErrorOr<::flutter::EncodableMap> EchoMap( const ::flutter::EncodableMap& map) = 0; diff --git a/packages/pigeon/pubspec.yaml b/packages/pigeon/pubspec.yaml index 637fb3f6fe6b..63c1fc5b86ca 100644 --- a/packages/pigeon/pubspec.yaml +++ b/packages/pigeon/pubspec.yaml @@ -2,7 +2,7 @@ name: pigeon description: Code generator tool to make communication between Flutter and the host platform type-safe and easier. repository: https://github.com/flutter/packages/tree/main/packages/pigeon issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+pigeon%22 -version: 26.3.3 # This must match the version in lib/src/generator_tools.dart +version: 26.3.4 # This must match the version in lib/src/generator_tools.dart environment: sdk: ^3.9.0