Patch a cast error
This commit is contained in:
parent
bda96a39fd
commit
c6f0ec4c71
4 changed files with 7 additions and 4 deletions
|
@ -1,3 +1,6 @@
|
|||
# 2.0.9+1
|
||||
* Fix a cast error when deserializing nested model classes.
|
||||
|
||||
# 2.0.9
|
||||
* Upgrade to `source_gen@^0.8.0`.
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ class SerializerGenerator extends GeneratorForAnnotation<Serializable> {
|
|||
map['$alias'] is Map
|
||||
? new Map.unmodifiable((map['$alias'] as Map).keys.fold({}, (out, key) {
|
||||
return out..[key] = ${rc.pascalCase}Serializer
|
||||
.fromMap((map['$alias'] as Map)[key]);
|
||||
.fromMap(((map['$alias'] as Map)[key]) as Map);
|
||||
}))
|
||||
: null
|
||||
''';
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: angel_serialize_generator
|
||||
version: 2.0.9
|
||||
version: 2.0.9+1
|
||||
description: Model serialization generators, designed for use with Angel. Combine with angel_serialize for flexible modeling.
|
||||
author: Tobe O <thosakwe@gmail.com>
|
||||
homepage: https://github.com/angel-dart/serialize
|
||||
|
|
|
@ -93,8 +93,8 @@ abstract class LibrarySerializer {
|
|||
? new Map.unmodifiable(
|
||||
(map['collection'] as Map).keys.fold({}, (out, key) {
|
||||
return out
|
||||
..[key] =
|
||||
BookSerializer.fromMap((map['collection'] as Map)[key]);
|
||||
..[key] = BookSerializer.fromMap(
|
||||
((map['collection'] as Map)[key]) as Map);
|
||||
}))
|
||||
: null,
|
||||
createdAt: map['created_at'] != null
|
||||
|
|
Loading…
Reference in a new issue