Rating.fromJson constructor
Rating.fromJson(- dynamic json
)
Implementation
Rating.fromJson(dynamic json) {
id = json['id'];
userId = json['user_id'];
businessId = json['business_id'];
businessName = json['business_name'];
businessAddress = json['business_address'];
businessImage = json['business_image'];
review = json['review'];
title = json['title'];
description = json['description'];
status = json['status'];
hasMedia = json['has_media'];
uploadOnFeed = json['upload_on_feed'];
impressedBy = json['impressed_by'];
createdAt = json['created_at'];
rating = json['rating'];
user = json['user'] != null ? UserReview.fromJson(json['user']) : null;
if (json['review_attachment'] != null) {
reviewAttachment = [];
json['review_attachment'].forEach((v) {
reviewAttachment?.add(ReviewAttachment.fromJson(v));
});
}
}