explicitely typed silent variable

This commit is contained in:
2025-01-28 22:44:44 +01:00
parent 698778a7e0
commit 9175471431

View File

@@ -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();
}