copyWith method
ChecklistTask
copyWith({
- int? id,
- FormattedText? text,
- MessageSender? completedBy()?,
- int? completionDate,
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
ChecklistTask copyWith({
int? id,
FormattedText? text,
MessageSender? Function()? completedBy,
int? completionDate,
}) => ChecklistTask(
id: id ?? this.id,
text: text ?? this.text,
completedBy: completedBy != null ? completedBy() : this.completedBy,
completionDate: completionDate ?? this.completionDate,
);