ResourceRepositoryImpl class
Concrete implementation of ResourceRepository.
This implementation coordinates between remote and local data sources to provide caching, offline support, and error handling.
- Implemented types
Constructors
- ResourceRepositoryImpl({required RemoteDataSource remoteDataSource, LocalDataSource? localDataSource})
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
-
dispose(
) → void -
Disposes of resources.
override
-
fetch<
T> (Endpoint endpoint, {Map< String, dynamic> ? queryParams, Map<String, String> ? pathParams, bool forceRefresh = false}) → Future<Result< T> > -
Fetches a resource from the given endpoint.
override
-
invalidate(
List< String> endpointIds) → Future<void> -
Invalidates cached data for the given endpoint IDs.
override
-
mutate<
T> (Endpoint endpoint, {dynamic body, Map< String, String> ? pathParams}) → Future<Result< T> > -
Performs a mutation (POST, PUT, DELETE) on the given endpoint.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
watch<
T> (Endpoint endpoint, {Map< String, dynamic> ? queryParams, Map<String, String> ? pathParams}) → Stream<T> -
Watches a resource for real-time updates.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited