From fd98ef1048177dfdd49af32c4f9c4e649bdbebd5 Mon Sep 17 00:00:00 2001 From: Vishesh Handa Date: Sun, 3 Jun 2018 19:34:28 +0200 Subject: [PATCH] Reverse sort the notes This way the latest note is on top. --- lib/file_storage.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/file_storage.dart b/lib/file_storage.dart index 3c7af224..3e394e83 100644 --- a/lib/file_storage.dart +++ b/lib/file_storage.dart @@ -30,6 +30,8 @@ class FileStorage { notes.add(note); } + // Reverse sort + notes.sort((a, b) => b.compareTo(a)); return notes; }