copyWith method

FileDownload copyWith({
  1. int? fileId,
  2. Message? message,
  3. int? addDate,
  4. int? completeDate,
  5. bool? isPaused,
})

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

Implementation

FileDownload copyWith({
  int? fileId,
  Message? message,
  int? addDate,
  int? completeDate,
  bool? isPaused,
}) =>
    FileDownload(
      fileId: fileId ?? this.fileId,
      message: message ?? this.message,
      addDate: addDate ?? this.addDate,
      completeDate: completeDate ?? this.completeDate,
      isPaused: isPaused ?? this.isPaused,
    );