Skip to content

Commit

Permalink
refactor: apply lint from analyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
validcube committed Nov 11, 2023
1 parent 183575f commit a2d165b
Show file tree
Hide file tree
Showing 40 changed files with 67 additions and 106 deletions.
2 changes: 1 addition & 1 deletion lib/main.dart
Expand Up @@ -32,7 +32,7 @@ Future main() async {
}

class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
const MyApp({super.key});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/theme/dynamic_theme_builder.dart
Expand Up @@ -14,10 +14,10 @@ import 'package:stacked_services/stacked_services.dart';

class DynamicThemeBuilder extends StatefulWidget {
const DynamicThemeBuilder({
Key? key,
super.key,
required this.title,
required this.home,
}) : super(key: key);
});
final String title;
final Widget home;

Expand Down
6 changes: 3 additions & 3 deletions lib/ui/views/app_selector/app_selector_view.dart
Expand Up @@ -8,7 +8,7 @@ import 'package:revanced_manager/ui/widgets/shared/search_bar.dart';
import 'package:stacked/stacked.dart' hide SkeletonLoader;

class AppSelectorView extends StatefulWidget {
const AppSelectorView({Key? key}) : super(key: key);
const AppSelectorView({super.key});

@override
State<AppSelectorView> createState() => _AppSelectorViewState();
Expand Down Expand Up @@ -107,7 +107,7 @@ class _AppSelectorViewState extends State<AppSelectorView> {
),
),
)
.toList(),
,
...model
.getFilteredAppsNames(_query)
.map(
Expand All @@ -121,7 +121,7 @@ class _AppSelectorViewState extends State<AppSelectorView> {
},
),
)
.toList(),
,
const SizedBox(height: 70.0),
],
),
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/contributors/contributors_view.dart
Expand Up @@ -7,7 +7,7 @@ import 'package:revanced_manager/ui/widgets/shared/custom_sliver_app_bar.dart';
import 'package:stacked/stacked.dart';

