DownloadState constructor

const DownloadState({
  1. required String remotePath,
  2. required bool isDownloading,
})

Represents the current status of a file download operation.

This model tracks whether a file (identified by its remotePath) is actively being downloaded or not. It is typically used to coordinate download queue behavior, UI indicators, or analytics events.

The isDownloading flag indicates if the download is currently in progress (true) or idle/paused/completed (false).

Example:

final state = DownloadState(
  remotePath: 'media/files/sample.pdf',
  isDownloading: true,
);

This class implements Equatable for easy value comparison in streams and state updates.

Implementation

const DownloadState({required this.remotePath, required this.isDownloading});