fix : chicken app login and new module logic

This commit is contained in:
2025-08-26 12:22:43 +03:30
parent 8402acbeac
commit e65567ce69
14 changed files with 136 additions and 68 deletions

View File

@@ -28,21 +28,20 @@ class ModulesLogic extends GetxController {
tokenService.appModule.value = module;
}
void onTapCard(Module module, int index) async {
isLoading.value = !isLoading.value;
selectedIndex.value = index;
await Future.delayed(Duration(milliseconds: 200)); // Simulate loading delay
navigateToModule(module);
}
Future<void> navigateToModule(Module module) async {
var target = getTargetPage(module).entries.first;
var target = getAuthTargetPage(module).entries.first;
if (target.value != null) {
await target.value;
}
Get.offAllNamed(target.key);
}
void onTapCard(Module module, int index) async {
isLoading.value = true;
selectedIndex.value = index;
saveModule(module);
await Future.delayed(Duration(milliseconds: 500)); // Simulate loading delay
navigateToModule(module);
isLoading.value = !isLoading.value;
Get.toNamed(target.key, arguments: module);
}
}