DownloadError class sealed

Download error types using sealed classes for exhaustive pattern matching

Implementers
Available extensions

Constructors

DownloadError.canceled()
Download was canceled by user
const
factory
DownloadError.forbidden()
HTTP 403 - Access forbidden (invalid token or gated model)
const
factory
DownloadError.network(String message)
Network error (connection issues, timeouts, etc.)
const
factory
DownloadError.notFound()
HTTP 404 - Resource not found
const
factory
DownloadError.rateLimited()
HTTP 429 - Rate limit exceeded
const
factory
DownloadError.serverError(int statusCode)
HTTP 5xx - Server error
const
factory
DownloadError.unauthorized()
HTTP 401 - Authentication required
const
factory
DownloadError.unknown(String message)
Unknown error
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
isRetryable bool

Available on DownloadError, provided by the DownloadErrorMessage extension

Returns true if error is recoverable by retrying
no setter
requiresUserAction bool

Available on DownloadError, provided by the DownloadErrorMessage extension

Returns true if error requires user action
no setter
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.
inherited
toTitle() String

Available on DownloadError, provided by the DownloadErrorMessage extension

Returns a short error title for UI dialogs
toUserMessage() String

Available on DownloadError, provided by the DownloadErrorMessage extension

Returns a user-friendly error message

Operators

operator ==(Object other) bool
The equality operator.
inherited