AsyncInitial<T extends Object?> class
final
A subclass of AsyncPhase representing the phase where an asynchronous operation has not been executed yet.
- Inheritance
-
- Object
- AsyncPhase<
T> - AsyncInitial
Constructors
- AsyncInitial([T? data])
-
Creates an AsyncInitial object representing the phase
where an asynchronous operation has not been executed yet.
const
Properties
- data → T?
-
The result of an asynchronous operation.
finalinherited
- 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
Methods
-
convert<
U> (U converter(T? data)) → AsyncPhase< U> -
A method that creates a new instance of the same AsyncPhase subtype
with a different generic type based on the value returned by the
converter.
inherited
-
copyAsWaiting(
) → AsyncWaiting< T> -
A method that creates a new AsyncWaiting instance with the existing
data.
inherited
-
copyWith(
T newData) → AsyncPhase< T> -
A method that copies a phase to create a new instance of the same
AsyncPhase subtype with the provided data.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rethrowIfError(
) → void -
A method that rethrows the error if this AsyncPhase instance is
of type AsyncError.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
when<
U> ({required U waiting(T data), required U complete(T data), required U error(T? data, Object e, StackTrace s), U initial(T data)?}) → 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 data)?, U waiting(T data)?, U complete(T data)?, U error(T? data, Object e, StackTrace s)?}) → 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