fix : di for Role
This commit is contained in:
@@ -44,32 +44,20 @@ sealed class AppPages {
|
||||
];
|
||||
}
|
||||
|
||||
Map<String, Future<void>?> getTargetModule(Module? value) {
|
||||
switch (value) {
|
||||
case Module.inspection:
|
||||
return {InspectionRoutes.init: setupInspectionDI()};
|
||||
case Module.liveStocks:
|
||||
return {LiveStockRoutes.init: setupLiveStockDI()};
|
||||
case Module.chicken:
|
||||
return {ChickenRoutes.initSteward: setupChickenDI()};
|
||||
default:
|
||||
return {AppPaths.moduleList: null};
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, List<Future<void>?>?> getAuthTargetPage(Module? value) {
|
||||
Map<String, List<Future<void> Function()?>?> getAuthTargetPage(Module? value) {
|
||||
switch (value) {
|
||||
case Module.inspection:
|
||||
return {
|
||||
InspectionRoutes.auth: [setupInspectionDI(), removeInspectionDI()],
|
||||
InspectionRoutes.auth: [setupInspectionDI, removeInspectionDI],
|
||||
};
|
||||
case Module.liveStocks:
|
||||
return {
|
||||
LiveStockRoutes.auth: [setupLiveStockDI(), removeLiveStockDI()],
|
||||
LiveStockRoutes.auth: [setupLiveStockDI, removeLiveStockDI],
|
||||
};
|
||||
case Module.chicken:
|
||||
return {
|
||||
ChickenRoutes.auth: [setupChickenDI(), removeChickenDI()],
|
||||
ChickenRoutes.auth: [setupChickenDI, removeChickenDI],
|
||||
};
|
||||
default:
|
||||
return {AppPaths.moduleList: null};
|
||||
|
||||
Reference in New Issue
Block a user