Implement note deletion

It looks quite ugly, but it works.
This commit is contained in:
Vishesh Handa
2018-05-21 17:16:21 +02:00
parent 973f21a24c
commit 71d1aca6b5
4 changed files with 27 additions and 3 deletions

View File

@ -37,7 +37,8 @@ class FileStorage {
Future<Directory> saveNotes(List<Note> notes) async {
final dir = await getDirectory();
//await dir.delete(recursive: true);
await dir.delete(recursive: true);
await dir.create();
for (var note in notes) {
var filePath = p.join(dir.path, note.id);