High-priority fixes (10 issues): - assignment_to_final errors (7): Use copyWith() to respect immutability in YourLocation, active_fires.dart, generic_map.dart, location_utils.dart, and fetch_data_middleware.dart instead of direct assignment - Fixed import paths (3): Updated falsePositiveTypes.dart → false_positive_types.dart and firesApi.dart → fires_api.dart in reducers.dart, fire_notification_actions.dart, fires_api.dart Medium/Low priority fixes (3 issues): - unnecessary_non_null_assertion: Removed redundant '!' in app_intro_page.dart line 54 - use_super_parameters: Updated app_intro_page.dart to use modern super(key: key) syntax - no_logic_in_create_state: Fixed material_app_with_intro.dart by moving parameters to State instead of createState - noop_primitive_operations: Removed redundant .toString() in string interpolation - avoid_void_async: Changed void _selectLocation to Future<void> in places_autocomplete_utils.dart - avoid_dynamic_calls: Fixed dynamic map access in fires_api.dart by properly casting intermediate values Result: Reduced lint issues from 56 to 20 (all remaining are by-design: library_private_types_in_public_api and implementation_imports from external packages) APK builds successfully with no errors.
61 lines
1.4 KiB
Dart
61 lines
1.4 KiB
Dart
import '../models/fire_map_state.dart';
|
|
import '../models/fire_notification.dart';
|
|
import '../models/your_location.dart';
|
|
|
|
abstract class FiresMapActions {}
|
|
|
|
class UpdateYourLocationMapAction extends FiresMapActions {
|
|
|
|
UpdateYourLocationMapAction(
|
|
this.loc,
|
|
);
|
|
final YourLocation loc;
|
|
}
|
|
|
|
class UpdateFireMapStatsAction extends FiresMapActions {
|
|
|
|
UpdateFireMapStatsAction(
|
|
{required this.numFires,
|
|
required this.fires,
|
|
required this.falsePos,
|
|
required this.industries});
|
|
int numFires;
|
|
List<dynamic> fires = <dynamic>[];
|
|
List<dynamic> falsePos = <dynamic>[];
|
|
List<dynamic> industries = <dynamic>[];
|
|
}
|
|
|
|
class ShowYourLocationMapAction extends FiresMapActions {
|
|
|
|
ShowYourLocationMapAction(this.loc);
|
|
YourLocation loc;
|
|
}
|
|
|
|
class ShowFireNotificationMapAction extends FiresMapActions {
|
|
|
|
ShowFireNotificationMapAction(this.notif);
|
|
FireNotification notif;
|
|
}
|
|
|
|
class EditYourLocationAction extends FiresMapActions {
|
|
|
|
EditYourLocationAction(this.loc);
|
|
YourLocation loc;
|
|
}
|
|
|
|
class EditConfirmYourLocationAction extends FiresMapActions {
|
|
|
|
EditConfirmYourLocationAction(this.loc);
|
|
YourLocation loc;
|
|
}
|
|
|
|
class EditCancelYourLocationAction extends FiresMapActions {
|
|
EditCancelYourLocationAction(this.loc);
|
|
YourLocation loc;
|
|
}
|
|
|
|
class SelectMapLayerAction extends FiresMapActions {
|
|
|
|
SelectMapLayerAction(this.layer);
|
|
final FireMapLayer layer;
|
|
}
|