Files
GitJournal/lib/storage/notes_repository.dart
Vishesh Handa ac5c2be05d Add a GitHost interface
GitLab and GitHost are two implementations of that interface.
2019-01-25 11:21:58 +01:00

26 lines
506 B
Dart

import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:journal/note.dart';
class NoteRepoResult {
bool error;
String noteFilePath;
NoteRepoResult({
@required this.error,
this.noteFilePath,
});
}
abstract class NoteRepository {
// TODO: Better error message!
Future<bool> sync();
Future<NoteRepoResult> addNote(Note note);
Future<NoteRepoResult> updateNote(Note note);
Future<NoteRepoResult> removeNote(Note note);
Future<List<Note>> listNotes();
}