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, { List tags = const [], int? projectId, String noteType = 'note', }) => _api.create(title, body, tags: tags, projectId: projectId, noteType: noteType); Future update( int id, String title, String body, { List tags = const [], int? projectId, bool clearProject = false, String noteType = 'note', }) => _api.update(id, title, body, tags: tags, projectId: projectId, clearProject: clearProject, noteType: noteType); Future delete(int id) => _api.delete(id); }