copyWith method

InputChecklist copyWith({
  1. FormattedText? title,
  2. List<InputChecklistTask>? tasks,
  3. bool? othersCanAddTasks,
  4. bool? othersCanMarkTasksAsDone,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

InputChecklist copyWith({
  FormattedText? title,
  List<InputChecklistTask>? tasks,
  bool? othersCanAddTasks,
  bool? othersCanMarkTasksAsDone,
}) => InputChecklist(
  title: title ?? this.title,
  tasks: tasks ?? this.tasks,
  othersCanAddTasks: othersCanAddTasks ?? this.othersCanAddTasks,
  othersCanMarkTasksAsDone:
      othersCanMarkTasksAsDone ?? this.othersCanMarkTasksAsDone,
);