Checklist constructor
const
Checklist({
- @JsonKey.new(name: 'title') required String title,
- @JsonKey.new(name: 'title_entities') List<
MessageEntity> ? titleEntities, - @JsonKey.new(name: 'tasks') required List<
ChecklistTask> tasks, - @JsonKey.new(name: 'others_can_add_tasks') bool? othersCanAddTasks,
- @JsonKey.new(name: 'others_can_mark_tasks_as_done') bool? othersCanMarkTasksAsDone,
Creates a new Checklist object.
Implementation
const factory Checklist({
/// Title of the checklist
@JsonKey(name: 'title') required String title,
/// Optional. Special entities that appear in the checklist title
@JsonKey(name: 'title_entities') List<MessageEntity>? titleEntities,
/// List of tasks in the checklist
@JsonKey(name: 'tasks') required List<ChecklistTask> tasks,
/// Optional. True, if users other than the creator of the list can add
/// tasks to the list
@JsonKey(name: 'others_can_add_tasks') bool? othersCanAddTasks,
/// Optional. True, if users other than the creator of the list can mark
/// tasks as done or not done
@JsonKey(name: 'others_can_mark_tasks_as_done')
bool? othersCanMarkTasksAsDone,
}) = _Checklist;