CoderAsyncState<T> class
A container for async operation state, including loading, data, and error.
Constructors
- CoderAsyncState.data(T data)
-
Factory to create a state containing
data.factory - CoderAsyncState.error(String error)
-
Factory to create a state containing
errormessage.factory - CoderAsyncState.idle()
-
Factory to create an idle state (no loading, no data, no error).
factory
- CoderAsyncState.loading()
-
Factory to create a loading state.
factory
Properties
- data → T?
-
Holds the result data if the operation is successful.
final
- error → String?
-
Holds the error message if the operation failed.
final
- hasData → bool
-
Returns true if data is present.
no setter
- hasError → bool
-
Returns true if error is present.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- isLoading → bool
-
Indicates whether the async operation is in loading state.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited