SupplierDTO.fromJson constructor

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

Implementation

SupplierDTO.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
  name = json['name'];
  if (json['brands'] != null) {
    brands = <BrandDTO>[];
    json['brands'].forEach((v) {
      brands!.add(BrandDTO.fromJson(v));
    });
  }
  // if (json['productGroups'] != null) {
  //   productGroups = <Null>[];
  //   json['productGroups'].forEach((v) {
  //     productGroups!.add(void.fromJson(v));
  //   });
  // }
}