2025-07-27 15:36:28 +03:30
|
|
|
import 'package:rasadyar_app/presentation/pages/modules/logic.dart';
|
|
|
|
|
import 'package:rasadyar_app/presentation/pages/modules/view.dart';
|
2025-04-07 16:49:15 +03:30
|
|
|
import 'package:rasadyar_app/presentation/pages/splash/logic.dart';
|
|
|
|
|
import 'package:rasadyar_app/presentation/pages/splash/view.dart';
|
2025-04-15 17:27:48 +03:30
|
|
|
import 'package:rasadyar_app/presentation/pages/system_design/system_design.dart';
|
2025-10-13 16:30:43 +03:30
|
|
|
import 'package:rasadyar_app/presentation/pages/test/logic.dart';
|
|
|
|
|
import 'package:rasadyar_app/presentation/pages/test/view.dart';
|
2025-06-03 23:26:38 +03:30
|
|
|
import 'package:rasadyar_chicken/chicken.dart';
|
2025-08-19 11:22:34 +03:30
|
|
|
import 'package:rasadyar_chicken/data/di/chicken_di.dart';
|
2025-05-14 11:44:46 +03:30
|
|
|
import 'package:rasadyar_core/core.dart';
|
2025-08-26 12:22:43 +03:30
|
|
|
import 'package:rasadyar_inspection/injection/inspection_di.dart';
|
2025-05-14 11:44:46 +03:30
|
|
|
import 'package:rasadyar_inspection/inspection.dart';
|
2025-08-19 11:22:34 +03:30
|
|
|
import 'package:rasadyar_livestock/injection/live_stock_di.dart';
|
2025-05-19 16:16:33 +03:30
|
|
|
import 'package:rasadyar_livestock/presentation/routes/app_pages.dart';
|
2025-04-07 16:49:15 +03:30
|
|
|
|
|
|
|
|
part 'app_paths.dart';
|
|
|
|
|
|
|
|
|
|
sealed class AppPages {
|
|
|
|
|
AppPages._();
|
|
|
|
|
|
2025-10-14 16:24:46 +03:30
|
|
|
static const String initRoutes = AppPaths.splash;
|
|
|
|
|
// static const String initRoutes = AppPaths.test;
|
2025-04-15 17:27:48 +03:30
|
|
|
static const String initDesignSystem = AppPaths.systemDesignPage;
|
2025-04-07 16:49:15 +03:30
|
|
|
|
|
|
|
|
static List<GetPage> pages = [
|
2025-04-15 17:27:48 +03:30
|
|
|
GetPage(name: AppPaths.systemDesignPage, page: () => SystemDesignPage()),
|
2025-07-27 15:36:28 +03:30
|
|
|
|
|
|
|
|
GetPage(
|
|
|
|
|
name: AppPaths.moduleList,
|
|
|
|
|
page: () => ModulesPage(),
|
2025-08-27 11:56:29 +03:30
|
|
|
binding: BindingsBuilder(() {
|
|
|
|
|
Get.lazyPut(() => SliderLogic(), tag: "up");
|
|
|
|
|
Get.lazyPut(() => SliderLogic(), tag: "down");
|
|
|
|
|
Get.put(ModulesLogic());
|
|
|
|
|
}),
|
2025-07-27 15:36:28 +03:30
|
|
|
),
|
|
|
|
|
|
2025-04-07 16:49:15 +03:30
|
|
|
GetPage(
|
|
|
|
|
name: AppPaths.splash,
|
|
|
|
|
page: () => SplashPage(),
|
|
|
|
|
binding: BindingsBuilder.put(() => SplashLogic()),
|
|
|
|
|
),
|
2025-04-09 17:05:38 +03:30
|
|
|
|
2025-10-13 16:30:43 +03:30
|
|
|
GetPage(
|
|
|
|
|
name: AppPaths.test,
|
|
|
|
|
page: () => TestPage(),
|
|
|
|
|
binding: BindingsBuilder.put(() => TestLogic()),
|
|
|
|
|
),
|
|
|
|
|
|
2025-04-22 15:51:05 +03:30
|
|
|
...InspectionPages.pages,
|
2025-05-19 16:16:33 +03:30
|
|
|
...LiveStockPages.pages,
|
2025-06-03 23:26:38 +03:30
|
|
|
...ChickenPages.pages,
|
2025-04-07 16:49:15 +03:30
|
|
|
];
|
|
|
|
|
}
|
2025-05-19 16:16:33 +03:30
|
|
|
|
2025-09-03 11:43:52 +03:30
|
|
|
Map<String, List<Future<void> Function()?>?> getAuthTargetPage(Module? value) {
|
2025-08-26 12:22:43 +03:30
|
|
|
switch (value) {
|
|
|
|
|
case Module.inspection:
|
2025-09-01 10:50:05 +03:30
|
|
|
return {
|
2025-09-03 11:43:52 +03:30
|
|
|
InspectionRoutes.auth: [setupInspectionDI, removeInspectionDI],
|
2025-09-01 10:50:05 +03:30
|
|
|
};
|
2025-08-26 12:22:43 +03:30
|
|
|
case Module.liveStocks:
|
2025-09-01 10:50:05 +03:30
|
|
|
return {
|
2025-09-03 11:43:52 +03:30
|
|
|
LiveStockRoutes.auth: [setupLiveStockDI, removeLiveStockDI],
|
2025-09-01 10:50:05 +03:30
|
|
|
};
|
2025-08-26 12:22:43 +03:30
|
|
|
case Module.chicken:
|
2025-09-01 10:50:05 +03:30
|
|
|
return {
|
2025-09-03 11:43:52 +03:30
|
|
|
ChickenRoutes.auth: [setupChickenDI, removeChickenDI],
|
2025-09-01 10:50:05 +03:30
|
|
|
};
|
2025-05-19 16:16:33 +03:30
|
|
|
default:
|
2025-08-27 11:56:29 +03:30
|
|
|
return {AppPaths.moduleList: null};
|
2025-05-19 16:16:33 +03:30
|
|
|
}
|
2025-06-03 23:26:38 +03:30
|
|
|
}
|