ErrorStatus<T, S> class

Inheritance

Constructors

ErrorStatus([S? error])
const

Properties

dataOrNull → T?
Returns the data if isSuccess, otherwise null.
no setterinherited
error → S?
final
errorOrNull Object?
Returns the error if isError, otherwise null.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
no setterinherited
isError bool
no setterinherited
isLoading bool
no setterinherited
isSuccess bool
no setterinherited
props List
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

maybeWhen<R>({R loading()?, R success(T data)?, R error(Object error)?, R empty()?, R custom()?, required R orElse()}) → R
Partial pattern matching with a required orElse fallback.
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<R>({required R loading(), required R success(T data), required R error(Object error), required R empty(), R custom()?}) → R
Exhaustive pattern matching — all cases must be handled.
inherited

Operators

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