Skip to content

Commit

Permalink
refactor: improve code readability according to linter
Browse files Browse the repository at this point in the history
  • Loading branch information
validcube committed Jul 10, 2023
1 parent 6a45db8 commit 567b1a3
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
17 changes: 9 additions & 8 deletions lib/services/github_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 3 additions & 1 deletion lib/ui/widgets/appSelectorView/installed_app_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ class _InstalledAppItemState extends State<InstalledAppItem> {
translationParams: {
'version': widget.suggestedVersion.isEmpty
? FlutterI18n.translate(
context, 'appSelectorCard.allVersions')
context,
'appSelectorCard.allVersions',
)
: 'v${widget.suggestedVersion}',
},
),
Expand Down
4 changes: 3 additions & 1 deletion lib/ui/widgets/appSelectorView/not_installed_app_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ class _NotInstalledAppItem extends State<NotInstalledAppItem> {
translationParams: {
'version': widget.suggestedVersion.isEmpty
? FlutterI18n.translate(
context, 'appSelectorCard.allVersions')
context,
'appSelectorCard.allVersions',
)
: 'v${widget.suggestedVersion}',
},
),
Expand Down
3 changes: 2 additions & 1 deletion lib/ui/widgets/patchesSelectorView/patch_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ class _PatchItemState extends State<PatchItem> {
.areExperimentalPatchesEnabled()) {
widget.isSelected = false;
widget.toast.showBottom(
'patchItem.unsupportedPatchVersion');
'patchItem.unsupportedPatchVersion',
);
} else {
widget.isSelected = newValue!;
}
Expand Down

0 comments on commit 567b1a3

Please sign in to comment.