RatingDTO.fromJson constructor

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

Implementation

RatingDTO.fromJson(Map<String, dynamic> json) : super.fromJson(json) {
  rate = json['rate'];
  comment = json['comment'];
  isVerified = json['isVerified'];
  user = json['user'] != null ? ProfileDTO.fromJson(json['user']) : null;
  if (json['photos'] != null) {
    photos = <PhotoDTO>[];
    json['photos'].forEach((v) {
      photos!.add(PhotoDTO.fromJson(v));
    });
  }
}