toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var id = this.id;
  var localId = this.localId;
  var spaceId = this.spaceId;
  var pageId = this.pageId;
  var blogPostId = this.blogPostId;
  var status = this.status;
  var createdBy = this.createdBy;
  var assignedTo = this.assignedTo;
  var completedBy = this.completedBy;
  var createdAt = this.createdAt;
  var updatedAt = this.updatedAt;
  var dueAt = this.dueAt;
  var completedAt = this.completedAt;

  final json = <String, Object?>{};
  if (id != null) {
    json[r'id'] = id;
  }
  if (localId != null) {
    json[r'localId'] = localId;
  }
  if (spaceId != null) {
    json[r'spaceId'] = spaceId;
  }
  if (pageId != null) {
    json[r'pageId'] = pageId;
  }
  if (blogPostId != null) {
    json[r'blogPostId'] = blogPostId;
  }
  json[r'status'] = status.value;
  if (createdBy != null) {
    json[r'createdBy'] = createdBy;
  }
  if (assignedTo != null) {
    json[r'assignedTo'] = assignedTo;
  }
  if (completedBy != null) {
    json[r'completedBy'] = completedBy;
  }
  if (createdAt != null) {
    json[r'createdAt'] = createdAt.toIso8601String();
  }
  if (updatedAt != null) {
    json[r'updatedAt'] = updatedAt.toIso8601String();
  }
  if (dueAt != null) {
    json[r'dueAt'] = dueAt.toIso8601String();
  }
  if (completedAt != null) {
    json[r'completedAt'] = completedAt.toIso8601String();
  }
  return json;
}