From 270d9a569e38e35204a1c6246531fcbe537e5d02 Mon Sep 17 00:00:00 2001 From: vjrj Date: Wed, 11 Mar 2026 16:53:48 +0100 Subject: [PATCH] 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 --- .flutter-plugins-dependencies | 2 +- lib/fireMarker.dart | 2 +- lib/genericMap.dart | 68 +++++++++++++----------- lib/genericMapBottom.dart | 19 ++++--- lib/globalFiresBottomStats.dart | 11 ++-- lib/layerSelectorMapPlugin.dart | 4 +- lib/models/fireNotification.dart | 2 +- lib/models/fireNotificationsPersist.dart | 4 +- lib/models/firesApi.dart | 4 +- lib/models/yourLocation.dart | 10 ++-- lib/monitoredAreas.dart | 2 +- lib/redux/fetchDataMiddleware.dart | 5 +- 12 files changed, 72 insertions(+), 61 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 0f68575..b5df01a 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"connectivity_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/connectivity_plus-5.0.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_core","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_messaging-14.9.4/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"geocoding_ios","path":"/home/vjrj/.pub-cache/hosted/pub.dev/geocoding_ios-2.3.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"in_app_review","path":"/home/vjrj/.pub-cache/hosted/pub.dev/in_app_review-2.0.11/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"location","path":"/home/vjrj/.pub-cache/hosted/pub.dev/location-5.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/package_info_plus-6.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/home/vjrj/.pub-cache/hosted/pub.dev/path_provider_foundation-2.6.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/home/vjrj/.pub-cache/hosted/pub.dev/sentry_flutter-7.20.2/","native_build":true,"dependencies":["package_info_plus"],"dev_dependency":false},{"name":"share_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/share_plus-7.2.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/home/vjrj/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_ios","path":"/home/vjrj/.pub-cache/hosted/pub.dev/url_launcher_ios-6.4.1/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"connectivity_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/connectivity_plus-5.0.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_core","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_messaging-14.9.4/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"geocoding_android","path":"/home/vjrj/.pub-cache/hosted/pub.dev/geocoding_android-3.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"in_app_review","path":"/home/vjrj/.pub-cache/hosted/pub.dev/in_app_review-2.0.11/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"location","path":"/home/vjrj/.pub-cache/hosted/pub.dev/location-5.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/package_info_plus-6.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/home/vjrj/.pub-cache/hosted/pub.dev/path_provider_android-2.2.22/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/home/vjrj/.pub-cache/hosted/pub.dev/sentry_flutter-7.20.2/","native_build":true,"dependencies":["package_info_plus"],"dev_dependency":false},{"name":"share_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/share_plus-7.2.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/home/vjrj/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.21/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_android","path":"/home/vjrj/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.28/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"connectivity_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/connectivity_plus-5.0.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_core","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_messaging-14.9.4/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"in_app_review","path":"/home/vjrj/.pub-cache/hosted/pub.dev/in_app_review-2.0.11/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"location","path":"/home/vjrj/.pub-cache/hosted/pub.dev/location-5.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/package_info_plus-6.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/home/vjrj/.pub-cache/hosted/pub.dev/path_provider_foundation-2.6.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/home/vjrj/.pub-cache/hosted/pub.dev/sentry_flutter-7.20.2/","native_build":true,"dependencies":["package_info_plus"],"dev_dependency":false},{"name":"share_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/share_plus-7.2.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/home/vjrj/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_macos","path":"/home/vjrj/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.5/","native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"connectivity_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/connectivity_plus-5.0.2/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/package_info_plus-6.0.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"/home/vjrj/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/home/vjrj/.pub-cache/hosted/pub.dev/sentry_flutter-7.20.2/","native_build":true,"dependencies":["package_info_plus"],"dev_dependency":false},{"name":"share_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/share_plus-7.2.2/","native_build":false,"dependencies":["url_launcher_linux"],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/vjrj/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false},{"name":"url_launcher_linux","path":"/home/vjrj/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.2/","native_build":true,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"connectivity_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/connectivity_plus-5.0.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_core","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/package_info_plus-6.0.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"/home/vjrj/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/home/vjrj/.pub-cache/hosted/pub.dev/sentry_flutter-7.20.2/","native_build":true,"dependencies":["package_info_plus"],"dev_dependency":false},{"name":"share_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/share_plus-7.2.2/","native_build":true,"dependencies":["url_launcher_windows"],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/vjrj/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false},{"name":"url_launcher_windows","path":"/home/vjrj/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.5/","native_build":true,"dependencies":[],"dev_dependency":false}],"web":[{"name":"connectivity_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/connectivity_plus-5.0.2/","dependencies":[],"dev_dependency":false},{"name":"firebase_core_web","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_core_web-2.17.5/","dependencies":[],"dev_dependency":false},{"name":"firebase_messaging_web","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_messaging_web-3.8.7/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"location_web","path":"/home/vjrj/.pub-cache/hosted/pub.dev/location_web-4.2.0/","dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/package_info_plus-6.0.0/","dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/home/vjrj/.pub-cache/hosted/pub.dev/sentry_flutter-7.20.2/","dependencies":["package_info_plus"],"dev_dependency":false},{"name":"share_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/share_plus-7.2.2/","dependencies":["url_launcher_web"],"dev_dependency":false},{"name":"shared_preferences_web","path":"/home/vjrj/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false},{"name":"url_launcher_web","path":"/home/vjrj/.pub-cache/hosted/pub.dev/url_launcher_web-2.4.2/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"connectivity_plus","dependencies":[]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_messaging","dependencies":["firebase_core","firebase_messaging_web"]},{"name":"firebase_messaging_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"geocoding","dependencies":["geocoding_android","geocoding_ios"]},{"name":"geocoding_android","dependencies":[]},{"name":"geocoding_ios","dependencies":[]},{"name":"in_app_review","dependencies":[]},{"name":"location","dependencies":["location_web"]},{"name":"location_web","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"sentry_flutter","dependencies":["package_info_plus"]},{"name":"share_plus","dependencies":["url_launcher_web","url_launcher_windows","url_launcher_linux"]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2026-03-07 18:15:40.315430","version":"3.41.2","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"connectivity_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/connectivity_plus-5.0.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_core","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_messaging-14.9.4/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"geocoding_ios","path":"/home/vjrj/.pub-cache/hosted/pub.dev/geocoding_ios-2.3.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"in_app_review","path":"/home/vjrj/.pub-cache/hosted/pub.dev/in_app_review-2.0.11/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"location","path":"/home/vjrj/.pub-cache/hosted/pub.dev/location-5.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/package_info_plus-6.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/home/vjrj/.pub-cache/hosted/pub.dev/path_provider_foundation-2.6.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/home/vjrj/.pub-cache/hosted/pub.dev/sentry_flutter-7.20.2/","native_build":true,"dependencies":["package_info_plus"],"dev_dependency":false},{"name":"share_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/share_plus-7.2.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/home/vjrj/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_ios","path":"/home/vjrj/.pub-cache/hosted/pub.dev/url_launcher_ios-6.4.1/","native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"connectivity_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/connectivity_plus-5.0.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_core","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_messaging-14.9.4/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"geocoding_android","path":"/home/vjrj/.pub-cache/hosted/pub.dev/geocoding_android-3.3.1/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"in_app_review","path":"/home/vjrj/.pub-cache/hosted/pub.dev/in_app_review-2.0.11/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"location","path":"/home/vjrj/.pub-cache/hosted/pub.dev/location-5.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/package_info_plus-6.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/home/vjrj/.pub-cache/hosted/pub.dev/path_provider_android-2.2.22/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/home/vjrj/.pub-cache/hosted/pub.dev/sentry_flutter-7.20.2/","native_build":true,"dependencies":["package_info_plus"],"dev_dependency":false},{"name":"share_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/share_plus-7.2.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_android","path":"/home/vjrj/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.21/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_android","path":"/home/vjrj/.pub-cache/hosted/pub.dev/url_launcher_android-6.3.28/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"connectivity_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/connectivity_plus-5.0.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_core","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_messaging","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_messaging-14.9.4/","native_build":true,"dependencies":["firebase_core"],"dev_dependency":false},{"name":"in_app_review","path":"/home/vjrj/.pub-cache/hosted/pub.dev/in_app_review-2.0.11/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"location","path":"/home/vjrj/.pub-cache/hosted/pub.dev/location-5.0.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/package_info_plus-6.0.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/home/vjrj/.pub-cache/hosted/pub.dev/path_provider_foundation-2.6.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/home/vjrj/.pub-cache/hosted/pub.dev/sentry_flutter-7.20.2/","native_build":true,"dependencies":["package_info_plus"],"dev_dependency":false},{"name":"share_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/share_plus-7.2.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_foundation","path":"/home/vjrj/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.6/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false},{"name":"url_launcher_macos","path":"/home/vjrj/.pub-cache/hosted/pub.dev/url_launcher_macos-3.2.5/","native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"connectivity_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/connectivity_plus-5.0.2/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/package_info_plus-6.0.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"/home/vjrj/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/home/vjrj/.pub-cache/hosted/pub.dev/sentry_flutter-7.20.2/","native_build":true,"dependencies":["package_info_plus"],"dev_dependency":false},{"name":"share_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/share_plus-7.2.2/","native_build":false,"dependencies":["url_launcher_linux"],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/vjrj/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false},{"name":"url_launcher_linux","path":"/home/vjrj/.pub-cache/hosted/pub.dev/url_launcher_linux-3.2.2/","native_build":true,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"connectivity_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/connectivity_plus-5.0.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"firebase_core","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_core-2.32.0/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/package_info_plus-6.0.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"/home/vjrj/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/home/vjrj/.pub-cache/hosted/pub.dev/sentry_flutter-7.20.2/","native_build":true,"dependencies":["package_info_plus"],"dev_dependency":false},{"name":"share_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/share_plus-7.2.2/","native_build":true,"dependencies":["url_launcher_windows"],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/vjrj/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false},{"name":"url_launcher_windows","path":"/home/vjrj/.pub-cache/hosted/pub.dev/url_launcher_windows-3.1.5/","native_build":true,"dependencies":[],"dev_dependency":false}],"web":[{"name":"connectivity_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/connectivity_plus-5.0.2/","dependencies":[],"dev_dependency":false},{"name":"firebase_core_web","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_core_web-2.17.5/","dependencies":[],"dev_dependency":false},{"name":"firebase_messaging_web","path":"/home/vjrj/.pub-cache/hosted/pub.dev/firebase_messaging_web-3.8.7/","dependencies":["firebase_core_web"],"dev_dependency":false},{"name":"location_web","path":"/home/vjrj/.pub-cache/hosted/pub.dev/location_web-4.2.0/","dependencies":[],"dev_dependency":false},{"name":"package_info_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/package_info_plus-6.0.0/","dependencies":[],"dev_dependency":false},{"name":"sentry_flutter","path":"/home/vjrj/.pub-cache/hosted/pub.dev/sentry_flutter-7.20.2/","dependencies":["package_info_plus"],"dev_dependency":false},{"name":"share_plus","path":"/home/vjrj/.pub-cache/hosted/pub.dev/share_plus-7.2.2/","dependencies":["url_launcher_web"],"dev_dependency":false},{"name":"shared_preferences_web","path":"/home/vjrj/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false},{"name":"url_launcher_web","path":"/home/vjrj/.pub-cache/hosted/pub.dev/url_launcher_web-2.4.2/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"connectivity_plus","dependencies":[]},{"name":"firebase_core","dependencies":["firebase_core_web"]},{"name":"firebase_core_web","dependencies":[]},{"name":"firebase_messaging","dependencies":["firebase_core","firebase_messaging_web"]},{"name":"firebase_messaging_web","dependencies":["firebase_core","firebase_core_web"]},{"name":"geocoding","dependencies":["geocoding_android","geocoding_ios"]},{"name":"geocoding_android","dependencies":[]},{"name":"geocoding_ios","dependencies":[]},{"name":"in_app_review","dependencies":[]},{"name":"location","dependencies":["location_web"]},{"name":"location_web","dependencies":[]},{"name":"package_info_plus","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"sentry_flutter","dependencies":["package_info_plus"]},{"name":"share_plus","dependencies":["url_launcher_web","url_launcher_windows","url_launcher_linux"]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]},{"name":"url_launcher","dependencies":["url_launcher_android","url_launcher_ios","url_launcher_linux","url_launcher_macos","url_launcher_web","url_launcher_windows"]},{"name":"url_launcher_android","dependencies":[]},{"name":"url_launcher_ios","dependencies":[]},{"name":"url_launcher_linux","dependencies":[]},{"name":"url_launcher_macos","dependencies":[]},{"name":"url_launcher_web","dependencies":[]},{"name":"url_launcher_windows","dependencies":[]}],"date_created":"2026-03-11 16:49:22.351156","version":"3.41.2","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file diff --git a/lib/fireMarker.dart b/lib/fireMarker.dart index 9e7c154..805dfe1 100644 --- a/lib/fireMarker.dart +++ b/lib/fireMarker.dart @@ -6,7 +6,7 @@ import 'fireMarkType.dart'; import 'fireMarkerIcon.dart'; /// Create a Marker with custom positioning for fires and other map objects -Marker FireMarker( +Marker fireMarker( LatLng pos, FireMarkType type, [ VoidCallback? onTap, diff --git a/lib/genericMap.dart b/lib/genericMap.dart index 0dae8ea..3114916 100644 --- a/lib/genericMap.dart +++ b/lib/genericMap.dart @@ -364,6 +364,7 @@ class GenericMapState extends State { switch (status) { case FireMapStatus.view: case FireMapStatus.unsubscribe: + case FireMapStatus.subscriptionConfirm: return [ IconButton( icon: const Icon(Icons.edit), @@ -384,8 +385,6 @@ class GenericMapState extends State { '${view.mapState.fireNotification?.description ?? 'Fire'}. ${view.serverUrl}fire/${view.mapState.fireNotification?.sealed ?? ''}'); }) ]; - default: - return []; } } @@ -409,10 +408,10 @@ class GenericMapState extends State { // print('false pos: ${coords}'); final LatLng loc = LatLng( (coords[1] as num).toDouble(), (coords[0] as num).toDouble()); - markers.add(FireMarker(loc, FireMarkType.falsePos, () { + markers.add(fireMarker(loc, FireMarkType.falsePos, () { _showFalsePositiveDialog(loc); })); - // if (calibrate) markers.add(FireMarker(loc, FireMarkType.pixel)); + // if (calibrate) markers.add(fireMarker(loc, FireMarkType.pixel)); } catch (e, stackTrace) { reportError(e, stackTrace); } @@ -420,55 +419,62 @@ class GenericMapState extends State { for (final dynamic industry in industries) { try { // print(fire['geo']['coordinates']); - final List coords = - industry['geo']['coordinates'] as List; + final Map industryMap = + industry as Map; + final dynamic geoData = industryMap['geo']; + final Map geo = geoData as Map; + final List coords = geo['coordinates'] as List; final LatLng loc = LatLng( (coords[1] as num).toDouble(), (coords[0] as num).toDouble()); - markers.add(FireMarker(loc, FireMarkType.industry, () { + markers.add(fireMarker(loc, FireMarkType.industry, () { _showIndustryDialog(loc); })); - // if (calibrate) markers.add(FireMarker(loc, FireMarkType.pixel)); + // if (calibrate) markers.add(fireMarker(loc, FireMarkType.pixel)); } catch (e, stackTrace) { reportError(e, stackTrace); } } for (final dynamic fire in fires) { try { - final LatLng loc = LatLng( - (fire['lat'] as num).toDouble(), (fire['lon'] as num).toDouble()); - markers.add(FireMarker(loc, FireMarkType.fire, () { - onFirePressed(loc, DateTime.parse(fire['when'].toString()), - fire['type'] as String); + final Map fireMap = fire as Map; + final dynamic lat = fireMap['lat']; + final dynamic lon = fireMap['lon']; + final dynamic when = fireMap['when']; + final dynamic type = fireMap['type']; + final LatLng loc = + LatLng((lat as num).toDouble(), (lon as num).toDouble()); + markers.add(fireMarker(loc, FireMarkType.fire, () { + onFirePressed(loc, DateTime.parse(when.toString()), type as String); })); - markers.add(FireMarker(loc, FireMarkType.pixel)); + markers.add(fireMarker(loc, FireMarkType.pixel)); } catch (e, stackTrace) { reportError(e, stackTrace); } } markers.add( - FireMarker(pos, isNotif ? FireMarkType.fire : FireMarkType.position)); - // if (calibrate) markers.add(FireMarker(pos, FireMarkType.pixel)); + fireMarker(pos, isNotif ? FireMarkType.fire : FireMarkType.position)); + // if (calibrate) markers.add(fireMarker(pos, FireMarkType.pixel)); return markers; } void _showFireDialog(LatLng pos, DateTime date, String type) { final String when = Moment.fromDate(date).fromNow(context); + final S strings = S.of(context); + final String by = + type == 'vecinal' ? strings.byOurUsers : strings.byNASAsatellites; getReverseLocation(lat: pos.latitude, lon: pos.longitude) .then((String reverseLoc) { - final String by = type == 'vecinal' - ? S.of(context).byOurUsers - : S.of(context).byNASAsatellites; final String fireDesc = - S.of(context).additionalInfoAboutFire(reverseLoc, when, by); + strings.additionalInfoAboutFire(reverseLoc, when, by); showDialog( context: _scaffoldKey.currentContext!, builder: (_) => AlertDialog( content: Text(fireDesc), actions: [ TextButton( - child: Text(S.of(context).CLOSE), + child: Text(strings.CLOSE), onPressed: () { - Navigator.pop(context); + Navigator.pop(_scaffoldKey.currentContext!); }, ), ], @@ -477,21 +483,22 @@ class GenericMapState extends State { } void _showIndustryDialog(LatLng pos) { + final S strings = S.of(context); getReverseLocation(lat: pos.latitude, lon: pos.longitude) .then((String reverseLoc) { - final String industryDesc = '${S.of(context).itSeemsAIndustry}\n\n' + final String industryDesc = '${strings.itSeemsAIndustry}\n\n' 'Type: Industry\n' 'Location: $reverseLoc'; showDialog( context: _scaffoldKey.currentContext!, builder: (_) => AlertDialog( - title: Text(S.of(context).notAWildfire), + title: Text(strings.notAWildfire), content: Text(industryDesc), actions: [ TextButton( - child: Text(S.of(context).CLOSE), + child: Text(strings.CLOSE), onPressed: () { - Navigator.pop(context); + Navigator.pop(_scaffoldKey.currentContext!); }, ), ], @@ -500,21 +507,22 @@ class GenericMapState extends State { } void _showFalsePositiveDialog(LatLng pos) { + final S strings = S.of(context); getReverseLocation(lat: pos.latitude, lon: pos.longitude) .then((String reverseLoc) { - final String falseDesc = '${S.of(context).itSeemsNotAtForesFire}\n\n' + final String falseDesc = '${strings.itSeemsNotAtForesFire}\n\n' 'Type: False Positive\n' 'Location: $reverseLoc'; showDialog( context: _scaffoldKey.currentContext!, builder: (_) => AlertDialog( - title: Text(S.of(context).notAWildfire), + title: Text(strings.notAWildfire), content: Text(falseDesc), actions: [ TextButton( - child: Text(S.of(context).CLOSE), + child: Text(strings.CLOSE), onPressed: () { - Navigator.pop(context); + Navigator.pop(_scaffoldKey.currentContext!); }, ), ], diff --git a/lib/genericMapBottom.dart b/lib/genericMapBottom.dart index 248d2e1..f1c9581 100644 --- a/lib/genericMapBottom.dart +++ b/lib/genericMapBottom.dart @@ -112,17 +112,20 @@ class GenericMapBottom extends StatelessWidget { return DropdownMenuItem( value: value, child: Text(menuText)); }).toList(), - onChanged: (FalsePositiveType? value) async { + onChanged: (FalsePositiveType? value) { + final S strings = S.of(context); + final ScaffoldMessengerState messenger = + ScaffoldMessenger.of(context); if (value != null) { onFalsePositive(notif, value); } - await Future.delayed( - const Duration(milliseconds: 500)); - ScaffoldMessenger.of(context) - .showSnackBar(SnackBar( - content: - Text(S.of(context).thanksForParticipating), - )); + Future.delayed( + const Duration(milliseconds: 500)) + .then((_) { + messenger.showSnackBar(SnackBar( + content: Text(strings.thanksForParticipating), + )); + }); }), ] as List))))); } diff --git a/lib/globalFiresBottomStats.dart b/lib/globalFiresBottomStats.dart index 74570b5..8c3528f 100644 --- a/lib/globalFiresBottomStats.dart +++ b/lib/globalFiresBottomStats.dart @@ -30,13 +30,18 @@ class _GlobalFiresBottomStatsState extends State { .then((String result) { try { final Moment now = Moment.now(); - final DateTime last = - DateTime.parse(json.decode(result)['value'] as String); + final dynamic decodedResult = json.decode(result); + final Map resultMap = + decodedResult as Map; + final DateTime last = DateTime.parse(resultMap['value'] as String); http .read(Uri.parse('${firesApiUrl}status/active-fires-count')) .then((String result) { try { - final int count = (json.decode(result)['total'] as num).toInt(); + final dynamic decodedCountResult = json.decode(result); + final Map countMap = + decodedCountResult as Map; + final int count = (countMap['total'] as num).toInt(); setState(() { lastCheck = now.from(context, last); activeFires = count; diff --git a/lib/layerSelectorMapPlugin.dart b/lib/layerSelectorMapPlugin.dart index d9d414e..23cd2d1 100644 --- a/lib/layerSelectorMapPlugin.dart +++ b/lib/layerSelectorMapPlugin.dart @@ -22,7 +22,7 @@ class LayerSelectorMapPluginWidget extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, children: [ Column( - children: [_LayerSelectorButton(store)], + children: [_layerSelectorButton(store)], ) ], ), @@ -30,7 +30,7 @@ class LayerSelectorMapPluginWidget extends StatelessWidget { ])); } - Widget _LayerSelectorButton(Store store) { + Widget _layerSelectorButton(Store store) { final GlobalKey> key = GlobalKey>(); diff --git a/lib/models/fireNotification.dart b/lib/models/fireNotification.dart index 6420828..61f96dd 100644 --- a/lib/models/fireNotification.dart +++ b/lib/models/fireNotification.dart @@ -23,7 +23,7 @@ class FireNotification { factory FireNotification.fromJson(Map json) => _$FireNotificationFromJson(json); @JsonKey(toJson: objectIdToJson, fromJson: objectIdFromJson) - ObjectId id; + final ObjectId id; final double lat; final double lon; final String description; diff --git a/lib/models/fireNotificationsPersist.dart b/lib/models/fireNotificationsPersist.dart index 2770e73..28d4549 100644 --- a/lib/models/fireNotificationsPersist.dart +++ b/lib/models/fireNotificationsPersist.dart @@ -10,10 +10,10 @@ const String fireNotificationKey = 'fireNotifications'; Future> loadFireNotifications() async { return globals.prefs.then((SharedPreferences prefs) { - final List? FireNotifications = + final List? fireNotifications = prefs.getStringList(fireNotificationKey); final List persistedList = []; - for (final String notificationString in (FireNotifications ?? [])) { + for (final String notificationString in (fireNotifications ?? [])) { final Map notificationMap = json.decode(notificationString) as Map; persistedList.add(FireNotification.fromJson(notificationMap)); diff --git a/lib/models/firesApi.dart b/lib/models/firesApi.dart index 83102f2..c4d02d7 100644 --- a/lib/models/firesApi.dart +++ b/lib/models/firesApi.dart @@ -133,7 +133,7 @@ class FiresApi { final String url = '${state.firesApiUrl}fires-in-full/${state.firesApiKey}/$lat/$lon/$distance'; if (globals.isDevelopment) { - print(url); + debugPrint(url); } try { final Response response = await _dio.get(url); @@ -218,7 +218,7 @@ class FiresApi { response.data as Map; final Map dataData = data['data'] as Map; - print(dataData['upsert']); + debugPrint(dataData['upsert'].toString()); } return true; } else { diff --git a/lib/models/yourLocation.dart b/lib/models/yourLocation.dart index 8c1e044..04ce8d1 100644 --- a/lib/models/yourLocation.dart +++ b/lib/models/yourLocation.dart @@ -6,7 +6,6 @@ import '../objectIdUtils.dart'; part 'yourLocation.g.dart'; -@immutable @JsonSerializable() class YourLocation { YourLocation( @@ -16,20 +15,19 @@ class YourLocation { this.description = '', this.distance = 10, int? currentNumFires, - this.subscribed = false}) { - this.currentNumFires = currentNumFires ?? 0; - } + this.subscribed = false}) + : currentNumFires = currentNumFires ?? 0; factory YourLocation.fromJson(Map json) => _$YourLocationFromJson(json); @JsonKey(toJson: objectIdToJson, fromJson: objectIdFromJson) - ObjectId id; + final ObjectId id; final double lat; final double lon; String description; bool subscribed; int distance; - late int currentNumFires; + int currentNumFires; static YourLocation get noLocation { _noLocation ??= YourLocation(id: ObjectId(), lat: 0.0, lon: 0.0); diff --git a/lib/monitoredAreas.dart b/lib/monitoredAreas.dart index af658f5..fbab973 100644 --- a/lib/monitoredAreas.dart +++ b/lib/monitoredAreas.dart @@ -14,7 +14,7 @@ import 'models/appState.dart'; @immutable class _ViewModel { _ViewModel(this.monitoredAreas); - List monitoredAreas; + final List monitoredAreas; @override bool operator ==(Object other) => diff --git a/lib/redux/fetchDataMiddleware.dart b/lib/redux/fetchDataMiddleware.dart index 40348ba..2a98349 100644 --- a/lib/redux/fetchDataMiddleware.dart +++ b/lib/redux/fetchDataMiddleware.dart @@ -269,10 +269,7 @@ void unsubsViaApi( void subscribeViaApi(Store 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); });