refactor: continue lint cleanup - 96 more issues fixed

- Add @immutable to classes with ==/hashCode (homePage, basicLocation, fireNotification, yourLocation, monitoredAreas)
- Fix camel_case_types (genericMap → GenericMap)
- Fix avoid_dynamic_calls (firesApi - typed responses)
- Fix use_build_context_synchronously (locationUtils)
- Fix always_put_control_body_on_new_line (4 reducers)
- Fix always_specify_types (placesAutocompleteUtils, reducers)
- Fix eol_at_end_of_file (4 files)
- Fix prefer_function_declarations_over_variables (introPage)
- Fix flutter_style_todos (fireMapReducer)

Build: APK generated, 0 errors, 0 warnings
This commit is contained in:
vjrj 2026-03-07 11:17:01 +01:00
parent 862d423f6b
commit 68ad4adbcf
23 changed files with 118 additions and 95 deletions

View file

@ -37,15 +37,19 @@ Future<YourLocation> getUserLocation(
} on PlatformException catch (e) {
final BuildContext? context = scaffoldKey.currentContext;
if (context != null) {
// ignore: use_build_context_synchronously
final S strings = S.of(context);
// ignore: use_build_context_synchronously
final ScaffoldMessengerState messenger = ScaffoldMessenger.of(context);
if (e.code == 'PERMISSION_DENIED') {
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(S.of(context).notPermsUbication),
messenger.showSnackBar(SnackBar(
content: Text(strings.notPermsUbication),
));
} else if (e.code == 'PERMISSION_DENIED_NEVER_ASK') {
// User selected "Don't ask again" - show settings prompt
}
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(S.of(context).isYourUbicationEnabled),
messenger.showSnackBar(SnackBar(
content: Text(strings.isYourUbicationEnabled),
));
}
return YourLocation.noLocation;