mirror of
https://github.com/koloideal/Casha.git
synced 2026-06-10 10:25:28 +03:00
update
This commit is contained in:
@@ -21,6 +21,12 @@ class BudgetNotifier extends StateNotifier<double?> {
|
||||
await _storage.saveBudget(budget);
|
||||
state = budget;
|
||||
}
|
||||
|
||||
void onCurrencyChanged(String oldCode, String newCode, ExchangeRateService rates) {
|
||||
if (state == null) return;
|
||||
final converted = rates.convert(state!, oldCode, newCode);
|
||||
setBudget(converted);
|
||||
}
|
||||
}
|
||||
|
||||
// Currency info: symbol and code
|
||||
|
||||
Reference in New Issue
Block a user