fix : di for Role

This commit is contained in:
2025-09-03 11:43:52 +03:30
parent ebec27b630
commit 8e9768daf6
9 changed files with 74 additions and 86 deletions

View File

@@ -89,7 +89,7 @@ class ModulesLogic extends GetxController {
selectedIndex.value = index;
await Future.delayed(Duration(milliseconds: 300));
selectedIndex.value = null;
saveModule(module);
// saveModule(module);
await navigateToModule(module);
}
@@ -98,14 +98,14 @@ class ModulesLogic extends GetxController {
if (target.value?[0] != null) {
isLoading.value = !isLoading.value;
await target.value?[0];
await target.value?[0]?.call();
isLoading.value = !isLoading.value;
}
await Get.toNamed(target.key, arguments: module);
if (target.value?[1] != null) {
await target.value?[1];
await target.value?[1]?.call();
}
}

View File

@@ -87,26 +87,25 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
children: [
const Text('در حال دانلود بروزرسانی برنامه...'),
Obx(
() =>
Row(
spacing: 8,
children: [
Expanded(
child: LinearProgressIndicator(
value: percent.value,
color: AppColor.greenNormal,
minHeight: 4,
),
),
SizedBox(
width: 55.w,
child: Text(
'${(percent.value * 100).toStringAsFixed(2)}%',
textAlign: TextAlign.center,
),
),
],
() => Row(
spacing: 8,
children: [
Expanded(
child: LinearProgressIndicator(
value: percent.value,
color: AppColor.greenNormal,
minHeight: 4,
),
),
SizedBox(
width: 55.w,
child: Text(
'${(percent.value * 100).toStringAsFixed(2)}%',
textAlign: TextAlign.center,
),
),
],
),
),
Row(
@@ -119,9 +118,9 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
height: 40.h,
onPressed: data.value != null
? () {
installApk();
Get.back();
}
installApk();
Get.back();
}
: null,
text: 'نصب',
);
@@ -163,10 +162,7 @@ class SplashLogic extends GetxController with GetTickerProviderStateMixin {
await Future.wait(funs ?? []);
Get.offAndToNamed(target.route!);
}
} catch (e, st) {
debugPrint("onReady error: $e\n$st");
}