Enable core library desugaring and update RentController to accept a notification service; add backup compatibility tests

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-20 09:35:57 +01:00
parent 477ca0ee07
commit 1eb8f90fa1
3 changed files with 210 additions and 1 deletions
+3 -1
View File
@@ -41,6 +41,7 @@ class RentController extends ChangeNotifier {
RentController({
StorageService? storageService,
ForexRateApiService? exchangeService,
NotificationService? notificationService,
}) : _storageService = storageService ?? StorageService(),
_exchangeService =
exchangeService ??
@@ -48,7 +49,8 @@ class RentController extends ChangeNotifier {
httpClient: http.Client(),
apiKey: _exchangeRateApiKeyFromEnv(),
) {
_notificationService = NotificationService(_onNotificationAction);
_notificationService =
notificationService ?? NotificationService(_onNotificationAction);
}
static String _exchangeRateApiKeyFromEnv() {