AsyncError<T extends Object?> class
final
A subclass of AsyncPhase representing the phase where an asynchronous operation has resulted in an error.
- Inheritance
-
- Object
- AsyncPhase<
T> - AsyncError
Constructors
- AsyncError.new({T? data, required Object error, StackTrace stackTrace = StackTrace.empty})
-
Creates an AsyncError object representing the phase
where an asynchronous operation has resulted in an error.
const
Properties
- data → T?
-
The result of an asynchronous operation.
finalinherited
- error → Object
-
The error that occurred in an asynchronous operation.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isComplete → bool
-
Whether the phase is of type AsyncComplete.
no setterinherited
- isError → bool
-
Whether the phase is of type AsyncError.
no setterinherited
- isInitial → bool
-
Whether the phase is of type AsyncInitial.
no setterinherited
- isWaiting → bool
-
Whether the phase is of type AsyncWaiting.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stackTrace → StackTrace
-
The stack trace of the error that occurred in an
asynchronous operation.
no setter
Methods
-
convert<
U> (U converter(T?)) → AsyncPhase< U> -
A method that creates a new object of the same AsyncPhase subtype
with a different generic type based on the phase that this method is
called on.
inherited
-
copyAsWaiting(
) → AsyncWaiting< T> -
A method that creates an AsyncWaiting object based on the
phase that this method is called on.
inherited
-
copyWith(
T newData) → AsyncPhase< T> -
A method that copy a phase to create a new phase with new data.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rethrowError(
) → Never - A utility method that just wraps Error.throwWithStackTrace.
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
U> ({required U waiting(T), required U complete(T), required U error(T?, Object, StackTrace), U initial(T)?}) → U -
A method that returns a value returned from one of callback
functions corresponding to the current phase of an asynchronous
operation.
inherited
-
whenOrNull<
U> ({U initial(T)?, U waiting(T)?, U complete(T)?, U error(T?, Object, StackTrace)?}) → U? -
A method that returns a value returned from one of callback
functions corresponding to the current phase of an asynchronous
operation.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited