JusoResult.fromJson constructor Null safety
Implementation
factory JusoResult.fromJson(Map<String, dynamic> json) {
final results = json['results'];
final common = JusoCommon.fromJson(results['common']);
// print("common: ${results['common']}");
List<Juso> jusoList = [];
if (results['juso'] != null) {
final jusoJsonList = results['juso'] as List;
jusoList = jusoJsonList.map((item) => Juso.fromJson(item)).toList();
}
return JusoResult(common: common, jusoList: jusoList);
}