copyWith method

Task copyWith({
  1. dynamic id,
  2. dynamic localId,
  3. dynamic spaceId,
  4. dynamic pageId,
  5. dynamic 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(
    {dynamic id,
    dynamic localId,
    dynamic spaceId,
    dynamic pageId,
    dynamic 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,
  );
}