ResourceStateAdapter class abstract
Abstract interface for managing resource states specifically.
Extends StateAdapter with resource-specific operations.
- Inheritance
-
- Object
- StateAdapter
- ResourceStateAdapter
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clearState(
String resourceId) → void -
Clears the state for a resource.
inherited
-
dispose(
) → void -
Disposes of resources.
inherited
-
getState<
T> (String resourceId) → ResourceState< T> ? -
Gets the current state for a resource.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refresh(
String resourceId) → Future< void> - Refreshes a resource (fetches fresh data).
-
setError(
String resourceId, dynamic error) → void - Sets a resource to error state.
-
setLoading(
String resourceId) → void - Starts loading a resource.
-
setState<
T> (String resourceId, ResourceState< T> value) → void -
Updates the state for a resource.
inherited
-
setSuccess<
T> (String resourceId, T data) → void - Sets a resource to success state with data.
-
toString(
) → String -
A string representation of this object.
inherited
-
watchState<
T> (String resourceId) → Stream< ResourceState< T> ?> -
Watches state changes for a resource as a stream.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited