Files
rasadyar_application/lib/presentation/pages/modules/logic.dart

29 lines
768 B
Dart
Raw Normal View History

2025-05-11 11:50:01 +03:30
import 'package:rasadyar_core/core.dart';
class ModulesLogic extends GetxController {
2025-07-28 15:57:30 +03:30
TokenStorageService tokenService = Get.find<TokenStorageService>();
2025-05-11 11:50:01 +03:30
2025-07-28 15:57:30 +03:30
List<ModuleModel> moduleList = [
ModuleModel(title: 'بازرسی', icon: Assets.icons.inspection.path, module: Module.inspection),
2025-08-02 15:09:06 +03:30
// ModuleModel(title: 'دام', icon: Assets.icons.liveStock.path, module: Module.liveStocks),
2025-06-03 16:55:49 +03:30
ModuleModel(title: 'مرغ', icon: Assets.icons.liveStock.path, module: Module.chicken),
];
RxnInt selectedIndex = RxnInt(null);
2025-05-11 11:50:01 +03:30
@override
void onReady() {
super.onReady();
}
@override
void onClose() {
super.onClose();
}
2025-07-28 15:57:30 +03:30
void saveModule(Module module) {
tokenService.saveModule(module);
tokenService.appModule.value = module;
}
2025-05-11 11:50:01 +03:30
}