refactor: update data source and repository structure by removing unused files, enhancing model integration, and adjusting import paths for better organization
This commit is contained in:
60
packages/chicken/lib/features/kill_house/root/logic.dart
Normal file
60
packages/chicken/lib/features/kill_house/root/logic.dart
Normal file
@@ -0,0 +1,60 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_chicken/data/di/chicken_di.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/broadcast_price/broadcast_price.dart';
|
||||
import 'package:rasadyar_chicken/data/models/response/roles_products/roles_products.dart';
|
||||
import 'package:rasadyar_chicken/data/repositories/kill_house/kill_house_repository.dart';
|
||||
import 'package:rasadyar_chicken/features/common/profile/view.dart';
|
||||
import 'package:rasadyar_chicken/presentation/routes/pages.dart';
|
||||
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
|
||||
import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class KillHouseRootLogic extends GetxController {
|
||||
RxInt currentPage = 1.obs;
|
||||
|
||||
var tokenService = Get.find<TokenStorageService>();
|
||||
|
||||
late KillHouseRepository killHouseRepository;
|
||||
|
||||
@override
|
||||
void onInit() {
|
||||
super.onInit();
|
||||
killHouseRepository = diChicken.get<KillHouseRepository>();
|
||||
}
|
||||
|
||||
final pages = [
|
||||
Navigator(
|
||||
key: Get.nestedKey(killHouseActionKey),
|
||||
onGenerateRoute: (settings) {
|
||||
final page = ChickenPages.pages.firstWhere(
|
||||
(e) => e.name == settings.name,
|
||||
orElse: () => ChickenPages.pages.firstWhere(
|
||||
(e) => e.name == ChickenRoutes.actionKillHouse,
|
||||
),
|
||||
);
|
||||
|
||||
return buildRouteFromGetPage(page);
|
||||
},
|
||||
),
|
||||
Container(color: Colors.deepPurpleAccent.withAlpha(50)),
|
||||
ProfilePage(),
|
||||
];
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
// TODO: implement onReady
|
||||
super.onReady();
|
||||
}
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
// TODO: implement onClose
|
||||
super.onClose();
|
||||
}
|
||||
|
||||
void changePage(int i) {
|
||||
currentPage.value = i;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user