todos-contra-el-fuego-mobile/lib/redux/your_location_actions.dart
vjrj 30a89fc5c0 Fix 13 lint issues: immutability, imports, async/await, and code style
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.
2026-03-12 09:16:20 +01:00

67 lines
1.3 KiB
Dart

import 'package:objectid/objectid.dart';
import '../models/your_location.dart';
abstract class YourLocationActions {}
class AddYourLocationAction extends YourLocationActions {
AddYourLocationAction(this.loc);
YourLocation loc;
}
class AddedYourLocationAction extends YourLocationActions {
AddedYourLocationAction(this.loc);
YourLocation loc;
}
class DeleteYourLocationAction extends YourLocationActions {
DeleteYourLocationAction(this.loc);
YourLocation loc;
}
class DeletedYourLocationAction extends YourLocationActions {
DeletedYourLocationAction(this.id);
ObjectId id;
}
class UpdateYourLocationAction extends YourLocationActions {
UpdateYourLocationAction(this.loc);
YourLocation loc;
}
class UpdatedYourLocationAction extends YourLocationActions {
UpdatedYourLocationAction(this.loc);
YourLocation loc;
}
class ToggleSubscriptionAction extends YourLocationActions {
ToggleSubscriptionAction(this.loc);
YourLocation loc;
}
class ToggledSubscriptionAction extends YourLocationActions {
ToggledSubscriptionAction(this.loc);
YourLocation loc;
}
class SubscribeAction extends YourLocationActions {}
class SubscribeConfirmAction extends YourLocationActions {
SubscribeConfirmAction(this.loc);
YourLocation loc;
}
class UnSubscribeAction extends YourLocationActions {
UnSubscribeAction(this.loc);
YourLocation loc;
}