NetworkError class

Annotations
  • @freezed

Constructors

NetworkError.noInternet()
const
factory
NetworkError.other({required DioError e})
const
factory
NetworkError.serverError({Response? response})
const
factory
NetworkError.timeout()
const
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

map<TResult extends Object?>({required TResult noInternet(_NoInternet value), required TResult serverError(_ServerError value), required TResult timeout(_Timeout value), required TResult other(_Other value)}) → TResult
inherited
mapOrNull<TResult extends Object?>({TResult? noInternet(_NoInternet value)?, TResult? serverError(_ServerError value)?, TResult? timeout(_Timeout value)?, TResult? other(_Other value)?}) → TResult?
inherited
maybeMap<TResult extends Object?>({TResult noInternet(_NoInternet value)?, TResult serverError(_ServerError value)?, TResult timeout(_Timeout value)?, TResult other(_Other value)?, required TResult orElse()}) → TResult
inherited
maybeWhen<TResult extends Object?>({TResult noInternet()?, TResult serverError(Response? response)?, TResult timeout()?, TResult other(DioException e)?, required TResult orElse()}) → TResult
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>({required TResult noInternet(), required TResult serverError(Response? response), required TResult timeout(), required TResult other(DioException e)}) → TResult
inherited
whenOrNull<TResult extends Object?>({TResult? noInternet()?, TResult? serverError(Response? response)?, TResult? timeout()?, TResult? other(DioException e)?}) → TResult?
inherited

Operators

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