class ContributorsView extends StatelessWidget {
const ContributorsView({Key? key}) : super(key: key);
const ContributorsView({super.key});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/home/home_view.dart
Expand Up @@ -9,7 +9,7 @@ import 'package:revanced_manager/ui/widgets/shared/custom_sliver_app_bar.dart';
import 'package:stacked/stacked.dart';

class HomeView extends StatelessWidget {
const HomeView({Key? key}) : super(key: key);
const HomeView({super.key});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/installer/installer_view.dart
Expand Up @@ -8,7 +8,7 @@ import 'package:revanced_manager/ui/widgets/shared/custom_sliver_app_bar.dart';
import 'package:stacked/stacked.dart';

class InstallerView extends StatelessWidget {
const InstallerView({Key? key}) : super(key: key);
const InstallerView({super.key});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/navigation/navigation_view.dart
Expand Up @@ -6,7 +6,7 @@ import 'package:revanced_manager/ui/views/navigation/navigation_viewmodel.dart';
import 'package:stacked/stacked.dart';

class NavigationView extends StatelessWidget {
const NavigationView({Key? key}) : super(key: key);
const NavigationView({super.key});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/views/patch_options/patch_options_viewmodel.dart
Expand Up @@ -38,11 +38,11 @@ class PatchOptionsViewModel extends BaseViewModel {
option.required &&
!savedOptions.any((sOption) => sOption.key == option.key),
)
.toList(),
,
];
} else {
visibleOptions = [
...options.where((option) => option.required).toList(),
...options.where((option) => option.required),
];
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/patcher/patcher_view.dart
Expand Up @@ -9,7 +9,7 @@ import 'package:revanced_manager/ui/widgets/shared/custom_sliver_app_bar.dart';
import 'package:stacked/stacked.dart';

class PatcherView extends StatelessWidget {
const PatcherView({Key? key}) : super(key: key);
const PatcherView({super.key});

@override
Widget build(BuildContext context) {
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/patches_selector/patches_selector_view.dart
Expand Up @@ -7,7 +7,7 @@ import 'package:revanced_manager/ui/widgets/shared/search_bar.dart';
import 'package:stacked/stacked.dart';

class PatchesSelectorView extends StatefulWidget {
const PatchesSelectorView({Key? key}) : super(key: key);
const PatchesSelectorView({super.key});

@override
State<PatchesSelectorView> createState() => _PatchesSelectorViewState();
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/settings/settings_view.dart
Expand Up @@ -14,7 +14,7 @@ import 'package:revanced_manager/ui/widgets/shared/custom_sliver_app_bar.dart';
import 'package:stacked/stacked.dart';

class SettingsView extends StatelessWidget {
const SettingsView({Key? key}) : super(key: key);
const SettingsView({super.key});

static const _settingsDivider =
Divider(thickness: 1.0, indent: 20.0, endIndent: 20.0);
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/views/settings/settings_viewmodel.dart
Expand Up @@ -140,7 +140,7 @@ class SettingsViewModel extends BaseViewModel {
}

Future<void>? showRequireSuggestedAppVersionDialog(
BuildContext context, bool value) {
BuildContext context, bool value,) {
if (!value) {
return showDialog(
context: context,
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/appInfoView/app_info_view.dart
Expand Up @@ -9,9 +9,9 @@ import 'package:stacked/stacked.dart';

class AppInfoView extends StatelessWidget {
const AppInfoView({
Key? key,
super.key,
required this.app,
}) : super(key: key);
});
final PatchedApplication app;

@override
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/widgets/appSelectorView/app_skeleton_loader.dart
Expand Up @@ -3,7 +3,7 @@ import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
import 'package:skeletons/skeletons.dart';

class AppSkeletonLoader extends StatelessWidget {
const AppSkeletonLoader({Key? key}) : super(key: key);
const AppSkeletonLoader({super.key});

@override
Widget build(BuildContext context) {
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/appSelectorView/installed_app_item.dart
Expand Up @@ -5,15 +5,15 @@ import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';

class InstalledAppItem extends StatefulWidget {
const InstalledAppItem({
Key? key,
super.key,
required this.name,
required this.pkgName,
required this.icon,
required this.patchesCount,
required this.suggestedVersion,
required this.installedVersion,
this.onTap,
}) : super(key: key);
});
final String name;
final String pkgName;
final Uint8List icon;
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/appSelectorView/not_installed_app_item.dart
Expand Up @@ -4,12 +4,12 @@ import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';

class NotInstalledAppItem extends StatefulWidget {
const NotInstalledAppItem({
Key? key,
super.key,
required this.name,
required this.patchesCount,
required this.suggestedVersion,
this.onTap,
}) : super(key: key);
});
final String name;
final int patchesCount;
final String suggestedVersion;
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/contributorsView/contributors_card.dart
Expand Up @@ -6,10 +6,10 @@ import 'package:url_launcher/url_launcher.dart';

class ContributorsCard extends StatefulWidget {
const ContributorsCard({
Key? key,
super.key,
required this.title,
required this.contributors,
}) : super(key: key);
});
final String title;
final List<dynamic> contributors;

Expand Down
2 changes: 1 addition & 1 deletion lib/ui/widgets/homeView/installed_apps_card.dart
Expand Up @@ -10,7 +10,7 @@ import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';

//ignore: must_be_immutable
class InstalledAppsCard extends StatelessWidget {
InstalledAppsCard({Key? key}) : super(key: key);
InstalledAppsCard({super.key});

List<PatchedApplication> apps = locator<HomeViewModel>().patchedInstalledApps;
final ManagerAPI _managerAPI = locator<ManagerAPI>();
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/homeView/latest_commit_card.dart
Expand Up @@ -7,10 +7,10 @@ import 'package:revanced_manager/ui/widgets/shared/custom_material_button.dart';

class LatestCommitCard extends StatefulWidget {
const LatestCommitCard({
Key? key,
super.key,
required this.model,
required this.parentContext,
}) : super(key: key);
});
final HomeViewModel model;
final BuildContext parentContext;

Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/patcherView/app_selector_card.dart
Expand Up @@ -8,9 +8,9 @@ import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';

class AppSelectorCard extends StatelessWidget {
const AppSelectorCard({
Key? key,
super.key,
required this.onPressed,
}) : super(key: key);
});
final Function() onPressed;

@override
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/patcherView/patch_selector_card.dart
Expand Up @@ -7,9 +7,9 @@ import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';

class PatchSelectorCard extends StatelessWidget {
const PatchSelectorCard({
Key? key,
super.key,
required this.onPressed,
}) : super(key: key);
});
final Function() onPressed;

@override
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/patchesSelectorView/patch_item.dart
Expand Up @@ -10,7 +10,7 @@ import 'package:revanced_manager/ui/widgets/shared/custom_material_button.dart';
// ignore: must_be_immutable
class PatchItem extends StatefulWidget {
PatchItem({
Key? key,
super.key,
required this.name,
required this.simpleName,
required this.description,
Expand All @@ -23,7 +23,7 @@ class PatchItem extends StatefulWidget {
required this.onChanged,
required this.navigateToOptions,
required this.isChangeEnabled,
}) : super(key: key);
});
final String name;
final String simpleName;
final String description;
Expand Down
2 changes: 1 addition & 1 deletion lib/ui/widgets/settingsView/about_widget.dart
Expand Up @@ -4,7 +4,7 @@ import 'package:revanced_manager/gen/strings.g.dart';
import 'package:revanced_manager/utils/about_info.dart';

class AboutWidget extends StatefulWidget {
const AboutWidget({Key? key, this.padding}) : super(key: key);
const AboutWidget({super.key, this.padding});

final EdgeInsetsGeometry? padding;

Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/settingsView/custom_switch.dart
Expand Up @@ -2,10 +2,10 @@ import 'package:flutter/material.dart';

class CustomSwitch extends StatelessWidget {
const CustomSwitch({
Key? key,
super.key,
required this.onChanged,
required this.value,
}) : super(key: key);
});
final ValueChanged<bool> onChanged;
final bool value;

Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/settingsView/custom_switch_tile.dart
Expand Up @@ -3,13 +3,13 @@ import 'package:revanced_manager/ui/widgets/settingsView/custom_switch.dart';

class CustomSwitchTile extends StatelessWidget {
const CustomSwitchTile({
Key? key,
super.key,
required this.title,
required this.subtitle,
required this.value,
required this.onTap,
this.padding,
}) : super(key: key);
});
final Widget title;
final Widget subtitle;
final bool value;
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/settingsView/custom_text_field.dart
Expand Up @@ -2,13 +2,13 @@ import 'package:flutter/material.dart';

class CustomTextField extends StatelessWidget {
const CustomTextField({
Key? key,
super.key,
required this.inputController,
required this.label,
required this.hint,
this.leadingIcon,
required this.onChanged,
}) : super(key: key);
});
final TextEditingController inputController;
final Widget label;
final String hint;
Expand Down
Expand Up @@ -29,7 +29,7 @@ class _SRequireSuggestedAppVersionState
value: _settingsViewModel.isRequireSuggestedAppVersionEnabled(),
onChanged: (value) async {
await _settingsViewModel.showRequireSuggestedAppVersionDialog(
context, value);
context, value,);
setState(() {});
},
);
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/settingsView/settings_section.dart
Expand Up @@ -2,10 +2,10 @@ import 'package:flutter/material.dart';

class SettingsSection extends StatelessWidget {
const SettingsSection({
Key? key,
super.key,
required this.title,
required this.children,
}) : super(key: key);
});
final String title;
final List<Widget> children;

Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/settingsView/settings_tile_dialog.dart
Expand Up @@ -2,12 +2,12 @@ import 'package:flutter/material.dart';

class SettingsTileDialog extends StatelessWidget {
const SettingsTileDialog({
Key? key,
super.key,
required this.title,
required this.subtitle,
required this.onTap,
this.padding,
}) : super(key: key);
});
final String title;
final String subtitle;
final Function()? onTap;
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/settingsView/social_media_item.dart
Expand Up @@ -3,12 +3,12 @@ import 'package:url_launcher/url_launcher.dart';

class SocialMediaItem extends StatelessWidget {
const SocialMediaItem({
Key? key,
super.key,
this.icon,
required this.title,
this.subtitle,
this.url,
}) : super(key: key);
});
final Widget? icon;
final Widget title;
final Widget? subtitle;
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/settingsView/social_media_widget.dart
Expand Up @@ -8,9 +8,9 @@ import 'package:revanced_manager/ui/widgets/shared/custom_icon.dart';

class SocialMediaWidget extends StatelessWidget {
const SocialMediaWidget({
Key? key,
super.key,
this.padding,
}) : super(key: key);
});
final EdgeInsetsGeometry? padding;

@override
Expand Down
4 changes: 2 additions & 2 deletions lib/ui/widgets/shared/application_item.dart
Expand Up @@ -8,12 +8,12 @@ import 'package:timeago/timeago.dart';

class ApplicationItem extends StatefulWidget {
const ApplicationItem({
Key? key,
super.key,
required this.icon,
required this.name,
required this.patchDate,
required this.onPressed,
}) : super(key: key);
});
final Uint8List icon;
final String name;
final DateTime patchDate;
Expand Down

0 comments on commit a2d165b

Please sign in to comment.