refactor: update SDK version to 3.10.0 and clean up unused variables

fix: fix some analyze issue
This commit is contained in:
2025-11-18 08:56:45 +03:30
parent c4bc31029f
commit 246b64c562
33 changed files with 454 additions and 444 deletions

View File

@@ -225,9 +225,6 @@ class StewardRootLogic extends GetxController {
final nestedKeyId = getNestedKey();
GlobalKey<NavigatorState>? currentNestedKey = Get.nestedKey(nestedKeyId);
final currentRoute = currentNestedKey?.currentState;
fLog("onPopScopTaped ==> ${currentNestedKey?.currentState?.canPop()}");
if (currentNestedKey?.currentState?.canPop() == true) {
iLog(currentNestedKey?.currentState?.canPop());
iLog(currentNestedKey?.currentContext);

View File

@@ -25,8 +25,9 @@ class StewardRootPage extends GetView<StewardRootLogic> {
onGenerateRoute: (settings) {
final page = ChickenPages.pages.firstWhere(
(e) => e.name == settings.name,
orElse: () =>
ChickenPages.pages.firstWhere((e) => e.name == ChickenRoutes.buySteward),
orElse: () => ChickenPages.pages.firstWhere(
(e) => e.name == ChickenRoutes.buySteward,
),
);
return buildRouteFromGetPage(page);
@@ -37,8 +38,9 @@ class StewardRootPage extends GetView<StewardRootLogic> {
onGenerateRoute: (settings) {
final page = ChickenPages.pages.firstWhere(
(e) => e.name == settings.name,
orElse: () =>
ChickenPages.pages.firstWhere((e) => e.name == ChickenRoutes.saleSteward),
orElse: () => ChickenPages.pages.firstWhere(
(e) => e.name == ChickenRoutes.saleSteward,
),
);
return buildRouteFromGetPage(page);
@@ -46,15 +48,18 @@ class StewardRootPage extends GetView<StewardRootLogic> {
),
Navigator(
key: Get.nestedKey(stewardThirdKey),
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[2]),
onGenerateRoute: (settings) =>
GetPageRoute(page: () => controller.pages[2]),
),
Navigator(
key: Get.nestedKey(stewardFourthKey),
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[3]),
onGenerateRoute: (settings) =>
GetPageRoute(page: () => controller.pages[3]),
),
Navigator(
key: Get.nestedKey(stewardFifthKey),
onGenerateRoute: (settings) => GetPageRoute(page: () => controller.pages[4]),
onGenerateRoute: (settings) =>
GetPageRoute(page: () => controller.pages[4]),
),
],
index: data.value,
@@ -150,7 +155,10 @@ class StewardRootPage extends GetView<StewardRootLogic> {
return Container(
height: 70,
width: Get.width / 2,
decoration: BoxDecoration(color: Colors.white, borderRadius: BorderRadius.circular(8)),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(8),
),
clipBehavior: Clip.hardEdge,
child: Row(
children: [
@@ -171,7 +179,9 @@ class StewardRootPage extends GetView<StewardRootLogic> {
Text(
'بارهای امروز',
textAlign: TextAlign.right,
style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal),
style: AppFonts.yekan14.copyWith(
color: AppColor.blueNormal,
),
),
],
),
@@ -238,7 +248,9 @@ class StewardRootPage extends GetView<StewardRootLogic> {
Text(
title,
textAlign: TextAlign.right,
style: AppFonts.yekan14.copyWith(color: AppColor.mediumGreyDarkActive),
style: AppFonts.yekan14.copyWith(
color: AppColor.mediumGreyDarkActive,
),
),
],
),
@@ -261,12 +273,16 @@ class StewardRootPage extends GetView<StewardRootLogic> {
Text(
description,
textAlign: TextAlign.right,
style: AppFonts.yekan16.copyWith(color: AppColor.mediumGreyDarkActive),
style: AppFonts.yekan16.copyWith(
color: AppColor.mediumGreyDarkActive,
),
),
Text(
unit,
textAlign: TextAlign.center,
style: AppFonts.yekan12.copyWith(color: AppColor.mediumGreyDarkActive),
style: AppFonts.yekan12.copyWith(
color: AppColor.mediumGreyDarkActive,
),
),
],
),
@@ -311,17 +327,23 @@ class StewardRootPage extends GetView<StewardRootLogic> {
Text(
title,
textAlign: TextAlign.right,
style: AppFonts.yekan14.copyWith(color: AppColor.mediumGreyDarkActive),
style: AppFonts.yekan14.copyWith(
color: AppColor.mediumGreyDarkActive,
),
),
Text(
description,
textAlign: TextAlign.right,
style: AppFonts.yekan16.copyWith(color: AppColor.mediumGreyDarkActive),
style: AppFonts.yekan16.copyWith(
color: AppColor.mediumGreyDarkActive,
),
),
Text(
unit,
textAlign: TextAlign.center,
style: AppFonts.yekan12.copyWith(color: AppColor.mediumGreyDarkActive),
style: AppFonts.yekan12.copyWith(
color: AppColor.mediumGreyDarkActive,
),
),
],
),
@@ -369,14 +391,18 @@ class StewardRootPage extends GetView<StewardRootLogic> {
padding: EdgeInsets.all(4),
decoration: ShapeDecoration(
color: const Color(0xFFBECDFF),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
),
child: Container(
width: 40,
height: 40,
decoration: ShapeDecoration(
color: AppColor.blueNormal,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
),
child: SvgGenImage.vec(iconPath).svg(
width: 24,
@@ -386,7 +412,10 @@ class StewardRootPage extends GetView<StewardRootLogic> {
),
),
),
Text(title, style: AppFonts.yekan10.copyWith(color: AppColor.blueNormal)),
Text(
title,
style: AppFonts.yekan10.copyWith(color: AppColor.blueNormal),
),
],
);
}
@@ -403,16 +432,24 @@ class StewardRootPage extends GetView<StewardRootLogic> {
padding: EdgeInsets.all(4),
decoration: ShapeDecoration(
color: const Color(0xFFD9F7F0),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
),
),
child: Assets.vec.messageAddSvg.svg(
width: 40,
height: 40,
colorFilter: ColorFilter.mode(AppColor.greenNormal, BlendMode.srcIn),
colorFilter: ColorFilter.mode(
AppColor.greenNormal,
BlendMode.srcIn,
),
fit: BoxFit.cover,
),
),
Text('افزودن', style: AppFonts.yekan10.copyWith(color: AppColor.greenDarkHover)),
Text(
'افزودن',
style: AppFonts.yekan10.copyWith(color: AppColor.greenDarkHover),
),
],
);
}
@@ -559,7 +596,9 @@ class StewardRootPage extends GetView<StewardRootLogic> {
child: Text(
title,
textAlign: TextAlign.right,
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
),
Flexible(
@@ -567,7 +606,9 @@ class StewardRootPage extends GetView<StewardRootLogic> {
child: Text(
value,
textAlign: TextAlign.center,
style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover),
style: AppFonts.yekan14.copyWith(
color: AppColor.darkGreyDarkHover,
),
),
),
],
@@ -593,7 +634,9 @@ class StewardRootPage extends GetView<StewardRootLogic> {
Text(
'اطلاعات ارسالی',
textAlign: TextAlign.right,
style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal),
style: AppFonts.yekan16Bold.copyWith(
color: AppColor.blueNormal,
),
),
const SizedBox(height: 12),
buildRow(