CategoryDetails.fromJson constructor

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

Implementation

CategoryDetails.fromJson(Map<String, dynamic> json) {
  sId = json['_id'];
  categoryName = json['categoryName'];
  categoryId = json['categoryId'];
  status = json['status'];
  if (json['children'] != null) {
    children = [];
    json['children'].forEach((v) {
      children.add(new Childrens.fromJson(v));
    });
  }
}