@@ -47,7 +47,7 @@ mixin JSONAPIAdapter<T extends DataModel<T>> on RemoteAdapter<T> {
47
47
map = map.filterNulls;
48
48
49
49
// relationships
50
- final relationships = < String , Relationship > {};
50
+ final relationships = < String , NewRelationship > {};
51
51
52
52
for (final relEntry in localAdapter.relationshipMetas.entries) {
53
53
final key = relEntry.key;
@@ -57,9 +57,9 @@ mixin JSONAPIAdapter<T extends DataModel<T>> on RemoteAdapter<T> {
57
57
final identifiers = (map[key] as Iterable <Object >).map ((id) {
58
58
return Identifier (type, id.toString ());
59
59
}).toList ();
60
- relationships[key] = ToMany (identifiers);
60
+ relationships[key] = NewToMany (identifiers);
61
61
} else if (map[key] != null ) {
62
- relationships[key] = ToOne (Identifier (type, map[key].toString ()));
62
+ relationships[key] = NewToOne (Identifier (type, map[key].toString ()));
63
63
}
64
64
map.remove (key);
65
65
}
@@ -73,7 +73,7 @@ mixin JSONAPIAdapter<T extends DataModel<T>> on RemoteAdapter<T> {
73
73
);
74
74
75
75
// assemble type, id, attributes, relationships in `Resource`
76
- final resource = NewResource (_typeFor (internalType), id? .toString ());
76
+ final resource = NewResource (_typeFor (internalType), id: id ? .toString ());
77
77
resource.attributes.addAll (attributes);
78
78
resource.relationships.addAll (relationships);
79
79
@@ -89,7 +89,7 @@ mixin JSONAPIAdapter<T extends DataModel<T>> on RemoteAdapter<T> {
89
89
@override
90
90
Future <DeserializedData <T >> deserialize (Object ? data, {String ? key}) async {
91
91
final result = DeserializedData <T >([], included: []);
92
- final collection = ResourceCollection () ;
92
+ final collection = < Resource > [] ;
93
93
94
94
if (data is ! Iterable <Resource >) {
95
95
// if data is not already formatted, parse
0 commit comments