Fix union unpacking (#8748)

This commit is contained in:
Jakob Kordež
2025-10-31 17:58:30 +01:00
committed by GitHub
parent 4c0eecd25a
commit 4b09586652
4 changed files with 9 additions and 8 deletions

View File

@@ -1213,7 +1213,7 @@ class Monster {
inventory: const fb.Uint8ListReader(lazy: false).vTableGetNullable(_bc, _bcOffset, 14),
color: color,
testType: testType,
test: test,
test: test?.unpack(),
test4: test4?.map((e) => e.unpack()).toList(),
testarrayofstring: const fb.ListReader<String>(fb.StringReader(), lazy: false).vTableGetNullable(_bc, _bcOffset, 24),
testarrayoftables: testarrayoftables?.map((e) => e.unpack()).toList(),
@@ -1249,9 +1249,9 @@ class Monster {
nonOwningReference: nonOwningReference,
vectorOfNonOwningReferences: const fb.ListReader<int>(fb.Uint64Reader(), lazy: false).vTableGetNullable(_bc, _bcOffset, 88),
anyUniqueType: anyUniqueType,
anyUnique: anyUnique,
anyUnique: anyUnique?.unpack(),
anyAmbiguousType: anyAmbiguousType,
anyAmbiguous: anyAmbiguous,
anyAmbiguous: anyAmbiguous?.unpack(),
vectorOfEnums: const fb.ListReader<Color>(Color.reader, lazy: false).vTableGetNullable(_bc, _bcOffset, 98),
signedEnum: signedEnum,
testrequirednestedflatbuffer: const fb.Uint8ListReader(lazy: false).vTableGetNullable(_bc, _bcOffset, 102),