PhotoFolderDTO.fromJson constructor

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

Implementation

PhotoFolderDTO.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
  name = json['name'];
  store = json['store'] != null ? StoreDTO.fromJson(json['store']) : null;
  if (json['children'] != null) {
    children = <PhotoFolderDTO>[];
    json['children'].forEach((v) {
      children!.add(PhotoFolderDTO.fromJson(v));
    });
  }
  if (json['photos'] != null) {
    photos = <PhotoDTO>[];
    json['photos'].forEach((v) {
      photos!.add(PhotoDTO.fromJson(v));
    });
  }
}