ErrorOperation<T> class final

Represents a failed operation with error details. Can optionally retain cached data from a previous successful operation.

Inheritance

Constructors

ErrorOperation.new({String? message, Object? exception, StackTrace? stackTrace, T? data})
Creates an error state with the specified error details.
const

Properties

data → T?
The data associated with the operation, if any.
no setterinherited
exception Object?
The exception object that caused the error.
final
hasData bool
Whether this state has associated data.
no setterinherited
hashCode int
The hash code for this object.
no setteroverride
hasNoData bool
Whether this state has no associated data.
no setterinherited
isError bool
A convenience getter to check if the operation has encountered an error.
no setterinherited
isIdle bool
A convenience getter to check if the operation is idle.
no setterinherited
isLoading bool
A convenience getter to check if the operation is currently loading and not an idle state.
no setterinherited
isNotError bool
A convenience getter to check if the operation has not encountered an error.
no setterinherited
isNotIdle bool
A convenience getter to check if the operation is not idle.
no setterinherited
isNotLoading bool
A convenience getter to check if the operation is currently not loading.
no setterinherited
isNotSuccess bool
A convenience getter to check if the operation has not successfully loaded data.
no setterinherited
isSuccess bool
A convenience getter to check if the operation has successfully loaded data.
no setterinherited
message String?
Human-readable error message for display to users.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
stackTrace StackTrace?
Stack trace from when the error occurred.
final

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.
override