getAll method
Retrieves all items from the local database,
optionally filtered by filter
.
The filter
can be any type of object that your repository implementation
can use for filtering (e.g., a Map<String, dynamic>
or a custom filter class).
Implementation
@override
Future<List<T>> getAll({dynamic filter}) async {
// Add filtering logic based on the 'filter' parameter if needed
final maps = await (database).query(
tableName,
where: 'deleted_at IS NULL', // Filter out deleted items
);
return maps.map(fromJson).toList();
}