toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var comment = this.comment;
  var rating = this.rating;
  var type = this.type;

  final json = <String, Object?>{};
  if (comment != null) {
    json[r'comment'] = comment.toJson();
  }
  if (rating != null) {
    json[r'rating'] = rating;
  }
  if (type != null) {
    json[r'type'] = type;
  }
  return json;
}