small ux improvements

This commit is contained in:
2026-04-13 15:59:46 +02:00
parent b06858c602
commit 2917e71db1
3 changed files with 125 additions and 79 deletions
+7
View File
@@ -163,6 +163,13 @@ class Storage {
await saveCollections(collections);
}
static Future<void> deleteCollectionById(int collectionId) async {
final collections = loadCollections();
await deleteCollection(
collections.firstWhere((collection) => collection.id == collectionId),
);
}
static Map<String, int> getStats() {
final statsJson = _prefs.getString(_statsKey) ?? '{}';
final stats = jsonDecode(statsJson) as Map<String, dynamic>;