From 042840705bd15d3deeccbe3812c9fabc9648c853 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 bdf5a10541..6202032815 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 b04ac6d92d..1edfd2272d 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 e083889989..55740ba716 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 d9173d556b..294ba3eccc 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!; }