fix: resolve 2 remaining strict analysis errors

- introPage.dart: Convert fireItems to proper static function closure
- mainDrawer.dart: Convert unreadCount int to String for Text widget
This commit is contained in:
vjrj 2026-03-06 11:21:06 +01:00
parent 1864e5b105
commit 7a4c9fb3bc
61 changed files with 1386 additions and 1202 deletions

View file

@ -1,35 +1,35 @@
import 'package:fires_flutter/models/yourLocation.dart';
import 'package:redux/redux.dart';
import '../models/yourLocation.dart';
import 'actions.dart';
final yourLocationsReducer = combineReducers<List<YourLocation>>([
new TypedReducer<List<YourLocation>, AddedYourLocationAction>(
final Reducer<List<YourLocation>> yourLocationsReducer = combineReducers<List<YourLocation>>(<Reducer<List<YourLocation>>>[
TypedReducer<List<YourLocation>, AddedYourLocationAction>(
_addedYourLocation),
new TypedReducer<List<YourLocation>, DeletedYourLocationAction>(
TypedReducer<List<YourLocation>, DeletedYourLocationAction>(
_deletedYourLocation),
new TypedReducer<List<YourLocation>, UpdatedYourLocationAction>(
TypedReducer<List<YourLocation>, UpdatedYourLocationAction>(
_updatedYourLocation),
new TypedReducer<List<YourLocation>, ToggledSubscriptionAction>(
TypedReducer<List<YourLocation>, ToggledSubscriptionAction>(
_toggledSubscriptionAction)
]);
List<YourLocation> _addedYourLocation(
List<YourLocation> yourLocations, AddedYourLocationAction action) {
return new List.from(yourLocations)..add(action.loc);
return List.from(yourLocations)..add(action.loc);
}
List<YourLocation> _deletedYourLocation(
List<YourLocation> yourLocations, DeletedYourLocationAction action) {
return yourLocations
.where((yourLocation) => yourLocation.id != action.id)
.where((YourLocation yourLocation) => yourLocation.id != action.id)
.toList();
}
List<YourLocation> _updatedYourLocation(
List<YourLocation> yourLocations, UpdatedYourLocationAction action) {
return yourLocations
.map((yourLocation) =>
.map((YourLocation yourLocation) =>
yourLocation.id == action.loc.id ? action.loc : yourLocation)
.toList();
}
@ -37,7 +37,7 @@ List<YourLocation> _updatedYourLocation(
List<YourLocation> _toggledSubscriptionAction(
List<YourLocation> yourLocations, ToggledSubscriptionAction action) {
return yourLocations
.map((yourLocation) =>
.map((YourLocation yourLocation) =>
yourLocation.id == action.loc.id ? action.loc : yourLocation)
.toList();
}