This commit is contained in:
2026-03-20 16:56:24 +03:00
parent 9835206a78
commit 582e21a7e2
3 changed files with 100 additions and 14 deletions
+6
View File
@@ -42,6 +42,12 @@ class TransactionsNotifier extends StateNotifier<List<Transaction>> {
state = [...state, transaction];
_storage.addTransaction(transaction);
}
void clearAll() {
state = [];
// also clear from SharedPreferences:
SharedPreferences.getInstance().then((prefs) => prefs.remove('transactions'));
}
}
// Search and filter state