toJson method
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;
if (this.description != null) {
json[r'description'] = this.description;
} else {
json[r'description'] = null;
}
if (this.status != null) {
json[r'status'] = this.status;
} else {
json[r'status'] = null;
}
json[r'completed'] = this.completed;
if (this.dueDate != null) {
json[r'dueDate'] = this.dueDate!.toUtc().toIso8601String();
} else {
json[r'dueDate'] = null;
}
json[r'priority'] = this.priority;
json[r'labels'] = this.labels;
json[r'tags'] = this.tags;
if (this.assigneeId != null) {
json[r'assigneeId'] = this.assigneeId;
} else {
json[r'assigneeId'] = null;
}
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
json[r'updatedAt'] = this.updatedAt.toUtc().toIso8601String();
if (this.completedAt != null) {
json[r'completedAt'] = this.completedAt!.toUtc().toIso8601String();
} else {
json[r'completedAt'] = null;
}
if (this.parentTaskId != null) {
json[r'parentTaskId'] = this.parentTaskId;
} else {
json[r'parentTaskId'] = null;
}
json[r'metadata'] = this.metadata;
if (this.type != null) {
json[r'type'] = this.type;
} else {
json[r'type'] = null;
}
if (this.sourcePlatform != null) {
json[r'sourcePlatform'] = this.sourcePlatform;
} else {
json[r'sourcePlatform'] = null;
}
if (this.sourceId != null) {
json[r'sourceId'] = this.sourceId;
} else {
json[r'sourceId'] = null;
}
return json;
}