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:
parent
948a609619
commit
862d423f6b
14 changed files with 96 additions and 69 deletions
|
|
@ -55,6 +55,7 @@ class _FireAlertState extends State<FireAlert> {
|
|||
}
|
||||
|
||||
Widget buildTweetButton() {
|
||||
final strings = S.of(context);
|
||||
return Align(
|
||||
alignment: const Alignment(0.0, -0.2),
|
||||
child: FloatingActionButton(
|
||||
|
|
@ -64,13 +65,12 @@ class _FireAlertState extends State<FireAlert> {
|
|||
openPlacesDialog(_scaffoldKey).then((YourLocation yourLocation) {
|
||||
final String where =
|
||||
yourLocation.description.replaceAll(' ', '').split(',')[0];
|
||||
Share.shareWithResult(S
|
||||
.of(context)
|
||||
.tweetAboutSelf(yourLocation.description, '#IF$where'));
|
||||
Share.shareWithResult(
|
||||
strings.tweetAboutSelf(yourLocation.description, '#IF$where'));
|
||||
}).catchError((Object onError) {
|
||||
if (mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(S.of(context).errorFirePlaceDialog)));
|
||||
SnackBar(content: Text(strings.errorFirePlaceDialog)));
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue