copyWith method

UploadTask copyWith({
  1. String? id,
  2. String? mediaId,
  3. String? localPath,
  4. String? storagePath,
  5. CloudMediaType? type,
  6. int? retryCount,
  7. DateTime? createdAt,
  8. DateTime? lastAttemptAt,
  9. UploadTaskStatus? taskStatus,
})

Implementation

UploadTask copyWith({
  String? id,
  String? mediaId,
  String? localPath,
  String? storagePath,
  CloudMediaType? type,
  int? retryCount,
  DateTime? createdAt,
  DateTime? lastAttemptAt,
  UploadTaskStatus? taskStatus,
}) {
  return UploadTask(
    id: id ?? this.id,
    mediaId: mediaId ?? this.mediaId,
    localPath: localPath ?? this.localPath,
    storagePath: storagePath ?? this.storagePath,
    type: type ?? this.type,
    retryCount: retryCount ?? this.retryCount,
    createdAt: createdAt ?? this.createdAt,
    lastAttemptAt: lastAttemptAt ?? this.lastAttemptAt,
    taskStatus: taskStatus ?? this.taskStatus,
  );
}