refactor : rename files and update routes for poultry actions

feat : poultry kill registration and poultry OrderList

** Made With Nima **
This commit is contained in:
2025-09-16 15:47:35 +03:30
parent 87a0955697
commit e933d22f8f
81 changed files with 22780 additions and 192 deletions

View File

@@ -4,6 +4,7 @@ import 'package:rasadyar_chicken/data/repositories/poultry_science/poultry_scien
import 'package:rasadyar_chicken/presentation/pages/common/profile/view.dart';
import 'package:rasadyar_chicken/presentation/pages/poultry_science/home/view.dart';
import 'package:rasadyar_chicken/presentation/pages/poultry_science/poultry_action/view.dart';
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
import 'package:rasadyar_chicken/presentation/utils/utils.dart';
import 'package:rasadyar_core/core.dart';
@@ -12,9 +13,11 @@ enum ErrorLocationType { serviceDisabled, permissionDenied, none }
class PoultryScienceRootLogic extends GetxController {
RxInt currentPage = 1.obs;
List<Widget> pages = [PoultryActionPage(), PoultryScienceHomePage(), ProfilePage()];
late DioRemote dioRemote;
var tokenService = Get.find<TokenStorageService>();
late PoultryScienceRepository poultryRepository;
RxList<ErrorLocationType> errorLocationType = RxList();
RxMap<int, dynamic> homeExpandedList = RxMap();
@@ -46,4 +49,17 @@ class PoultryScienceRootLogic extends GetxController {
void changePage(int index) {
currentPage.value = index;
}
int getNestedKey() {
switch (currentPage.value) {
case 0:
return poultryFirstKey;
case 1:
return poultrySecondKey;
case 2:
return poultryThirdKey;
default:
return poultryFirstKey;
}
}
}

View File

@@ -18,7 +18,7 @@ class PoultryScienceRootPage extends GetView<PoultryScienceRootLogic> {
return PopScope(
canPop: false,
onPopInvokedWithResult: (didPop, result) async {
final nestedKey = Get.nestedKey(controller.currentPage.value);
final nestedKey = Get.nestedKey(controller.getNestedKey());
final currentNavigator = nestedKey?.currentState;
if (currentNavigator?.canPop() ?? false) {