copyWith method

Task copyWith({
  1. String? id,
  2. String? localId,
  3. String? spaceId,
  4. String? pageId,
  5. String? blogPostId,
  6. TaskStatus? status,
  7. BodySingle? body,
  8. String? createdBy,
  9. String? assignedTo,
  10. String? completedBy,
  11. DateTime? createdAt,
  12. DateTime? updatedAt,
  13. DateTime? dueAt,
  14. DateTime? completedAt,
})

Implementation

Task copyWith(
    {String? id,
    String? localId,
    String? spaceId,
    String? pageId,
    String? blogPostId,
    TaskStatus? status,
    BodySingle? body,
    String? createdBy,
    String? assignedTo,
    String? completedBy,
    DateTime? createdAt,
    DateTime? updatedAt,
    DateTime? dueAt,
    DateTime? completedAt}) {
  return Task(
    id: id ?? this.id,
    localId: localId ?? this.localId,
    spaceId: spaceId ?? this.spaceId,
    pageId: pageId ?? this.pageId,
    blogPostId: blogPostId ?? this.blogPostId,
    status: status ?? this.status,
    body: body ?? this.body,
    createdBy: createdBy ?? this.createdBy,
    assignedTo: assignedTo ?? this.assignedTo,
    completedBy: completedBy ?? this.completedBy,
    createdAt: createdAt ?? this.createdAt,
    updatedAt: updatedAt ?? this.updatedAt,
    dueAt: dueAt ?? this.dueAt,
    completedAt: completedAt ?? this.completedAt,
  );
}