fromJson static method
Implementation
static InputChecklist? fromJson(Map<String, dynamic>? json) {
if (json == null) {
return null;
}
return InputChecklist(
title: FormattedText.fromJson(tdMapFromJson(json['title'])),
tasks: List<InputChecklistTask>.from(
tdListFromJson(json['tasks'])
.map((item) => InputChecklistTask.fromJson(tdMapFromJson(item)))
.whereType<InputChecklistTask>(),
),
othersCanAddTasks: (json['others_can_add_tasks'] as bool?) ?? false,
othersCanMarkTasksAsDone:
(json['others_can_mark_tasks_as_done'] as bool?) ?? false,
);
}