Item.fromJson constructor Null safety

Item.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory Item.fromJson(Map<String, dynamic> json) => Item(
      id: json["id"],
      name: json["name"],
      childern: json["childern"] == null
          ? null
          : List<Item>.from(json["childern"].map((x) => Item.fromJson(x))),
      listType: json["listType"],
      imgUrl: json["imgURL"],
      imgThumbUrl: json["imgThumbURL"],
      hasFilter: json["hasFilter"],
    );