PredictSpecialty.fromJson constructor
Implementation
factory PredictSpecialty.fromJson(Map<String, dynamic> json) {
var subCategoriesJson = json['subCategories'] as List;
List<SubCategory> subCategoryList = subCategoriesJson
.map((subCategoryJson) => SubCategory.fromJson(subCategoryJson))
.toList();
return PredictSpecialty(
specialtyId: json['specialty_id'] as int,
subCategories: subCategoryList,
);
}