feat : module page
This commit is contained in:
@@ -25,7 +25,12 @@ sealed class AppPages {
|
||||
GetPage(
|
||||
name: AppPaths.moduleList,
|
||||
page: () => ModulesPage(),
|
||||
binding: BindingsBuilder.put(() => ModulesLogic()),
|
||||
binding: BindingsBuilder(() {
|
||||
|
||||
Get.lazyPut(() => SliderLogic(), tag: "up");
|
||||
Get.lazyPut(() => SliderLogic(), tag: "down");
|
||||
Get.put(ModulesLogic());
|
||||
}),
|
||||
),
|
||||
|
||||
GetPage(
|
||||
@@ -35,35 +40,33 @@ sealed class AppPages {
|
||||
),
|
||||
|
||||
...InspectionPages.pages,
|
||||
|
||||
...LiveStockPages.pages,
|
||||
...ChickenPages.pages,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Map<String, Future<void>?> getTargetModule(Module? value) {
|
||||
switch (value) {
|
||||
case Module.inspection:
|
||||
return {InspectionRoutes.init:setupInspectionDI()};
|
||||
return {InspectionRoutes.init: setupInspectionDI()};
|
||||
case Module.liveStocks:
|
||||
return {LiveStockRoutes.init: setupLiveStockDI()};
|
||||
case Module.chicken:
|
||||
return {ChickenRoutes.init : setupChickenDI()};
|
||||
return {ChickenRoutes.init: setupChickenDI()};
|
||||
default:
|
||||
return {AppPaths.moduleList : null};
|
||||
return {AppPaths.moduleList: null};
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, Future<void>?> getAuthTargetPage(Module? value) {
|
||||
switch (value) {
|
||||
case Module.inspection:
|
||||
return {InspectionRoutes.auth:setupInspectionDI()};
|
||||
return {InspectionRoutes.auth: setupInspectionDI()};
|
||||
case Module.liveStocks:
|
||||
return {LiveStockRoutes.auth: setupLiveStockDI()};
|
||||
case Module.chicken:
|
||||
return {ChickenRoutes.auth : setupChickenDI()};
|
||||
return {ChickenRoutes.auth: setupChickenDI()};
|
||||
default:
|
||||
return {AppPaths.moduleList : null};
|
||||
return {AppPaths.moduleList: null};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user