BaseRepository<T> class

A generic repository class for handling data retrieval from APIs.

This class provides methods for common CRUD operations on data entities.

Constructors

BaseRepository(BaseApi api, T fromJson(Map<String, dynamic>))
Constructs a BaseRepository instance with the specified API and JSON parsing function.

Properties

api BaseApi
final
fromJson → T Function(Map<String, dynamic>)
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

get({Map<String, dynamic>? queryParameters}) Future<List<T>>
Retrieves a list of entities from the API based on the provided query.
getById(String id) Future<T>
Retrieves a single entity by its unique identifier from the API.
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