toJson method
Implementation
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['task'] = _task;
map['schedule_type'] = _scheduleType;
map['schedule_time'] = _scheduleTime;
map['next_occurance_time'] = _nextOccuranceTime;
map['parent_task_id'] = _parentTaskId;
map['is_primary_task'] = _isPrimaryTask;
map['priority'] = _priority;
map['due_date'] = _dueDate;
map['status'] = _status;
map['timestamp'] = _timestamp;
map['description'] = _description;
map['is_pinned'] = _isPinned;
map['from_user_id'] = _fromUserId;
map['over_due'] = _overDue;
map['priority_text'] = _priorityText;
if (_attachments != null) {
map['attachments'] = _attachments?.map((v) => v.toJson()).toList();
}
if (_comments != null) {
map['comments'] = _comments?.map((v) => v.toJson()).toList();
}
if (_members != null) {
map['members'] = _members?.map((v) => v.toJson()).toList();
}
map['assigned_members'] = _assignedMembers;
map['observer_members'] = _observerMembers;
map['project_id'] = _projectId;
return map;
}