refactor: apply lint from analyzer

This commit is contained in:
validcube
2023-11-11 19:07:32 +07:00
committed by aAbed
parent d25d1efe9c
commit ad3a778fb9
40 changed files with 67 additions and 106 deletions

View File

@ -4,7 +4,7 @@ import 'package:flutter_i18n/flutter_i18n.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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -29,7 +29,7 @@ class _SRequireSuggestedAppVersionState extends State<SRequireSuggestedAppVersio
subtitle: I18nText('settingsView.requireSuggestedAppVersionHint'),
value: _settingsViewModel.isRequireSuggestedAppVersionEnabled(),
onChanged: (value) async {
await _settingsViewModel.showRequireSuggestedAppVersionDialog(context, value);
await _settingsViewModel.showRequireSuggestedAppVersionDialog(context, value,);
setState(() {});
},
);

View File

@ -3,10 +3,10 @@ import 'package:flutter_i18n/flutter_i18n.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;

View File

@ -3,12 +3,12 @@ import 'package:flutter_i18n/flutter_i18n.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;

View File

@ -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;

View File

@ -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