refactor: improve code readability according to linter

This commit is contained in:
Pun Butrach 2023-07-10 19:45:50 +07:00
parent 6a45db8a38
commit 567b1a3ace
No known key found for this signature in database
GPG Key ID: 5F47D61B676D07F6
4 changed files with 17 additions and 11 deletions

View File

@ -88,14 +88,15 @@ class GithubAPI {
} }
for (int i = 1; i < updates; i++) { for (int i = 1; i < updates; i++) {
releases.update( releases.update(
'body', 'body',
(value) => (value) =>
value + value +
'\n' + '\n' +
'# ' + '# ' +
response.data[i]['tag_name'] + response.data[i]['tag_name'] +
'\n' + '\n' +
response.data[i]['body']); response.data[i]['body'],
);
} }
return releases; return releases;
} on Exception catch (e) { } on Exception catch (e) {

View File

@ -77,7 +77,9 @@ class _InstalledAppItemState extends State<InstalledAppItem> {
translationParams: { translationParams: {
'version': widget.suggestedVersion.isEmpty 'version': widget.suggestedVersion.isEmpty
? FlutterI18n.translate( ? FlutterI18n.translate(
context, 'appSelectorCard.allVersions') context,
'appSelectorCard.allVersions',
)
: 'v${widget.suggestedVersion}', : 'v${widget.suggestedVersion}',
}, },
), ),

View File

@ -71,7 +71,9 @@ class _NotInstalledAppItem extends State<NotInstalledAppItem> {
translationParams: { translationParams: {
'version': widget.suggestedVersion.isEmpty 'version': widget.suggestedVersion.isEmpty
? FlutterI18n.translate( ? FlutterI18n.translate(
context, 'appSelectorCard.allVersions') context,
'appSelectorCard.allVersions',
)
: 'v${widget.suggestedVersion}', : 'v${widget.suggestedVersion}',
}, },
), ),

View File

@ -131,7 +131,8 @@ class _PatchItemState extends State<PatchItem> {
.areExperimentalPatchesEnabled()) { .areExperimentalPatchesEnabled()) {
widget.isSelected = false; widget.isSelected = false;
widget.toast.showBottom( widget.toast.showBottom(
'patchItem.unsupportedPatchVersion'); 'patchItem.unsupportedPatchVersion',
);
} else { } else {
widget.isSelected = newValue!; widget.isSelected = newValue!;
} }