From 91754714313f319eca5e71fa35a5b4d511679b51 Mon Sep 17 00:00:00 2001 From: marco Date: Tue, 28 Jan 2025 22:44:44 +0100 Subject: [PATCH] explicitely typed silent variable --- lib/services/flood_station_provider.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/services/flood_station_provider.dart b/lib/services/flood_station_provider.dart index e8de0d2..c82a65f 100644 --- a/lib/services/flood_station_provider.dart +++ b/lib/services/flood_station_provider.dart @@ -18,7 +18,7 @@ class FloodStationProvider extends ChangeNotifier { /// loads all stations in batches of 500 and notifies listeners with every loop except if [silent] = true /// this has lower performance than loading them all at once an shouldn't be used - Future loadAllStationsInBatches({silent = false}) { + Future loadAllStationsInBatches({bool silent = false}) { int offset = 0; return Future.doWhile(() async { final stations = await Api.fetchStationsByRange(500, offset); @@ -36,7 +36,7 @@ class FloodStationProvider extends ChangeNotifier { } /// loads all flood stations and notifies listeners when done - Future loadAllStations({silent = false}) { + Future loadAllStations({bool silent = false}) { return Api.fetchAllStations().then( (value) { _allStations = value; @@ -48,7 +48,7 @@ class FloodStationProvider extends ChangeNotifier { } /// loads all stations whose label contains [filter] - Future loadFilteredStations(String filter, {silent = false}) { + Future loadFilteredStations(String filter, {bool silent = false}) { if (_filteredStationsFuture != null) { _filteredStationsFuture!.cancel(); }