BrandDTO.fromJson constructor
Implementation
BrandDTO.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
name = json['name'];
slug = json['slug'];
description = json['description'];
highlightRate = json['highlightRate'];
if (json['photo'] != null) {
photo = PhotoDTO.fromJson(json['photo']);
}
if (json['suppliers'] != null) {
suppliers = <SupplierDTO>[];
json['suppliers'].forEach((v) {
suppliers!.add(SupplierDTO.fromJson(v));
});
}
}