PlaceMenuMaincats.fromJson constructor

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

Implementation

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