fromJson method Null safety

ImageQualityGroup? fromJson(
  1. dynamic jsonObject
)

Implementation

static ImageQualityGroup? fromJson(jsonObject) {
  if (jsonObject == null) return null;
  var result = new ImageQualityGroup();

  result.count = jsonObject["count"];
  result.result = jsonObject["result"];
  if (jsonObject["imageQualityList"] != null)
    for (var item in jsonObject["imageQualityList"])
      result.imageQualityList.add(ImageQuality.fromJson(item));
  result.pageIndex = jsonObject["pageIndex"];

  return result;
}