DownloadError constructor

DownloadError({
  1. required String remotePath,
  2. required DownloadErrorCode code,
  3. required String message,
})

Represents a failure that occurred during the file download process from a remote storage source (e.g. Firebase Storage).

Each instance captures:

This class is used by download managers or error handlers to track, log, or react to failed download attempts.

Example:

final error = DownloadError(
  remotePath: 'files/user/avatar.png',
  code: DownloadErrorCode.networkError,
  message: 'No internet connection',
);
print(error); // DownloadError(remotePath: files/user/avatar.png): errorCode: networkError => message: No internet connection

Implementation

DownloadError({required this.remotePath, required this.code, required this.message});