copyWith method
Checklist
copyWith({
- FormattedText? title,
- List<
ChecklistTask> ? tasks, - bool? othersCanAddTasks,
- bool? canAddTasks,
- bool? othersCanMarkTasksAsDone,
- bool? canMarkTasksAsDone,
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
Checklist copyWith({
FormattedText? title,
List<ChecklistTask>? tasks,
bool? othersCanAddTasks,
bool? canAddTasks,
bool? othersCanMarkTasksAsDone,
bool? canMarkTasksAsDone,
}) => Checklist(
title: title ?? this.title,
tasks: tasks ?? this.tasks,
othersCanAddTasks: othersCanAddTasks ?? this.othersCanAddTasks,
canAddTasks: canAddTasks ?? this.canAddTasks,
othersCanMarkTasksAsDone:
othersCanMarkTasksAsDone ?? this.othersCanMarkTasksAsDone,
canMarkTasksAsDone: canMarkTasksAsDone ?? this.canMarkTasksAsDone,
);