Data.fromjson constructor Null safety

Data.fromjson(
  1. Map<String, dynamic> json
)

Implementation

Data.fromjson(Map<String, dynamic> json) {
  id = json['id'] ?? '';
  type = json['type'] ?? '';
  attributes = Attributes.fromJson(json['attributes']);
}