Group.fromJson constructor

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

Implementation

Group.fromJson(Map<String, dynamic> json) {
  id = json['id'];
  type = json['type'];
  highlightRate = json['highlightRate'];
  useStock = json['useStock'];
  if (json['categories'] != null) {
    categories = <CategoryDTO>[];
    json['categories'].forEach((v) {
      categories!.add(CategoryDTO.fromJson(v));
    });
  }
  brand = json['brand'] != null ? BrandDTO.fromJson(json['brand']) : null;
}