import '../api/notes_api.dart'; import '../models/note.dart'; class NotesRepository { final NotesApi _api; const NotesRepository(this._api); Future> getAll() => _api.getAll(); Future getOne(int id) => _api.getOne(id); Future create(String title, String body) => _api.create(title, body); Future update(int id, String title, String body) => _api.update(id, title, body); Future delete(int id) => _api.delete(id); }