big
This commit is contained in:
2026-06-28 02:19:57 +03:00
parent ed45748c95
commit bc51609f85
26 changed files with 1757 additions and 1525 deletions
-18
View File
@@ -8,7 +8,6 @@ const _uuid = Uuid();
class StorageService {
static const _transactionsKey = 'transactions';
static const _budgetKey = 'monthly_budget';
static const _currencyKey = 'currency_symbol';
static const _themeKey = 'is_dark_mode';
@@ -90,23 +89,6 @@ class StorageService {
});
}
double? loadBudget() {
return _prefs.getDouble(_budgetKey);
}
Future<Result<void>> saveBudget(double? budget) async {
return asyncResultOf(() async {
if (budget == null) {
await _prefs.remove(_budgetKey);
} else {
if (budget < 0) {
throw Exception('Budget cannot be negative');
}
await _prefs.setDouble(_budgetKey, budget);
}
});
}
String loadCurrency() {
return _prefs.getString(_currencyKey) ?? '\$';
}