An interface for asynchronous data sources that notify listeners about changes.
Typically used in state management to track and expose the state of an asynchronous operation (e.g., loading, success, error).
- Inheritance
-
- Object
- Listenable
- AsyncListenable
- Implementers
Properties
- error → Object?
-
The error that occurred, if any.
null
if no error occurred.no setter - hasError → bool
-
Indicates whether an error occurred during the operation.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasResult → bool
-
Indicates whether a valid result is available.
no setter
- isLoading → bool
-
Indicates whether the asynchronous operation is currently loading.
no setter
- result → T?
-
The current result, if available. May be
null
if not yet loaded or if an error occurred.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object notifies its listeners.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that the
object notifies.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited