PlaceMenuMaincats.fromJson constructor

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

Implementation

PlaceMenuMaincats.fromJson(Map<String, dynamic> json) {
  if (json["id"] is String) id = json["id"];
  if (json["order"] is int) order = json["order"];
  if (json["catName"] is String) catName = json["catName"];
  if (json["subcats"] is List) {
    subcats = json["subcats"] == null
        ? null
        : (json["subcats"] as List).map((e) => PlaceMenuSubcats.fromJson(e)).toList();
  }
}