Remove info-level lint issues: avoid_dynamic_calls, use_build_context_synchronously, avoid_print, non_constant_identifier_names

- Type dynamic map accesses properly (avoid_dynamic_calls in genericMap, globalFiresBottomStats)
- Capture context before async gaps (use_build_context_synchronously in genericMap, genericMapBottom, globalFiresBottomStats)
- Replace print() with debugPrint() (avoid_print in firesApi.dart)
- Rename fireMarker function and _LayerSelectorButton to camelCase
- Rename variable FireNotifications to fireNotifications
- Fix no_default_cases in switch statements (add missing subscriptionConfirm case)
- Make FireNotification fields final, remove @immutable from YourLocation (mutable)
- Make monitoredAreas field final in _ViewModel
- Update subscribeViaApi to use copyWith instead of direct field assignment
This commit is contained in:
vjrj 2026-03-11 16:53:48 +01:00
parent 82cf8fc7cc
commit 270d9a569e
12 changed files with 72 additions and 61 deletions

View file

@ -269,10 +269,7 @@ void unsubsViaApi(
void subscribeViaApi(Store<AppState> store, YourLocation loc,
void Function(YourLocation) onSubs) {
api.subscribe(store.state, loc).then((String subsId) {
final YourLocation sub = loc;
// if (loc.id != subsId) {
sub.id = objectIdFromJson(subsId);
// }
final YourLocation sub = loc.copyWith(id: objectIdFromJson(subsId));
onSubs(sub);
persistYourLocations(store.state.yourLocations);
});