From 567b1a3aceb1a71a8d8fa1340ee4ce7c798929ab Mon Sep 17 00:00:00 2001 From: Pun Butrach Date: Mon, 10 Jul 2023 19:45:50 +0700 Subject: [PATCH] refactor: improve code readability according to linter --- lib/services/github_api.dart | 17 +++++++++-------- .../appSelectorView/installed_app_item.dart | 4 +++- .../appSelectorView/not_installed_app_item.dart | 4 +++- .../widgets/patchesSelectorView/patch_item.dart | 3 ++- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/lib/services/github_api.dart b/lib/services/github_api.dart index bdf5a105..62020328 100644 --- a/lib/services/github_api.dart +++ b/lib/services/github_api.dart @@ -88,14 +88,15 @@ class GithubAPI { } for (int i = 1; i < updates; i++) { releases.update( - 'body', - (value) => - value + - '\n' + - '# ' + - response.data[i]['tag_name'] + - '\n' + - response.data[i]['body']); + 'body', + (value) => + value + + '\n' + + '# ' + + response.data[i]['tag_name'] + + '\n' + + response.data[i]['body'], + ); } return releases; } on Exception catch (e) { diff --git a/lib/ui/widgets/appSelectorView/installed_app_item.dart b/lib/ui/widgets/appSelectorView/installed_app_item.dart index 5d811427..70a49a1a 100644 --- a/lib/ui/widgets/appSelectorView/installed_app_item.dart +++ b/lib/ui/widgets/appSelectorView/installed_app_item.dart @@ -77,7 +77,9 @@ class _InstalledAppItemState extends State { translationParams: { 'version': widget.suggestedVersion.isEmpty ? FlutterI18n.translate( - context, 'appSelectorCard.allVersions') + context, + 'appSelectorCard.allVersions', + ) : 'v${widget.suggestedVersion}', }, ), diff --git a/lib/ui/widgets/appSelectorView/not_installed_app_item.dart b/lib/ui/widgets/appSelectorView/not_installed_app_item.dart index c0013a0d..e932908b 100644 --- a/lib/ui/widgets/appSelectorView/not_installed_app_item.dart +++ b/lib/ui/widgets/appSelectorView/not_installed_app_item.dart @@ -71,7 +71,9 @@ class _NotInstalledAppItem extends State { translationParams: { 'version': widget.suggestedVersion.isEmpty ? FlutterI18n.translate( - context, 'appSelectorCard.allVersions') + context, + 'appSelectorCard.allVersions', + ) : 'v${widget.suggestedVersion}', }, ), diff --git a/lib/ui/widgets/patchesSelectorView/patch_item.dart b/lib/ui/widgets/patchesSelectorView/patch_item.dart index d9173d55..294ba3ec 100644 --- a/lib/ui/widgets/patchesSelectorView/patch_item.dart +++ b/lib/ui/widgets/patchesSelectorView/patch_item.dart @@ -131,7 +131,8 @@ class _PatchItemState extends State { .areExperimentalPatchesEnabled()) { widget.isSelected = false; widget.toast.showBottom( - 'patchItem.unsupportedPatchVersion'); + 'patchItem.unsupportedPatchVersion', + ); } else { widget.isSelected = newValue!; }