feat : new auth in chicken
This commit is contained in:
@@ -16,10 +16,11 @@ class CustomNavigationObserver extends NavigatorObserver {
|
||||
void didPush(Route route, Route? previousRoute) async {
|
||||
super.didPush(route, previousRoute);
|
||||
final routeName = route.settings.name;
|
||||
if (!_isWorkDone && routeName == ChickenRoutes.init) {
|
||||
if (!_isWorkDone &&( routeName == ChickenRoutes.init || routeName == ChickenRoutes.auth)) {
|
||||
_isWorkDone = true;
|
||||
setupChickenDI();
|
||||
} else if (!_isWorkDone && (routeName == InspectionRoutes.init || routeName == InspectionRoutes.auth)) {
|
||||
await setupChickenDI();
|
||||
} else if (!_isWorkDone &&
|
||||
(routeName == InspectionRoutes.init || routeName == InspectionRoutes.auth)) {
|
||||
_isWorkDone = true;
|
||||
|
||||
await setupInspectionDI();
|
||||
|
||||
@@ -5,7 +5,7 @@ class ModulesLogic extends GetxController {
|
||||
|
||||
List<ModuleModel> moduleList = [
|
||||
ModuleModel(title: 'بازرسی', icon: Assets.icons.inspection.path, module: Module.inspection),
|
||||
ModuleModel(title: 'دام', icon: Assets.icons.liveStock.path, module: Module.liveStocks),
|
||||
// ModuleModel(title: 'دام', icon: Assets.icons.liveStock.path, module: Module.liveStocks),
|
||||
ModuleModel(title: 'مرغ', icon: Assets.icons.liveStock.path, module: Module.chicken),
|
||||
];
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/chicken.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
import 'package:rasadyar_inspection/inspection.dart';
|
||||
|
||||
@@ -33,8 +34,9 @@ class ModulesPage extends GetView<ModulesLogic> {
|
||||
Get.toNamed(InspectionRoutes.init);
|
||||
break;
|
||||
case Module.liveStocks:
|
||||
//TODO: Implement liveStocks module navigation
|
||||
case Module.chicken:
|
||||
Get.toNamed(InspectionRoutes.init);
|
||||
Get.toNamed(ChickenRoutes.init);
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user