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(
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<PoultryScienceHomeLogic> {
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);
},
),
],

View File

@@ -78,14 +78,16 @@ class PoultryScienceRootPage extends GetView<PoultryScienceRootLogic> {
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);
},
),

View File

@@ -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<RBottomNavigationItem> items;
MainAxisAlignment? mainAxisAlignment;
final MainAxisAlignment? mainAxisAlignment;
@override
State<RBottomNavigation> createState() => _RBottomNavigationState();
@@ -15,8 +15,9 @@ class _RBottomNavigationState extends State<RBottomNavigation> {
@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<RBottomNavigation> {
),
),
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),
),
],
),

View File

@@ -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: