feat: add todo cache repository and precise invalidation
This commit is contained in:
@@ -17,6 +17,10 @@ class TodoApi {
|
||||
return data.map((json) => TodoResponse.fromJson(json)).toList();
|
||||
}
|
||||
|
||||
Future<List<TodoResponse>> getPendingTodos() {
|
||||
return getTodos(status: 'pending');
|
||||
}
|
||||
|
||||
Future<TodoResponse> getTodo(String id) async {
|
||||
final response = await _client.get('$_prefix/$id');
|
||||
return TodoResponse.fromJson(response.data);
|
||||
|
||||
Reference in New Issue
Block a user