fix : some ui bug

This commit is contained in:
2025-09-22 11:25:50 +03:30
parent 338dd8f681
commit a5da59b5dd
4 changed files with 26 additions and 29 deletions

View File

@@ -241,21 +241,19 @@ class PoultryScienceHomePage extends GetView<PoultryScienceHomeLogic> {
widelyUsed( widelyUsed(
title: 'ثبت کشتار', title: 'ثبت کشتار',
iconPath: Assets.vec.noteRemoveSvg.path, iconPath: Assets.vec.noteRemoveSvg.path,
isOnEdit: false,
onTap: () async { onTap: () async {
controller.rootLogic.currentPage.value = 0; controller.rootLogic.currentPage.value = 0;
Get.toNamed(ChickenRoutes.genocidePoultryScience, id: poultryFirstKey);
Get.toNamed(ChickenRoutes.inspectionPoultryScience, id: poultryFirstKey);
}, },
isOnEdit: false,
), ),
widelyUsed( widelyUsed(
title: 'فارم ها', title: 'فارم ها',
iconPath: Assets.vec.cubeSvg.path, iconPath: Assets.vec.cubeSvg.path,
isOnEdit: false, isOnEdit: false,
onTap: () async { onTap: () async {
controller.rootLogic.currentPage.value = 1; controller.rootLogic.currentPage.value = 0;
Get.toNamed(ChickenRoutes.salesOutOfProvinceSteward, id: poultryFirstKey); Get.toNamed(ChickenRoutes.farmPoultryScience, id: poultryFirstKey);
}, },
), ),
@@ -264,8 +262,8 @@ class PoultryScienceHomePage extends GetView<PoultryScienceHomeLogic> {
iconPath: Assets.vec.boxTickSvg.path, iconPath: Assets.vec.boxTickSvg.path,
isOnEdit: false, isOnEdit: false,
onTap: () async { onTap: () async {
controller.rootLogic.currentPage.value = 1; controller.rootLogic.currentPage.value = 0;
Get.toNamed(ChickenRoutes.salesInProvinceSteward, id: poultryFirstKey); Get.toNamed(ChickenRoutes.activeHatchingPoultryScience, id: poultryFirstKey);
}, },
), ),
], ],

View File

@@ -78,14 +78,16 @@ class PoultryScienceRootPage extends GetView<PoultryScienceRootLogic> {
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
items: [ items: [
RBottomNavigationItem( RBottomNavigationItem(
label: 'اقدام', label: 'عملیات',
icon: Assets.vec.settingSvg.path, icon: Assets.vec.settingSvg.path,
isSelected: controller.currentPage.value == 0, isSelected: controller.currentPage.value == 0,
onTap: () { onTap: () {
Get.nestedKey( Get.nestedKey(
poultrySecondKey, poultrySecondKey,
)?.currentState?.popUntil((route) => route.isFirst); )?.currentState?.popUntil((route) => route.isFirst);
Get.nestedKey(
poultryFirstKey,
)?.currentState?.popUntil((route) => route.isFirst);
controller.changePage(0); controller.changePage(0);
}, },
), ),

View File

@@ -2,10 +2,10 @@ import 'package:flutter/material.dart';
import 'package:rasadyar_core/core.dart'; import 'package:rasadyar_core/core.dart';
class RBottomNavigation extends StatefulWidget { class RBottomNavigation extends StatefulWidget {
RBottomNavigation({super.key, required this.items,this.mainAxisAlignment}); const RBottomNavigation({super.key, required this.items, this.mainAxisAlignment});
final List<RBottomNavigationItem> items; final List<RBottomNavigationItem> items;
MainAxisAlignment? mainAxisAlignment; final MainAxisAlignment? mainAxisAlignment;
@override @override
State<RBottomNavigation> createState() => _RBottomNavigationState(); State<RBottomNavigation> createState() => _RBottomNavigationState();
@@ -15,8 +15,9 @@ class _RBottomNavigationState extends State<RBottomNavigation> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
height: 100.h, height: 80.h,
padding: EdgeInsets.symmetric(horizontal: 11.w, vertical: 18.h),
padding: EdgeInsets.fromLTRB(11.w, 4.h, 11.w, 6.h),
decoration: BoxDecoration( decoration: BoxDecoration(
color: AppColor.blueNormal, color: AppColor.blueNormal,
borderRadius: const BorderRadius.only( borderRadius: const BorderRadius.only(
@@ -49,11 +50,7 @@ class RBottomNavigationItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
constraints: BoxConstraints( constraints: BoxConstraints(minWidth: 70.h, minHeight: 70.h, maxHeight: 70.h),
minWidth: 70.h,
minHeight: 70.h,
maxHeight: 70.h
),
padding: const EdgeInsets.symmetric(horizontal: 10), padding: const EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration( decoration: BoxDecoration(
color: isSelected ? Colors.white.withAlpha(208) : Colors.transparent, color: isSelected ? Colors.white.withAlpha(208) : Colors.transparent,
@@ -65,8 +62,8 @@ class RBottomNavigationItem extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
SvgGenImage.vec(icon).svg( SvgGenImage.vec(icon).svg(
width: 40.w, width: (isSelected ? 40 : 36).w,
height: 40.h, height: (isSelected ? 40 : 36).h,
colorFilter: ColorFilter.mode( colorFilter: ColorFilter.mode(
isSelected ? AppColor.blueNormal : Colors.white, isSelected ? AppColor.blueNormal : Colors.white,
BlendMode.srcIn, BlendMode.srcIn,
@@ -75,9 +72,9 @@ class RBottomNavigationItem extends StatelessWidget {
SizedBox(height: 5.h), SizedBox(height: 5.h),
Text( Text(
label, label,
style: AppFonts.yekan10.copyWith( style: isSelected
color: isSelected ? AppColor.blueNormal : Colors.white, ? AppFonts.yekan12Bold.copyWith(color: AppColor.blueNormal)
), : AppFonts.yekan10.copyWith(color: Colors.white),
), ),
], ],
), ),

View File

@@ -1,7 +1,7 @@
name: rasadyar_app name: rasadyar_app
description: "A new Flutter project." description: "A new Flutter project."
publish_to: 'none' publish_to: 'none'
version: 1.3.6+4 version: 1.3.7+5
environment: environment:
sdk: ^3.9.0 sdk: ^3.9.0