fix : some di remove in module page

This commit is contained in:
2025-09-01 10:50:05 +03:30
parent d8eedd106a
commit 5af5d63a1e
12 changed files with 275 additions and 48 deletions

View File

@@ -26,7 +26,6 @@ sealed class AppPages {
name: AppPaths.moduleList,
page: () => ModulesPage(),
binding: BindingsBuilder(() {
Get.lazyPut(() => SliderLogic(), tag: "up");
Get.lazyPut(() => SliderLogic(), tag: "down");
Get.put(ModulesLogic());
@@ -58,14 +57,20 @@ Map<String, Future<void>?> getTargetModule(Module? value) {
}
}
Map<String, Future<void>?> getAuthTargetPage(Module? value) {
Map<String, List<Future<void>?>?> getAuthTargetPage(Module? value) {
switch (value) {
case Module.inspection:
return {InspectionRoutes.auth: setupInspectionDI()};
return {
InspectionRoutes.auth: [setupInspectionDI(), removeInspectionDI()],
};
case Module.liveStocks:
return {LiveStockRoutes.auth: setupLiveStockDI()};
return {
LiveStockRoutes.auth: [setupLiveStockDI(), removeLiveStockDI()],
};
case Module.chicken:
return {ChickenRoutes.auth: setupChickenDI()};
return {
ChickenRoutes.auth: [setupChickenDI(), removeChickenDI()],
};
default:
return {AppPaths.moduleList: null};
}