From a5da59b5dd96c56534a2269ceda81125906b15a7 Mon Sep 17 00:00:00 2001 From: "mr.mojtaba" Date: Mon, 22 Sep 2025 11:25:50 +0330 Subject: [PATCH] fix : some ui bug --- .../pages/poultry_science/home/view.dart | 14 +++++----- .../pages/poultry_science/root/view.dart | 6 +++-- .../r_bottom_navigation.dart | 27 +++++++++---------- pubspec.yaml | 8 +++--- 4 files changed, 26 insertions(+), 29 deletions(-) diff --git a/packages/chicken/lib/presentation/pages/poultry_science/home/view.dart b/packages/chicken/lib/presentation/pages/poultry_science/home/view.dart index 3dc8bf5..eb60d7b 100644 --- a/packages/chicken/lib/presentation/pages/poultry_science/home/view.dart +++ b/packages/chicken/lib/presentation/pages/poultry_science/home/view.dart @@ -241,21 +241,19 @@ class PoultryScienceHomePage extends GetView { widelyUsed( title: 'ثبت کشتار', iconPath: Assets.vec.noteRemoveSvg.path, - + isOnEdit: false, onTap: () async { controller.rootLogic.currentPage.value = 0; - - Get.toNamed(ChickenRoutes.inspectionPoultryScience, id: poultryFirstKey); + Get.toNamed(ChickenRoutes.genocidePoultryScience, id: poultryFirstKey); }, - isOnEdit: false, ), widelyUsed( title: 'فارم ها', iconPath: Assets.vec.cubeSvg.path, isOnEdit: false, onTap: () async { - controller.rootLogic.currentPage.value = 1; - Get.toNamed(ChickenRoutes.salesOutOfProvinceSteward, id: poultryFirstKey); + controller.rootLogic.currentPage.value = 0; + Get.toNamed(ChickenRoutes.farmPoultryScience, id: poultryFirstKey); }, ), @@ -264,8 +262,8 @@ class PoultryScienceHomePage extends GetView { iconPath: Assets.vec.boxTickSvg.path, isOnEdit: false, onTap: () async { - controller.rootLogic.currentPage.value = 1; - Get.toNamed(ChickenRoutes.salesInProvinceSteward, id: poultryFirstKey); + controller.rootLogic.currentPage.value = 0; + Get.toNamed(ChickenRoutes.activeHatchingPoultryScience, id: poultryFirstKey); }, ), ], diff --git a/packages/chicken/lib/presentation/pages/poultry_science/root/view.dart b/packages/chicken/lib/presentation/pages/poultry_science/root/view.dart index bec17a6..a891209 100644 --- a/packages/chicken/lib/presentation/pages/poultry_science/root/view.dart +++ b/packages/chicken/lib/presentation/pages/poultry_science/root/view.dart @@ -78,14 +78,16 @@ class PoultryScienceRootPage extends GetView { mainAxisAlignment: MainAxisAlignment.spaceAround, items: [ RBottomNavigationItem( - label: 'اقدام', + label: 'عملیات', icon: Assets.vec.settingSvg.path, isSelected: controller.currentPage.value == 0, onTap: () { Get.nestedKey( poultrySecondKey, )?.currentState?.popUntil((route) => route.isFirst); - + Get.nestedKey( + poultryFirstKey, + )?.currentState?.popUntil((route) => route.isFirst); controller.changePage(0); }, ), diff --git a/packages/core/lib/presentation/widget/bottom_navigation/r_bottom_navigation.dart b/packages/core/lib/presentation/widget/bottom_navigation/r_bottom_navigation.dart index fc129e6..5f4b322 100644 --- a/packages/core/lib/presentation/widget/bottom_navigation/r_bottom_navigation.dart +++ b/packages/core/lib/presentation/widget/bottom_navigation/r_bottom_navigation.dart @@ -2,10 +2,10 @@ import 'package:flutter/material.dart'; import 'package:rasadyar_core/core.dart'; class RBottomNavigation extends StatefulWidget { - RBottomNavigation({super.key, required this.items,this.mainAxisAlignment}); + const RBottomNavigation({super.key, required this.items, this.mainAxisAlignment}); final List items; - MainAxisAlignment? mainAxisAlignment; + final MainAxisAlignment? mainAxisAlignment; @override State createState() => _RBottomNavigationState(); @@ -15,8 +15,9 @@ class _RBottomNavigationState extends State { @override Widget build(BuildContext context) { return Container( - height: 100.h, - padding: EdgeInsets.symmetric(horizontal: 11.w, vertical: 18.h), + height: 80.h, + + padding: EdgeInsets.fromLTRB(11.w, 4.h, 11.w, 6.h), decoration: BoxDecoration( color: AppColor.blueNormal, borderRadius: const BorderRadius.only( @@ -25,7 +26,7 @@ class _RBottomNavigationState extends State { ), ), child: Row( - mainAxisAlignment: widget.mainAxisAlignment??MainAxisAlignment.spaceBetween, + mainAxisAlignment: widget.mainAxisAlignment ?? MainAxisAlignment.spaceBetween, children: widget.items, ), ); @@ -49,11 +50,7 @@ class RBottomNavigationItem extends StatelessWidget { @override Widget build(BuildContext context) { return Container( - constraints: BoxConstraints( - minWidth: 70.h, - minHeight: 70.h, - maxHeight: 70.h - ), + constraints: BoxConstraints(minWidth: 70.h, minHeight: 70.h, maxHeight: 70.h), padding: const EdgeInsets.symmetric(horizontal: 10), decoration: BoxDecoration( color: isSelected ? Colors.white.withAlpha(208) : Colors.transparent, @@ -65,8 +62,8 @@ class RBottomNavigationItem extends StatelessWidget { mainAxisAlignment: MainAxisAlignment.center, children: [ SvgGenImage.vec(icon).svg( - width: 40.w, - height: 40.h, + width: (isSelected ? 40 : 36).w, + height: (isSelected ? 40 : 36).h, colorFilter: ColorFilter.mode( isSelected ? AppColor.blueNormal : Colors.white, BlendMode.srcIn, @@ -75,9 +72,9 @@ class RBottomNavigationItem extends StatelessWidget { SizedBox(height: 5.h), Text( label, - style: AppFonts.yekan10.copyWith( - color: isSelected ? AppColor.blueNormal : Colors.white, - ), + style: isSelected + ? AppFonts.yekan12Bold.copyWith(color: AppColor.blueNormal) + : AppFonts.yekan10.copyWith(color: Colors.white), ), ], ), diff --git a/pubspec.yaml b/pubspec.yaml index 115db77..a616485 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: rasadyar_app description: "A new Flutter project." publish_to: 'none' -version: 1.3.6+4 +version: 1.3.7+5 environment: sdk: ^3.9.0 @@ -64,9 +64,9 @@ flutter: fonts: - - family: yekan - fonts: - - asset: fonts/iranyekanregularfanum.ttf + - family: yekan + fonts: + - asset: fonts/iranyekanregularfanum.ttf flutter_gen: