AuthorInfo.fromJson constructor Null safety
Implementation
AuthorInfo.fromJson(Map<String, dynamic> json) {
result = json['result'] ?? '';
response = json['response'] ?? '';
if (json['data'] != null) {
data = Data.fromJson(json['data']);
}
relationships = [];
if (json['relationships'] != null) {
json['relationships'].forEach((e) {
relationships.add(Relationship.fromJson(json['relationships']));
});
}
}