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