refactor: fix remaining lint warnings and deprecated APIs

- Fix deprecated @ignore in json_serializable models (appState, yourLocation)
- Fix empty catch blocks in compassMapPlugin, globalFiresBottomStats, locationUtils
- Fix no_logic_in_create_state in firesApp, markdownPage, slider
- Fix use_build_context_synchronously in fireAlert
- Fix only_throw_errors in firesApi (8 instances)
- Exclude generated .g.dart files from analysis
- Update deprecated nullable: false to @JsonSerializable()

Build: APK generated successfully, 0 errors, 0 warnings
This commit is contained in:
vjrj 2026-03-07 09:35:59 +01:00
parent 948a609619
commit 862d423f6b
14 changed files with 96 additions and 69 deletions

View file

@ -32,10 +32,10 @@ class FiresApi {
if (response.statusCode == 200) {
return response.data['data']['userId'] as String;
} else {
throw 'Unexpected error on create user';
throw Exception('Unexpected error on create user');
}
} catch (e) {
throw 'Error creating user: $e';
throw Exception('Error creating user: $e');
}
}
@ -64,10 +64,10 @@ class FiresApi {
}
return subscribed;
} else {
throw 'Unexpected error fetching your locations';
throw Exception('Unexpected error fetching your locations');
}
} catch (e) {
throw 'Error fetching locations: $e';
throw Exception('Error fetching locations: $e');
}
}
@ -86,10 +86,10 @@ class FiresApi {
if (response.statusCode == 200) {
return response.data['data']['subsId'] as String;
} else {
throw 'Unexpected error on subscribe';
throw Exception('Unexpected error on subscribe');
}
} catch (e) {
throw 'Error subscribing: $e';
throw Exception('Error subscribing: $e');
}
}
@ -103,10 +103,10 @@ class FiresApi {
if (response.statusCode == 200) {
return true;
} else {
throw 'Unexpected error on unsubscribe';
throw Exception('Unexpected error on unsubscribe');
}
} catch (e) {
throw 'Error unsubscribing: $e';
throw Exception('Error unsubscribing: $e');
}
}