feat: update rules of analysis_options.yaml. and solved all problems (#665)

* update rules of analysis_options.yaml. and solved all problems

* refactor: fix remaining problems

---------

Co-authored-by: Ushie <ushiekane@gmail.com>
This commit is contained in:
Jay Gajjar 2023-01-30 18:05:06 +05:30 committed by GitHub
parent f5bc1a996f
commit a54ca799b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 804 additions and 643 deletions

View file

@ -6,12 +6,11 @@ import 'package:revanced_manager/ui/views/patcher/patcher_viewmodel.dart';
import 'package:revanced_manager/ui/widgets/shared/custom_card.dart';
class AppSelectorCard extends StatelessWidget {
final Function() onPressed;
const AppSelectorCard({
Key? key,
required this.onPressed,
}) : super(key: key);
final Function() onPressed;
@override
Widget build(BuildContext context) {
@ -33,40 +32,41 @@ class AppSelectorCard extends StatelessWidget {
),
),
const SizedBox(height: 8),
locator<PatcherViewModel>().selectedApp == null
? I18nText('appSelectorCard.widgetSubtitle')
: Row(
children: <Widget>[
SizedBox(
height: 18.0,
child: ClipOval(
child: Image.memory(
locator<PatcherViewModel>().selectedApp == null
? Uint8List(0)
: locator<PatcherViewModel>().selectedApp!.icon,
fit: BoxFit.cover,
),
),
if (locator<PatcherViewModel>().selectedApp == null)
I18nText('appSelectorCard.widgetSubtitle')
else
Row(
children: <Widget>[
SizedBox(
height: 18.0,
child: ClipOval(
child: Image.memory(
locator<PatcherViewModel>().selectedApp == null
? Uint8List(0)
: locator<PatcherViewModel>().selectedApp!.icon,
fit: BoxFit.cover,
),
const SizedBox(width: 6),
Text(
locator<PatcherViewModel>()
.getAppSelectionString(),
style: const TextStyle(fontWeight: FontWeight.w600),
),
],
),
),
locator<PatcherViewModel>().selectedApp == null
? Container()
: Column(
children: [
const SizedBox(height: 4),
Text(
locator<PatcherViewModel>()
.getRecommendedVersionString(context),
),
],
const SizedBox(width: 6),
Text(
locator<PatcherViewModel>().getAppSelectionString(),
style: const TextStyle(fontWeight: FontWeight.w600),
),
],
),
if (locator<PatcherViewModel>().selectedApp == null)
Container()
else
Column(
children: [
const SizedBox(height: 4),
Text(
locator<PatcherViewModel>()
.getRecommendedVersionString(context),
),
],
),
],
),
);