DownloadError class
Represents a failure that occurred during the file download process from a remote storage source (e.g. Firebase Storage).
Each instance captures:
- remotePath: the path of the file in remote storage.
- code: a specific DownloadErrorCode describing the type of failure.
- message: an optional human-readable description of the error.
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
Constructors
- DownloadError({required String remotePath, required DownloadErrorCode code, required String message})
- Represents a failure that occurred during the file download process from a remote storage source (e.g. Firebase Storage).
Properties
- code → DownloadErrorCode
-
Specific error type describing why the download failed.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
Optional human-readable description of the error.
final
- remotePath → String
-
Path of the file in remote storage that failed to download.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited