From e1766718126027c414380083b8e268095612e8ce Mon Sep 17 00:00:00 2001 From: "mr.mojtaba" Date: Mon, 22 Sep 2025 16:21:17 +0330 Subject: [PATCH] fix : ui bug --- assets/icons/chicken2.svg | 6 + assets/vec/chicken2.svg.vec | Bin 0 -> 2043 bytes .../poultry_science/active_hatching/view.dart | 3 +- .../pages/poultry_science/farm/logic.dart | 2 +- .../pages/poultry_science/farm/view.dart | 3 +- .../pages/poultry_science/genocide/logic.dart | 2 +- .../pages/poultry_science/genocide/view.dart | 3 +- .../pages/poultry_science/home/view.dart | 222 +++++++++++------- .../poultry_science/inspection/view.dart | 213 +++++++++-------- .../poultry_science/poultry_action/view.dart | 6 +- .../lib/presentation/widget/app_bar.dart | 2 + .../lib/presentation/widget/page_route.dart | 19 ++ .../lib/presentation/common/app_color.dart | 5 +- .../lib/presentation/common/assets.gen.dart | 8 + .../widget/card/card_icon_widget.dart | 10 +- 15 files changed, 308 insertions(+), 196 deletions(-) create mode 100644 assets/icons/chicken2.svg create mode 100644 assets/vec/chicken2.svg.vec diff --git a/assets/icons/chicken2.svg b/assets/icons/chicken2.svg new file mode 100644 index 0000000..65b5ea4 --- /dev/null +++ b/assets/icons/chicken2.svg @@ -0,0 +1,6 @@ + + + + diff --git a/assets/vec/chicken2.svg.vec b/assets/vec/chicken2.svg.vec new file mode 100644 index 0000000000000000000000000000000000000000..71a160ab2247ae21d7a03f96f038d33c66264f4c GIT binary patch literal 2043 zcmZvddsI*98pn72q@kikM#sczN}^wp6st7$_nR)iE^?`kCPPY@5h-MZhAzs_l#-Sd zT}YXsiKK>eB6B(@myuc-F(c`62$|8a9GBtjy`9cEf1G#iwLklPzR&x-`@KHlc3MGa zk|4xV5GrYQ&dcJRN)XgXzug#T0iZB;35|J5b4O3+cn_b-PgTwq805ouy|<7B!mSt%}iGMVFl^%HO0x8tL9 zS21aVEkm0piMEk83O5E%RP5vTPGHpba&c(tXm(mo2FvyMa=15|mJ4)DoC|GXE4Q`O{`+S@DDGX zc~FT8$0OqJjc1|xFjjP%(14qB=ZYH#w<7T?bMfbS9cT=T5EGLh!1cv$akKVUOdNh( z)PE!JLGdo}pxqGK8m|y%~_j1wvry*SQeS{coGn8Aj;o=zMk$m}$wfK0b8I3oz z&B{4q$&bxPiv=ZnBC{dJiiN~kD&|KrRpQc)RkXkkHQ%}ky8%Y;L1Vp=KLuz zU#6kIsE^cnF_7O2pThL9A32LNjkZcjVPTZK~nY z%4WQr>OvdgDKdQAnY7A?4{mwWz|)FqQ-8|q=UhFP`L(kcpf{iPweCE*c>xV-ygA$; zm?=Lj<`*Z!cyCiIquN*V$E%6V>W<;5@Fb>8iRIV!$x1!@Z8G=e$1v||3fJeXrq%jw z95ptY{Vm%l&;Ogea*lHO4*t#M%#A;ar(NY7ed=3<`Ogn49OGD~=)2AyQv9{42M{r{ zobtLZjy_7q$wfGsafEwL6(BOdj0W6~uCjwnzMPNTszMG;+zHdeMI59;CM zVOmI#!maHow@9vAWXmLEm;Lx0Ed1Px-0-m}cM9!Y~%V&8^( z_-szYruuqV%*}>JL^GORWTM6N4oY`s;rjj#Y-`IxiftE8Zpy-E!>;4N!Yr(mnBtR# zIElyIvJijwCxzBi`xLgXF`;blD6nQ{ZzY~2IMQg$9rzf69d`Bj?HeyPZ#)WJwJ(oq za*@zKhc*|}r1kaZ^{_a6vfr2XHj!{&;mvOEU_Ac8gW3H-I6ZDQGuMAA?JGB0%vgk& z5oG7pMM_+mt!ihb-qqkpO9xjR*kMmgyRk5p&Sc~G*WxF()_k2^CAJ9WY%eboi-(!f z>eX)Xo{b5g->4Ax_!`l2<^?g%(@5FJ)YavJzDHtv=0k)O8Q{6kE&SECMQpm=0*n8d z=YjbiTzeNwAC|(rrcI$bstxIZrD$AIr%;=igzn`PI5BMpF{g>65kFB!`@wL>8^1@ne8;Dq-hZnF`fEuDfqb3 zhSPOd;_etz-a4@my5$B`Z=Z!7rN;cS!x*Ri#<0Kg7xC#cOKI)i_iviC6W(s2{3vlX z(w{{0`_742t=Y!Rt7^!3!6MTRFS>K+`Di*Eg7(s7lLie}@)+0^3XisZOjD&ob1q*R zM;`7t<&nlYNc~yMDrxWEE{x-U;tM*0p_1$5%=A7#IZE}`Q`NZUHJGByd4;)6*Wv!^ z9b}&0@S8%9=N*uB)zVhT{xSod$`t-loCjH#Df`Qm+snEfcObsZx--3~N { return BasePage( hasSearch: false, hasFilter: false, - routes: controller.routesName, + routesWidget: buildContainerPageRoute(controller.routesName), onBackPressed: () => Get.back(id: poultryFirstKey), widgets: [ hatchingWidget() diff --git a/packages/chicken/lib/presentation/pages/poultry_science/farm/logic.dart b/packages/chicken/lib/presentation/pages/poultry_science/farm/logic.dart index a0419a6..3f7c0d4 100644 --- a/packages/chicken/lib/presentation/pages/poultry_science/farm/logic.dart +++ b/packages/chicken/lib/presentation/pages/poultry_science/farm/logic.dart @@ -6,7 +6,7 @@ import 'package:rasadyar_chicken/presentation/pages/poultry_science/root/logic.d import 'package:rasadyar_core/core.dart'; class FarmLogic extends GetxController { - List routes = ['اقدام', 'فارم ها']; + List routesName = ['اقدام', 'فارم ها']; PoultryScienceRootLogic rootLogic = Get.find(); final PoultryScienceHomeLogic _homeLogic = Get.find(); RxList tagInfo = [ diff --git a/packages/chicken/lib/presentation/pages/poultry_science/farm/view.dart b/packages/chicken/lib/presentation/pages/poultry_science/farm/view.dart index a37c7d5..007ed51 100644 --- a/packages/chicken/lib/presentation/pages/poultry_science/farm/view.dart +++ b/packages/chicken/lib/presentation/pages/poultry_science/farm/view.dart @@ -3,6 +3,7 @@ import 'package:rasadyar_chicken/data/models/response/poultry_farm/poultry_farm. import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart'; import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart'; +import 'package:rasadyar_chicken/presentation/widget/page_route.dart'; import 'package:rasadyar_core/core.dart'; import 'logic.dart'; @@ -13,9 +14,9 @@ class FarmPage extends GetView { @override Widget build(BuildContext context) { return BasePage( - routes: controller.routes, hasFilter: false, hasSearch: false, + routesWidget: buildContainerPageRoute(controller.routesName), onBackPressed: () => Get.back(id: poultryFirstKey), widgets: [firstTagInformation(), farmListWidget()], ); diff --git a/packages/chicken/lib/presentation/pages/poultry_science/genocide/logic.dart b/packages/chicken/lib/presentation/pages/poultry_science/genocide/logic.dart index 86e34f0..52d9027 100644 --- a/packages/chicken/lib/presentation/pages/poultry_science/genocide/logic.dart +++ b/packages/chicken/lib/presentation/pages/poultry_science/genocide/logic.dart @@ -4,7 +4,7 @@ import 'package:rasadyar_chicken/presentation/pages/poultry_science/root/logic.d import 'package:rasadyar_core/core.dart'; class GenocideLogic extends GetxController { - List routes = ['اقدام', 'درخواست کشتارها']; + List routesName = ['اقدام', 'درخواست کشتارها']; var tokenService = Get.find(); var gService = Get.find(); var rootLogic = Get.find(); diff --git a/packages/chicken/lib/presentation/pages/poultry_science/genocide/view.dart b/packages/chicken/lib/presentation/pages/poultry_science/genocide/view.dart index fb30829..daf7eb4 100644 --- a/packages/chicken/lib/presentation/pages/poultry_science/genocide/view.dart +++ b/packages/chicken/lib/presentation/pages/poultry_science/genocide/view.dart @@ -4,6 +4,7 @@ import 'package:rasadyar_chicken/presentation/pages/poultry_science/killing_regi import 'package:rasadyar_chicken/presentation/utils/nested_keys_utils.dart'; import 'package:rasadyar_chicken/presentation/widget/base_page/view.dart'; import 'package:rasadyar_chicken/presentation/widget/filter_bottom_sheet.dart'; +import 'package:rasadyar_chicken/presentation/widget/page_route.dart'; import 'package:rasadyar_core/core.dart'; import 'logic.dart'; @@ -14,7 +15,7 @@ class GenocidePage extends GetView { @override Widget build(BuildContext context) { return BasePage( - routes: controller.routes, + routesWidget: buildContainerPageRoute(controller.routesName), hasSearch: true, hasFilter: true, onSearchChanged: (data) { 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 eb60d7b..83509c4 100644 --- a/packages/chicken/lib/presentation/pages/poultry_science/home/view.dart +++ b/packages/chicken/lib/presentation/pages/poultry_science/home/view.dart @@ -15,32 +15,71 @@ class PoultryScienceHomePage extends GetView { Widget build(BuildContext context) { return Scaffold( backgroundColor: AppColor.bgLight, - appBar: chickenAppBar(hasBack: false, hasFilter: false, hasSearch: false), + appBar: chickenAppBar( + hasBack: false, + hasFilter: false, + hasSearch: false, + additionalActions: [ + SizedBox(width: 12), + Icon(CupertinoIcons.envelope_fill, color: Colors.white), + SizedBox(width: 12), + Icon(CupertinoIcons.bell_fill, color: Colors.white), + SizedBox(width: 12), + ], + ), body: SingleChildScrollView( physics: BouncingScrollPhysics(), child: Column( - spacing: 8, children: [ + SizedBox(height: 22.h), InkWell( onTap: () { controller.isExpanded.value = !controller.isExpanded.value; }, - child: Card( - margin: EdgeInsetsGeometry.all(6), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(8), - side: BorderSide(width: 0.50, color: const Color(0xFFA9A9A9)), - ), + child: Stack( + clipBehavior: Clip.none, + children: [ + Container( + margin: EdgeInsetsGeometry.all(6), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + border: Border.all(width: 0.50, color: const Color(0xFFA9A9A9)), + ), - child: ObxValue((data) { - return AnimatedSize( - duration: Duration(milliseconds: 300), - child: data.value ? mainItemWidget() : mainItemWidgetExpanded(), - ); - }, controller.isExpanded), + child: ObxValue((data) { + return AnimatedSize( + duration: Duration(milliseconds: 300), + child: data.value ? mainItemWidget() : mainItemWidgetExpanded(), + ); + }, controller.isExpanded), + ), + Positioned( + top: -4, + right: 20, + child: Container( + color: Colors.white, + padding: EdgeInsets.symmetric(horizontal: 8), + child: Row( + spacing: 8, + children: [ + Assets.vec.chicken2Svg.svg( + width: 16.w, + height: 16.h, + colorFilter: ColorFilter.mode(AppColor.iconColor, BlendMode.srcIn), + ), + Text( + 'فارم های مرغ گوشتی', + textAlign: TextAlign.right, + style: AppFonts.yekan16.copyWith(color: AppColor.iconColor), + ), + ], + ), + ), + ), + ], ), ), - + SizedBox(height: 10), widelyWidget(), SizedBox(height: 20), ], @@ -55,7 +94,8 @@ class PoultryScienceHomePage extends GetView { child: Column( mainAxisSize: MainAxisSize.min, children: [ - Row( + SizedBox(height: 8), + /* Row( spacing: 8, crossAxisAlignment: CrossAxisAlignment.center, children: [ @@ -75,14 +115,14 @@ class PoultryScienceHomePage extends GetView { ), ), Text( - 'فارم ها', + 'فارم ها', textAlign: TextAlign.right, style: AppFonts.yekan16.copyWith(color: AppColor.darkGreyDarkActive), ), Spacer(), Icon(CupertinoIcons.chevron_down, size: 18), ], - ), + ),*/ firstTagInformation(), secondTagInformation(), ], @@ -96,7 +136,8 @@ class PoultryScienceHomePage extends GetView { child: Column( mainAxisSize: MainAxisSize.min, children: [ - Row( + SizedBox(height: 8), + /* Row( spacing: 8, crossAxisAlignment: CrossAxisAlignment.center, children: [ @@ -127,7 +168,7 @@ class PoultryScienceHomePage extends GetView { child: Icon(CupertinoIcons.chevron_up, size: 18), ), ], - ), + ),*/ SizedBox(height: 8), firstTagInformation(), Row( @@ -208,68 +249,84 @@ class PoultryScienceHomePage extends GetView { //region Widely Used Widget Widget widelyWidget() { - return Column( - children: [ - Padding( - padding: EdgeInsetsGeometry.all(6), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [Text('پر کاربرد ها', textAlign: TextAlign.right, style: AppFonts.yekan16)], + return Container( + margin: EdgeInsetsGeometry.all(6), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + border: Border.all(width: 1, color: AppColor.borderColor), + ), + child: Stack( + clipBehavior: Clip.none, + children: [ + Padding( + padding: EdgeInsets.fromLTRB(12.w, 24.h, 12.w, 16.h), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + widelyUsed( + title: 'بازرسی', + iconPath: Assets.vec.cubeSearchSvg.path, + isOnEdit: false, + cardColor: AppColor.greenLightActive, + labelColor: AppColor.greenNormal, + textColor: AppColor.textColor, + onTap: () async { + controller.rootLogic.currentPage.value = 0; + + Get.toNamed(ChickenRoutes.inspectionPoultryScience, id: poultryFirstKey); + }, + ), + + widelyUsed( + title: 'ثبت کشتار', + iconPath: Assets.vec.noteRemoveSvg.path, + isOnEdit: false, + cardColor: AppColor.blueLightActive, + labelColor: AppColor.blueNormalOld, + textColor: AppColor.textColor, + onTap: () async { + controller.rootLogic.currentPage.value = 0; + Get.toNamed(ChickenRoutes.genocidePoultryScience, id: poultryFirstKey); + }, + ), + widelyUsed( + title: 'فارم ها', + iconPath: Assets.vec.cubeScanSvg.path, + cardColor: Color(0xFFFFCFA3), + labelColor: Color(0xFFF68D2B), + textColor: AppColor.textColor, + isOnEdit: false, + onTap: () async { + controller.rootLogic.currentPage.value = 0; + Get.toNamed(ChickenRoutes.farmPoultryScience, id: poultryFirstKey); + }, + ), + + widelyUsed( + title: 'جوجه ریزی فعال', + iconPath: Assets.vec.boxTickSvg.path, + isOnEdit: false, + cardColor: Color(0xFFD9BEFF), + labelColor: Color(0xFF9757FF), + textColor: AppColor.textColor, + onTap: () async { + controller.rootLogic.currentPage.value = 0; + Get.toNamed(ChickenRoutes.activeHatchingPoultryScience, id: poultryFirstKey); + }, + ), + ], + ), ), - ), - - Padding( - padding: const EdgeInsets.symmetric(horizontal: 2.0, vertical: 2), - child: Wrap( - spacing: 24.w, - runSpacing: 8.h, - children: [ - widelyUsed( - title: 'بازرسی', - iconPath: Assets.vec.cubeSearchSvg.path, - isOnEdit: false, - cardColor: AppColor.greenLightActive, - labelColor: AppColor.greenNormal, - textColor: AppColor.greenDarkHover, - onTap: () async { - controller.rootLogic.currentPage.value = 0; - - Get.toNamed(ChickenRoutes.inspectionPoultryScience, id: poultryFirstKey); - }, - ), - - widelyUsed( - title: 'ثبت کشتار', - iconPath: Assets.vec.noteRemoveSvg.path, - isOnEdit: false, - onTap: () async { - controller.rootLogic.currentPage.value = 0; - Get.toNamed(ChickenRoutes.genocidePoultryScience, id: poultryFirstKey); - }, - ), - widelyUsed( - title: 'فارم ها', - iconPath: Assets.vec.cubeSvg.path, - isOnEdit: false, - onTap: () async { - controller.rootLogic.currentPage.value = 0; - Get.toNamed(ChickenRoutes.farmPoultryScience, id: poultryFirstKey); - }, - ), - - widelyUsed( - title: 'جوجه ریزی فعال', - iconPath: Assets.vec.boxTickSvg.path, - isOnEdit: false, - onTap: () async { - controller.rootLogic.currentPage.value = 0; - Get.toNamed(ChickenRoutes.activeHatchingPoultryScience, id: poultryFirstKey); - }, - ), - ], + Positioned( + top: -12, + right: 11, + child: Container( + color: Colors.white, + child: Text('پر کاربرد ها', textAlign: TextAlign.right, style: AppFonts.yekan16), + ), ), - ), - ], + ], + ), ); } @@ -354,7 +411,10 @@ class PoultryScienceHomePage extends GetView { ), ], ), - Text(title, style: AppFonts.yekan10.copyWith(color: textColor ?? AppColor.blueNormal)), + Text( + title, + style: AppFonts.yekan10Bold.copyWith(color: textColor ?? AppColor.blueNormal), + ), ], ), ); diff --git a/packages/chicken/lib/presentation/pages/poultry_science/inspection/view.dart b/packages/chicken/lib/presentation/pages/poultry_science/inspection/view.dart index d06ce6d..4ff0916 100644 --- a/packages/chicken/lib/presentation/pages/poultry_science/inspection/view.dart +++ b/packages/chicken/lib/presentation/pages/poultry_science/inspection/view.dart @@ -22,7 +22,7 @@ class InspectionPoultrySciencePage extends GetView controller.setSearchValue(data), - routesWidget: ObxValue((route) => buildPageRoute(route), controller.routesName), + routesWidget: ObxValue((route) => buildContainerPageRoute(route), controller.routesName), onBackPressed: () => Get.back(id: poultryFirstKey), widgets: [ segmentWidget(), @@ -110,7 +110,8 @@ class InspectionPoultrySciencePage extends GetView data.length) { - return GestureDetector( - onTap: () async { - await controller.pickImages(); - }, - child: Container( + ObxValue((data) { + return GridView.builder( + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 4, + mainAxisSpacing: 8, + crossAxisSpacing: 8, + childAspectRatio: 1, + ), + shrinkWrap: true, + itemCount: controller.pickedImages.length + 1, + itemBuilder: (context, index) { + if (index + 1 < 7&& index == data.length) { + return GestureDetector( + onTap: () async { + await controller.pickImages(); + }, + child: Container( + width: 80.h, + height: 80.h, + decoration: BoxDecoration( + color: AppColor.lightGreyNormal, + borderRadius: BorderRadius.circular(8.r), + ), + child: Center( + child: Icon( + Icons.add_a_photo, + color: AppColor.lightGreyDarker, + size: 32.h, + ), + ), + ), + ); + } else { + return Container( width: 80.h, height: 80.h, decoration: BoxDecoration( color: AppColor.lightGreyNormal, borderRadius: BorderRadius.circular(8.r), ), - child: Center( - child: Icon( - Icons.camera_alt, - color: AppColor.lightGreyDarker, - size: 32.h, - ), - ), - ), - ); - } else { - return Container( - width: 80.h, - height: 80.h, - decoration: BoxDecoration( - color: AppColor.lightGreyNormal, - borderRadius: BorderRadius.circular(8.r), - ), - child: Stack( - children: [ - Positioned.fill( - child: Image.file(File(data[index].path), fit: BoxFit.cover), - ), + child: Stack( + children: [ + Positioned.fill( + child: Image.file(File(data[index].path), fit: BoxFit.cover), + ), - Positioned( - top: 4, - left: 4, - child: GestureDetector( - onTap: () { - controller.removeImage(index); - }, - child: Container( - width: 24.w, - height: 24.h, - clipBehavior: Clip.antiAlias, - padding: EdgeInsets.all(4), - decoration: ShapeDecoration( - color: Colors.white.withValues(alpha: 0.80), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(4), + Positioned( + top: 4, + left: 4, + child: GestureDetector( + onTap: () { + controller.removeImage(index); + }, + child: Container( + width: 24.w, + height: 24.h, + clipBehavior: Clip.antiAlias, + padding: EdgeInsets.all(4), + decoration: ShapeDecoration( + color: Colors.white.withValues(alpha: 0.80), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(4), + ), ), - ), - child: Assets.vec.trashSvg.svg( - width: 8.w, - height: 8.h, - colorFilter: ColorFilter.mode( - AppColor.redNormal, - BlendMode.srcIn, + child: Assets.vec.trashSvg.svg( + width: 8.w, + height: 8.h, + colorFilter: ColorFilter.mode( + AppColor.redNormal, + BlendMode.srcIn, + ), ), ), ), ), - ), - ], - ), - ); - } - }, controller.pickedImages); - }, - ), + ], + ), + ); + } + }, ); - SizedBox(height: 20), + },controller.pickedImages), + + SizedBox(height: 35.h), + Text( + 'حداقل ۲ تصویر برای ثبت بازرسی لازم است', + style: AppFonts.yekan12.copyWith(color: AppColor.textColor), + ), + SizedBox(height: 8.h), Row( spacing: 16, mainAxisAlignment: MainAxisAlignment.center, @@ -292,10 +299,13 @@ class InspectionPoultrySciencePage extends GetView Container( - height: 100.h, - clipBehavior: Clip.hardEdge, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(8.r), - image: DecorationImage( - image: NetworkImage(item.image?[index] ?? ''), - fit: BoxFit.cover, + itemBuilder: (context, index) => + Container( + height: 100.h, + clipBehavior: Clip.hardEdge, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8.r), + image: DecorationImage( + image: NetworkImage(item.image?[index] ?? ''), + fit: BoxFit.cover, + ), + ), ), - ), - ), ), ), ], diff --git a/packages/chicken/lib/presentation/pages/poultry_science/poultry_action/view.dart b/packages/chicken/lib/presentation/pages/poultry_science/poultry_action/view.dart index 29df72c..cce40d2 100644 --- a/packages/chicken/lib/presentation/pages/poultry_science/poultry_action/view.dart +++ b/packages/chicken/lib/presentation/pages/poultry_science/poultry_action/view.dart @@ -26,11 +26,11 @@ class PoultryActionPage extends GetView { return ObxValue((data) { return GridView.builder( physics: BouncingScrollPhysics(), - padding: EdgeInsets.all(16), + padding: EdgeInsets.symmetric(vertical: 18.h, horizontal: 32.w), gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( crossAxisCount: 2, - mainAxisSpacing: 16.h, - crossAxisSpacing: 16.w, + mainAxisSpacing: 24.h, + crossAxisSpacing: 24.w, ), itemCount: data.length, hitTestBehavior: HitTestBehavior.opaque, diff --git a/packages/chicken/lib/presentation/widget/app_bar.dart b/packages/chicken/lib/presentation/widget/app_bar.dart index c7795ea..05a06fe 100644 --- a/packages/chicken/lib/presentation/widget/app_bar.dart +++ b/packages/chicken/lib/presentation/widget/app_bar.dart @@ -11,6 +11,7 @@ RAppBar chickenAppBar({ VoidCallback? onBackPressed, GestureTapCallback? onFilterTap, GestureTapCallback? onSearchTap, + List? additionalActions, }) { return RAppBar( hasBack: isBase == true ? false : hasBack, @@ -32,6 +33,7 @@ RAppBar chickenAppBar({ SizedBox(width: 8), if (!isBase && hasFilter) filterWidget(onFilterTap), SizedBox(width: 8), + if (additionalActions != null) ...additionalActions, ], ); } diff --git a/packages/chicken/lib/presentation/widget/page_route.dart b/packages/chicken/lib/presentation/widget/page_route.dart index 956d564..eeaaf25 100644 --- a/packages/chicken/lib/presentation/widget/page_route.dart +++ b/packages/chicken/lib/presentation/widget/page_route.dart @@ -10,3 +10,22 @@ Widget buildPageRoute(List route) { ), ); } + +Widget buildContainerPageRoute(List route) { + return Container( + height: 24.h, + margin: EdgeInsets.symmetric(horizontal: 8.w,vertical: 4.h), + decoration: BoxDecoration(color: Color(0xFFE3E3E3), borderRadius: BorderRadius.circular(2.r)), + padding: EdgeInsets.symmetric(horizontal: 6.w), + child: ListView.separated( + scrollDirection: Axis.horizontal, + physics: NeverScrollableScrollPhysics(), + shrinkWrap: true, + itemBuilder: (context, index) => Center( + child: Text(route[index], style: AppFonts.yekan14.copyWith(color: AppColor.labelTextColor)), + ), + separatorBuilder: (context, index) => Assets.vec.arrowLeftSvg.svg(height: 24.h,fit: BoxFit.fitHeight), + itemCount: route.length, + ), + ); +} diff --git a/packages/core/lib/presentation/common/app_color.dart b/packages/core/lib/presentation/common/app_color.dart index 65121cb..7a29a07 100644 --- a/packages/core/lib/presentation/common/app_color.dart +++ b/packages/core/lib/presentation/common/app_color.dart @@ -7,7 +7,8 @@ class AppColor { static const Color blueLight = Color(0xFFeaefff); // #eaefff rgb(234, 239, 255) static const Color blueLightHover = Color(0xFFe0e7ff); // #e0e7ff rgb(224, 231, 255) static const Color blueLightActive = Color(0xFFbecdff); // #becdff rgb(190, 205, 255) - static const Color blueNormal = Color(0xFF2d5fff); // #2d5fff rgb(45, 95, 255) + static const Color blueNormalOld = Color(0xFF2d5fff); // #2d5fff rgb(45, 95, 255) + static const Color blueNormal = blueDark; static const Color blueNormalHover = Color(0xFF2956e6); // #2956e6 rgb(41, 86, 230) static const Color blueNormalActive = Color(0xFF244ccc); // #244ccc rgb(36, 76, 204) static const Color blueDark = Color(0xFF2247bf); // #2247bf rgb(34, 71, 191) @@ -168,13 +169,13 @@ class AppColor { static const Color bgIcon = Color(0xFF797979); // #797979 static const Color bgDark = Color(0xFF979797); // #083940 rgb(8, 57, 64) static const Color textColor = Color(0xFF5B5B5B); // #083940 rgb(8, 57, 64) + static const Color labelTextColor = Color(0xFF808080); static const Color textColorLight = Color(0xFFB2B2B2); static const Color iconColor = Color(0xFF444444); // #444444 rgb(68, 68, 68) static const Color borderColor = Color(0xFFC7CFCD); // #C7CFCD rgb(199, 207, 205)` static const Color unselectTextColor = Color(0xFF888888); // static const Color accent1 = Color(0xffffe5ce); // - //endregion //region --- category Colors --- diff --git a/packages/core/lib/presentation/common/assets.gen.dart b/packages/core/lib/presentation/common/assets.gen.dart index 48f8537..dc116dc 100644 --- a/packages/core/lib/presentation/common/assets.gen.dart +++ b/packages/core/lib/presentation/common/assets.gen.dart @@ -83,6 +83,9 @@ class $AssetsIconsGen { /// File path: assets/icons/chicken.svg SvgGenImage get chicken => const SvgGenImage('assets/icons/chicken.svg'); + /// File path: assets/icons/chicken2.svg + SvgGenImage get chicken2 => const SvgGenImage('assets/icons/chicken2.svg'); + /// File path: assets/icons/chicken_house.svg SvgGenImage get chickenHouse => const SvgGenImage('assets/icons/chicken_house.svg'); @@ -351,6 +354,7 @@ class $AssetsIconsGen { check, checkSquare, chicken, + chicken2, chickenHouse, chickenMapMarker, chickenPattern, @@ -547,6 +551,9 @@ class $AssetsVecGen { /// File path: assets/vec/chicken.svg.vec SvgGenImage get chickenSvg => const SvgGenImage.vec('assets/vec/chicken.svg.vec'); + /// File path: assets/vec/chicken2.svg.vec + SvgGenImage get chicken2Svg => const SvgGenImage.vec('assets/vec/chicken2.svg.vec'); + /// File path: assets/vec/chicken_house.svg.vec SvgGenImage get chickenHouseSvg => const SvgGenImage.vec('assets/vec/chicken_house.svg.vec'); @@ -815,6 +822,7 @@ class $AssetsVecGen { checkSvg, checkSquareSvg, chickenSvg, + chicken2Svg, chickenHouseSvg, chickenMapMarkerSvg, chickenPatternSvg, diff --git a/packages/core/lib/presentation/widget/card/card_icon_widget.dart b/packages/core/lib/presentation/widget/card/card_icon_widget.dart index 378e212..ecacd38 100644 --- a/packages/core/lib/presentation/widget/card/card_icon_widget.dart +++ b/packages/core/lib/presentation/widget/card/card_icon_widget.dart @@ -106,9 +106,9 @@ class GlassMorphismCardIcon extends StatelessWidget { this.borderColor = AppColor.blueNormal, this.backgroundColor = Colors.white, this.borderRadius = 35, - this.width = 180, - this.labelHeight = 80, - this.height = 180, + this.width = 160, + this.labelHeight = 71, + this.height = 160, this.borderWidth = 1, this.iconWidth = 48, this.iconHeight = 48, @@ -173,7 +173,7 @@ class GlassMorphismCardIcon extends StatelessWidget { child: Column( crossAxisAlignment: CrossAxisAlignment.center, children: [ - SizedBox(height: labelHeight.h + 35.h), + SizedBox(height: labelHeight.h + 27.h), Padding( padding: EdgeInsets.symmetric(horizontal: 8.w), child: Text( @@ -181,7 +181,7 @@ class GlassMorphismCardIcon extends StatelessWidget { textAlign: TextAlign.center, style: titleStyle ?? - AppFonts.yekan20Bold.copyWith(color: titleColor, height: 1.20), + AppFonts.yekan18Bold.copyWith(color: titleColor, height: 1.20), ), ), ],