FeatureDTO.fromJson constructor
FeatureDTO.fromJson(
- Map<String, dynamic> json
)
Implementation
FeatureDTO.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
name = json['name'];
slug = json['slug'];
description = json['description'];
icon = json['icon'] != null ? PhotoDTO.fromJson(json['icon']) : null;
store = json['store'] != null ? StoreDTO.fromJson(json['store']) : null;
if (json['children'] != null) {
children = <FeatureDTO>[];
json['children'].forEach((v) {
children!.add(FeatureDTO.fromJson(v));
});
}
}