Task.fromJson constructor
Task.fromJson(
- dynamic json
Implementation
Task.fromJson(dynamic json) {
_id = json['id'];
_task = json['task'];
_scheduleType = json['schedule_type'];
_scheduleTime = json['schedule_time'];
_nextOccuranceTime = json['next_occurance_time'];
_parentTaskId = json['parent_task_id'];
_isPrimaryTask = json['is_primary_task'];
_priority = json['priority'];
_dueDate = json['due_date'];
_status = json['status'];
_timestamp = json['timestamp'];
_description = json['description'];
_isPinned = json['is_pinned'];
_fromUserId = json['from_user_id'];
_overDue = json['over_due'];
_priorityText = json['priority_text'];
if (json['attachments'] != null) {
_attachments = [];
json['attachments'].forEach((v) {
_attachments?.add(Attachments.fromJson(v));
});
}
if (json['comments'] != null) {
_comments = [];
json['comments'].forEach((v) {
_comments?.add(Comments.fromJson(v));
});
}
if (json['members'] != null) {
_members = [];
json['members'].forEach((v) {
_members?.add(Members.fromJson(v));
});
}
_assignedMembers = json['assigned_members'];
_observerMembers = json['observer_members'];
_projectId = json['project_id'];
}