toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
  if (this.provider != null) {
    json[r'provider'] = this.provider;
  } else {
    json[r'provider'] = null;
  }
  if (this.accountId != null) {
    json[r'accountId'] = this.accountId;
  } else {
    json[r'accountId'] = null;
  }
  if (this.ownerUserId != null) {
    json[r'ownerUserId'] = this.ownerUserId;
  } else {
    json[r'ownerUserId'] = null;
  }
    json[r'title'] = this.title;
    json[r'content'] = this.content;
  if (this.icon != null) {
    json[r'icon'] = this.icon;
  } else {
    json[r'icon'] = null;
  }
  if (this.coverImage != null) {
    json[r'coverImage'] = this.coverImage;
  } else {
    json[r'coverImage'] = null;
  }
  if (this.parentId != null) {
    json[r'parentId'] = this.parentId;
  } else {
    json[r'parentId'] = null;
  }
    json[r'properties'] = this.properties;
    json[r'archived'] = this.archived;
    json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
    json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
  if (this.lastEditedBy != null) {
    json[r'lastEditedBy'] = this.lastEditedBy;
  } else {
    json[r'lastEditedBy'] = null;
  }
  return json;
}