toJson method
Implementation
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['date_created'] = dateCreated;
data['date_created_gmt'] = dateCreatedGmt;
data['product_id'] = productId;
data['status'] = status;
data['reviewer'] = reviewer;
data['reviewer_email'] = reviewerEmail;
// ignore: unnecessary_this
data['review'] = this.review;
data['rating'] = rating;
data['verified'] = verified;
if (reviewerAvatarUrls != null) {
data['reviewer_avatar_urls'] = reviewerAvatarUrls.toString();
}
if (links != null) {
data['_links'] = links!.toJson();
}
return data;
}