toJson method

Map<String, Object?> toJson()

Implementation

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

  final json = <String, Object?>{};
  if (attachment != null) {
    json[r'attachment'] = attachment;
  }
  if (comment != null) {
    json[r'comment'] = comment;
  }
  if (page != null) {
    json[r'page'] = page;
  }
  return json;
}