fix : page route widget and other page

This commit is contained in:
2025-07-14 09:27:13 +03:30
parent 6567f5561b
commit 963630602e
4 changed files with 6 additions and 10 deletions

View File

@@ -4,12 +4,11 @@ import 'package:rasadyar_core/core.dart';
class BuyLogic extends GetxController {
RootLogic rootLogic = Get.find<RootLogic>();
late List<String> routesName;
List<String> routesName = ['خرید'];
@override
void onInit() {
super.onInit();
routesName = [...rootLogic.routesName, 'خرید'].toList();
}
@override

View File

@@ -25,7 +25,6 @@ class RootLogic extends GetxController {
final defaultRoutes = <int, String>{0: ChickenRoutes.buy, 1: ChickenRoutes.sale};
List<String> routesName = ['رصدطیور'];
late DioRemote dioRemote;
var tokenService = Get.find<TokenStorageService>();

View File

@@ -17,13 +17,8 @@ class SaleLogic extends GetxController {
RootLogic rootLogic = Get.find<RootLogic>();
late List<String> routesName;
List<String> routesName = ['فروش'];
@override
void onInit() {
super.onInit();
routesName = [...rootLogic.routesName, 'فروش'].toList();
}
@override
void onReady() {

View File

@@ -4,6 +4,9 @@ import 'package:rasadyar_core/core.dart';
Widget buildPageRoute(List<String> route) {
return Padding(
padding: const EdgeInsets.fromLTRB(0, 4, 7, 4),
child: Text(route.isEmpty ? 'خانه' : route.join("/"), style: AppFonts.yekan14.copyWith(color: AppColor.bgDark)),
child: Text(
route.isEmpty ? 'خانه' : route.join(" > "),
style: AppFonts.yekan14.copyWith(color: AppColor.bgDark),
),
);
}