Data.fromJson constructor Null safety
Implementation
Data.fromJson(Map<String, dynamic> json) {
id = json['id'] ?? '';
type = json['type'] ?? '';
attributes = Attributes.fromJson(json['attributes']!);
relationships = <Relationship>[];
json['relationships'].forEach((v) {
relationships.add(Relationship.fromJson(v));
});
}