From d6f4ed433ba31cefd8ed19b1654ecd3ef6e5fa98 Mon Sep 17 00:00:00 2001 From: "mr.mojtaba" Date: Sun, 7 Sep 2025 20:24:14 +0330 Subject: [PATCH] feat : inspection --- assets/icons/box_remove.svg | 6 + assets/icons/box_tick.svg | 6 + assets/icons/close_square_filled.svg | 3 + assets/icons/hashtag.svg | 7 + assets/icons/home_hashtag.svg | 7 + assets/icons/home_trend_down.svg | 3 + assets/icons/home_trend_up.svg | 3 + assets/icons/note_remove.svg | 10 + assets/vec/bg_auth.svg.vec | Bin 2056 -> 2056 bytes assets/vec/box_remove.svg.vec | Bin 0 -> 1501 bytes assets/vec/box_tick.svg.vec | Bin 0 -> 1281 bytes assets/vec/close_square_filled.svg.vec | Bin 0 -> 524 bytes assets/vec/empty.svg.vec | Bin 12318 -> 12318 bytes assets/vec/hashtag.svg.vec | Bin 0 -> 700 bytes assets/vec/home_hashtag.svg.vec | Bin 0 -> 736 bytes assets/vec/home_trend_down.svg.vec | Bin 0 -> 660 bytes assets/vec/home_trend_up.svg.vec | Bin 0 -> 676 bytes assets/vec/note_remove.svg.vec | Bin 0 -> 1314 bytes .../pages/poultry_science/home/view.dart | 311 +++++++++++++++--- .../poultry_science/poultry_action/logic.dart | 15 +- .../poultry_science/poultry_action/view.dart | 52 ++- .../lib/presentation/common/assets.gen.dart | 64 ++++ 22 files changed, 440 insertions(+), 47 deletions(-) create mode 100644 assets/icons/box_remove.svg create mode 100644 assets/icons/box_tick.svg create mode 100644 assets/icons/close_square_filled.svg create mode 100644 assets/icons/hashtag.svg create mode 100644 assets/icons/home_hashtag.svg create mode 100644 assets/icons/home_trend_down.svg create mode 100644 assets/icons/home_trend_up.svg create mode 100644 assets/icons/note_remove.svg create mode 100644 assets/vec/box_remove.svg.vec create mode 100644 assets/vec/box_tick.svg.vec create mode 100644 assets/vec/close_square_filled.svg.vec create mode 100644 assets/vec/hashtag.svg.vec create mode 100644 assets/vec/home_hashtag.svg.vec create mode 100644 assets/vec/home_trend_down.svg.vec create mode 100644 assets/vec/home_trend_up.svg.vec create mode 100644 assets/vec/note_remove.svg.vec diff --git a/assets/icons/box_remove.svg b/assets/icons/box_remove.svg new file mode 100644 index 0000000..aa51b38 --- /dev/null +++ b/assets/icons/box_remove.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/icons/box_tick.svg b/assets/icons/box_tick.svg new file mode 100644 index 0000000..887a08d --- /dev/null +++ b/assets/icons/box_tick.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/icons/close_square_filled.svg b/assets/icons/close_square_filled.svg new file mode 100644 index 0000000..b4a4de1 --- /dev/null +++ b/assets/icons/close_square_filled.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/hashtag.svg b/assets/icons/hashtag.svg new file mode 100644 index 0000000..f39493a --- /dev/null +++ b/assets/icons/hashtag.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/icons/home_hashtag.svg b/assets/icons/home_hashtag.svg new file mode 100644 index 0000000..7d6fe0e --- /dev/null +++ b/assets/icons/home_hashtag.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/icons/home_trend_down.svg b/assets/icons/home_trend_down.svg new file mode 100644 index 0000000..c397903 --- /dev/null +++ b/assets/icons/home_trend_down.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/home_trend_up.svg b/assets/icons/home_trend_up.svg new file mode 100644 index 0000000..0c78276 --- /dev/null +++ b/assets/icons/home_trend_up.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/note_remove.svg b/assets/icons/note_remove.svg new file mode 100644 index 0000000..37e2ecc --- /dev/null +++ b/assets/icons/note_remove.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/assets/vec/bg_auth.svg.vec b/assets/vec/bg_auth.svg.vec index a5c1c29d9eedd57b44d2b6333ee26ac67d80f8ff..38b50f601c8d93eafde594edb4c34a493ad6f6b1 100644 GIT binary patch delta 23 fcmeAW=n&ZOl!>{+Zsp_`OioM<%QovU-(dj&Y%U1n delta 23 fcmeAW=n&ZOl!=*vVfo}2OioM=%Qx#V-(dj&Uj7H% diff --git a/assets/vec/box_remove.svg.vec b/assets/vec/box_remove.svg.vec new file mode 100644 index 0000000000000000000000000000000000000000..d70cda01d0a1bed891ec2b425e1a4666d116081e GIT binary patch literal 1501 zcmZXUdq|sS6vp2qgBHgE)-VQU(RR3LT8FfD18v&x0j+_uIy*YnrJbSnvf}Dxnpj zd*0`H-jJi&Zl%joY8w1DI~vc~J(WmX*S&cnTj+c0I>iQc@I zNkNX#zF-wz@MXyJ*=V}-hoc^i*FT;-qw&1QlNB1zXYzhb-v0+jlg4_upY{D1P8Yq^ zHY+Z-Jlb=?w^O+8BUPtc_exgDE`6?hHC?UMHk2o$eKDE5<)gu5LA)2}p2;BZuTeb% zZ++?zqNQK>bE*&3wk@RDkJU^wjKu-WMxVp?1wq_iF=5+W5Lb(mg$*X7(7up_uTKXl zgN^v`ivaO;ZTw~j4oq3JN5d|KrTOL|G0dvz1l zHEp`Xh>@xzR5xPXN2*S*jC_c4sBD)m!)~sqTs4f^?0sPJY$ngPW(B~r|FjH&XXmOx z@a*&heN;E%{iJi?jD9oimy8}PLNfZvmM0l8IU^=##N><~EZQWaQ>uW@J3#flblw4I zBX-GRG-)5c90+3Ts+}?#!YO6P#oxWcE&uci59YLEbJ{^PKUIm+toN|tufx>eh_a?) z(%XT8zl%t3pK#1HD70qzsn0I{*l(&bs0N-=gy$8=r}5J z+p*Dh6vvKqqORTv&y6mGVx`Ejo=0nm6LS~(h55Pxp|@v1`s$wcq9W`>@!0=)Eb7F! zx4mHI>jq_h;d~Hpue^(R^+nMUuZ|!VYo+}rNOunk=Wie!_M_$Q1a4&x)4B;9_l4o@ zxsJi;C^mg^4Tv9Ik;(V80JQg)LZU$A+y^r`?JsGG#}|7A)Q0Q`}W{}{&Ot+YfL08 Nx;5z6K>y)X{1=NJLa+b; literal 0 HcmV?d00001 diff --git a/assets/vec/box_tick.svg.vec b/assets/vec/box_tick.svg.vec new file mode 100644 index 0000000000000000000000000000000000000000..d79de28bb4a4a1eb81057241f8cb2b7783065207 GIT binary patch literal 1281 zcmXw(ZERCz6vv<2fpF*}i$tjBoSWV>{pFtLJm)$8 z|8v@1PajcQrBZG~sfUb*3-maZDil1LQuix*G>4=3an^D`so_^Y!3#}!=q_Mtt6G?(sxm7@Z6vteQGlrrgmYm<0ul|eJFYM6J$2D;b3bR zk(M^>IUf;rte+HS;(wyD=>YsE((wCQarWRGYHHrZ*10UL@1gv81ZH;%6W*=D%!Zec zteS^Xo3ODwON{C9Xc9hGrygD$r1u?qRd1iLuDM6JZeX9V_21WV!2OQi{Mb&I^~dzl z?OP~*QtusWq<9a-8&TBZ(H!alzC^iHmP?PbjwAHsP}dxyy*b#mbKu&3-vYR{+sweO zJp-;i^H1+6`eec>yk~o9dpSyZH`Py-~{l1@Y(!s&@s~ zwJ#|zB}{l{gnnO^@;Gkm^(d!W$@0Yv+Y@JT@Oc*Y@}g1=Q%jBH@*mNETN&l)INjkb zIM$w$`b@KaMBXa`gNVjr^xlW{tG>nMOJ}et_Y>vCaK8Go(6N^LkKxb@Gc;Q!%F_#y zS6X(5?)-bS?k|v@AJAXsFaonbqoLq5e6BvBSwD!4zb!NJPmDnGy6Bgi61vTKq0jXn zQlVu=@SMYlzv471$CntXkY?mh-DiwW+(UTfa)Zxl3c5(g0`*a9a34&&uTo>(^H<2n z6~teuKU;Ugdl#qMEt>sFbgsSytNR9~d;XzWAIIFW9L@NcFfeNgt?m(7cUf0OUqxU5 zPlj%izJBs$O4z&kcW``k!lLtsu(AaBx9yC#!JML|dqLERhzZkcuHQs{+8SB-TZ#>Vl_V32V zT0bRWcJc@Jw2AWBPlUdtx$5G6?$z08zbAFBl-es@jaN!i^i=cNtB^yPfzGpegvX5k z`Nil)CgU^dcJCeQLUq{6gg&dCT+8?Ft$d!OGB~_*>q<2XFI9u!Tzwei9a`SMjwJ}1 zT2IDX>KCI8&3A@ts_TPQ)oFiO{VZ%~{`qN1n2&NE`mn>szOt!d<0r+Y>e0uF=J41r jdSvNyE*P+=VK2_&?DY8#Fi`mPVen2cs9_xFkFKg;5i_s{ literal 0 HcmV?d00001 diff --git a/assets/vec/empty.svg.vec b/assets/vec/empty.svg.vec index b60778f125e37e85d38e9f7d1cfbc091db75eb5f..f6caea40c435c574a61d7365c39f6e365cae79e8 100644 GIT binary patch delta 140 zcmbQ2FfU=l0gif287Ajv_GV81zOXsJn(E*r|CGyF_>+gz&39bR4of_oCja1a&JFW$ z(iLKNj=pT~6k*8(^S&AYCxbEv delta 140 zcmbQ2FfU=l0gn2c@3@>DmUuYHKjm^3{^a5G?+csrtEmo7nlenz&+N^dRGsY~PS5O>odV8&auWWer6`Xgft%GCAjlnL6nTu{%d!ws)HR jgA2&_aDtgH%_zda#sCCNK)@^oVln*N!n)a>^S&AYM(;CX diff --git a/assets/vec/hashtag.svg.vec b/assets/vec/hashtag.svg.vec new file mode 100644 index 0000000000000000000000000000000000000000..72ac8d5ff5f5cec28c178d1a95dd9f0d1c6d1622 GIT binary patch literal 700 zcmZXSF-rqM5QS&&62vMN=}saXSfr3xTq8u-0Sh5NA-O`q!Y;NFI4lk%O)6V0Vk=2$ zr)XgjMT^6LopsU(HX+5iZ#Js|_gKDR=gr&O-8tMkCsif7XUz3xvzhxuc^)XD6*5Da z;rVL_=Of}<9Wq#ci}>q1`ept~d~p;qxbt2TLRbGNi5_)7VERT`ZcxW?O2f zwS=$gA%pW#w8Vz!rZr2{12d#3NHpZ@cB<3KfT01Q0ikL2po0c=L(#YzaM{ah z$avVj;EM^3TkAc<{PNu8&(n@@Id-{|-B5DXmcP(t+U7ECbD24ZZ#0?4bg|1h?YQ4D zXMwKE&eQD?P~l&%;O@~2xLe27S;X^J!j3n`p}YZl1aAbLtJ|)albSxPC=1WR^d=Sy Ff*(M{^mG6K literal 0 HcmV?d00001 diff --git a/assets/vec/home_hashtag.svg.vec b/assets/vec/home_hashtag.svg.vec new file mode 100644 index 0000000000000000000000000000000000000000..7d4a1818d28ef49aee5a0a11c12e4b4281956035 GIT binary patch literal 736 zcmZXSK}Z`x6ozMZ6HI~!p`eG=1fdf5AXMu?#3l1QRKcEeFoDu4SZJWN2!aO%Wr-vK zMG!O;B6{*r(w+;Y5(GiL7>YqekrsOB&5~2WbpDs!dT^KJn_>U=zc=&VtG-nsZ6Ur9 zzRpxC)i8x)-{ZmmWG}7riCmU6ygId|;nfL^Py|oZ01uym z^(es`L@p4zH^n|C;w)*3cJJ(lKEHlV;Vq>39Dl^k!ZeNN2Gp#xL%)VEloQ#fuUEH9 zh)?w8?h(1a%k)C$0e8ZAX3M)0+36BZHOk~f^30f9RoKru%S>&p3aOIrhEP5A9P{T& zyva%U_N&e1KPtWUUY!*#)agkpJ-r-OmHK0<)vptFdV(rrwZwgWNve))P^CV{bRt=r z|LE%cS^BV>VIJNkn2TNAtos}f>3Wg`7PoEY_)UZvbAPD0XWaxM4ulVQd*Bju$cH!( yKAN) zY4a%*V^&&iAA;x)rnAz84dYnVmxXZDIwTFijy<- z_#KF%%~y-U<0w`(JFxZIMTqyBbM)bm{|A3~g(H4EMp Gn*RY(VfkwS literal 0 HcmV?d00001 diff --git a/assets/vec/home_trend_up.svg.vec b/assets/vec/home_trend_up.svg.vec new file mode 100644 index 0000000000000000000000000000000000000000..d12e2cc63f2fc2541f92cc6e6782f3c63216b5a7 GIT binary patch literal 676 zcmXw%Ur1AN6vuzNE5gW!uoqcv2$^g-Yc^{valdcE{%AsEB|33f4(+Lgpa-qF-MNi9 z$_E3fU{WIxB9n+70xd-9MF=ApD=K9agc+1GMzGuY{Yoz9e(pW@dpX~8&hNZ6!E|QE zUO>cNzu&Lv8PhZaW9$G0(_b(_(&*G*~=qH4dojE;)ug)BQGSmlevY!9x zZpDHp>q;-}N4D_E^*XZ)M?N@t%a1|6oXQbx{8r=_e?MPx<+~~%sn$qV7m|`Ge;WPY z!~B9a16};BWR+QIJ3}cybR2N1tvDt{lQi$@$am9TNm8%vcHu^BPv<>0tDB8vqIPb^sdq(31W1RXd zN@gt^lD>g;K7S*IcGov9^uu>nc*?Iz<{pM*zGxeQm~UQfr8+gZzRw3ozlG|0$e$In zr@Tm-Y}ALBeA}sy7IdsNke@c3XmV4ZLGn9*H}9HB7nH1A?UC$Q>qPnICenA({|?F8 zU_JHGgNv7}QZFdxCKxbBBxhG5IQ!BH<+h5WjdeJ<8O3_nA=*cb>e;|EG4f@ne2jDr Wat}q@vH$yUNQ!wMHi}cFX@3F9vk1BX literal 0 HcmV?d00001 diff --git a/assets/vec/note_remove.svg.vec b/assets/vec/note_remove.svg.vec new file mode 100644 index 0000000000000000000000000000000000000000..aeeebd05d7ba762fcc09d3e8bf0adf32e6c70d22 GIT binary patch literal 1314 zcmX}se@IkW6bJD8-sC8eR9b;3k`sfIt&+m_W2n66_#;}@VAtB*rfplzDJ3a$vGR|y zno`Fc7g;QV1+m!OrXO4Ek4lK$R+ehqrINy+vfWCEijsl0LUOv_6Vn@p&pY>?d+vSr zU0!8wtFmS*)y(*3#LVSTDi%w(l*&}*vg~(1hq5ipe*c#n#};HL=TeJOdUAC0*`4BV z4Tr_*aF{mdbZeMUViElM*PY_&t%nJDUmgn+#zEA94SC%fj{cCNkq0pjq7Fn||V?qaH+k zv}3;Lp){F)#e*S@^(2S>)L0+HdeM&c>#_U#;kO5D>>z9(r0qU@mg-|nI#_G;uZ&Wwi#c`Lq|O9 zXxqp|bqjd)(F*=5TFxDh7IA#N>B?3vJV5;HLOhwnwBYu=dyu8BSLXA}pThcJ>>k1K zq8nm$I6_~{xNgpGgu=Em=Qct~CxYVR>8B`V+9?x9OdJ%$E2fKU`^GfdUzOj~y(Krq z&DOu-^KpHQ(yuXv)WQJ{&C=PtnMTl4V3aE72 za@mLYeuSKT0yrjf<)O*^E4h aaS(OTkGk>s=E?^z7Rxl>KJy98w1v0!Uh_Zz literal 0 HcmV?d00001 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 2d0d1b8..2882b3e 100644 --- a/packages/chicken/lib/presentation/pages/poultry_science/home/view.dart +++ b/packages/chicken/lib/presentation/pages/poultry_science/home/view.dart @@ -2,8 +2,8 @@ import 'package:flutter/cupertino.dart' hide LinearGradient; import 'package:flutter/material.dart'; import 'package:rasadyar_chicken/data/models/response/inventory/inventory_model.dart'; import 'package:rasadyar_chicken/data/models/response/kill_house_distribution_info/kill_house_distribution_info.dart'; +import 'package:rasadyar_chicken/presentation/routes/routes.dart'; import 'package:rasadyar_chicken/presentation/widget/app_bar.dart'; -import 'package:rasadyar_chicken/presentation/widget/steward/widely_used/view.dart'; import 'package:rasadyar_core/core.dart'; import 'logic.dart'; @@ -50,7 +50,9 @@ class PoultryScienceHomePage extends GetView { height: 40, decoration: ShapeDecoration( image: DecorationImage( - image: AssetImage(Assets.images.chicken.path), + image: AssetImage( + Assets.images.chicken.path, + ), fit: BoxFit.cover, ), shape: RoundedRectangleBorder( @@ -58,7 +60,9 @@ class PoultryScienceHomePage extends GetView { width: 0.25, color: const Color(0xFFB0B0B0), ), - borderRadius: BorderRadius.circular(4), + borderRadius: BorderRadius.circular( + 4, + ), ), ), ), @@ -73,7 +77,10 @@ class PoultryScienceHomePage extends GetView { AnimatedRotation( turns: 180, duration: Duration(milliseconds: 3000), - child: Icon(CupertinoIcons.chevron_up, size: 18), + child: Icon( + CupertinoIcons.chevron_up, + size: 18, + ), ), ], ), @@ -108,7 +115,9 @@ class PoultryScienceHomePage extends GetView { height: 40, decoration: ShapeDecoration( image: DecorationImage( - image: AssetImage(Assets.images.chicken.path), + image: AssetImage( + Assets.images.chicken.path, + ), fit: BoxFit.cover, ), shape: RoundedRectangleBorder( @@ -116,7 +125,9 @@ class PoultryScienceHomePage extends GetView { width: 0.25, color: const Color(0xFFB0B0B0), ), - borderRadius: BorderRadius.circular(4), + borderRadius: BorderRadius.circular( + 4, + ), ), ), ), @@ -141,7 +152,7 @@ class PoultryScienceHomePage extends GetView { ), ), -// WidelyUsedWidget(), + widelyWidget(), SizedBox(height: 20), ], ), @@ -160,16 +171,19 @@ class PoultryScienceHomePage extends GetView { _informationIconCard( title: 'کمترین سن جوجه ریزیط', isLoading: data.value == null, - description: data.value?.hatchingMinAge.separatedByComma ?? '0', - iconPath: Assets.vec.truckSvg.path, + + description: + '${data.value?.hatchingMinAge.separatedByComma} روز' ?? '0', + iconPath: Assets.vec.homeTrendUpSvg.path, iconColor: const Color.fromRGBO(85, 97, 93, 1), bgDescriptionColor: const Color(0xFFE6FAF5), bgLabelColor: const Color(0xFFB0EFDF), ), _informationIconCard( title: 'بیشترین سن جوجه ریزی', - description: data.value?.hatchingMaxAge?.separatedByComma ?? '0', - iconPath: Assets.vec.convertCubeSvg.path, + description: + '${data.value?.hatchingMaxAge.separatedByComma} روز' ?? '0', + iconPath: Assets.vec.homeTrendUpSvg.path, iconColor: const Color(0xFF6F6164), bgDescriptionColor: const Color(0xFFEDDCE0), bgLabelColor: const Color(0xFFE0BCC5), @@ -191,8 +205,10 @@ class PoultryScienceHomePage extends GetView { child: _informationLabelCard( title: 'تلفات', isLoading: data.value == null, - description: data.value?.hatchingLosses?.separatedByComma ?? '0', - iconPath: Assets.vec.a3dCubeSquareSvg.path, + unit: 'قطعه', + description: + data.value?.hatchingLosses?.separatedByComma ?? '0', + iconPath: Assets.vec.boxRemoveSvg.path, iconColor: const Color(0xFF6C5D60), bgDescriptionColor: const Color(0xFFEDDCE0), bgLabelColor: const Color(0xFFDDC0C7), @@ -201,9 +217,11 @@ class PoultryScienceHomePage extends GetView { Expanded( child: _informationLabelCard( title: 'حجم کشتار شده', + unit: 'قطعه', isLoading: data.value == null, - description: data.value?.hatchingKilledQuantity.separatedByComma ?? '0', - iconPath: Assets.vec.cubeSearchSvg.path, + description: + data.value?.hatchingKilledQuantity.separatedByComma ?? '0', + iconPath: Assets.vec.closeSquareFilledSvg.path, iconColor: Color(0xFF2D5FFF), bgLabelColor: const Color(0xFFAFCBFF), bgDescriptionColor: const Color(0xFFCEDFFF), @@ -227,8 +245,9 @@ class PoultryScienceHomePage extends GetView { title: 'حجم جوجه ریزی', isLoading: data.value == null, unit: 'قطعه', - description: data.value?.hatchingQuantity.separatedByComma ?? '0', - iconPath: Assets.vec.cubeSearchSvg.path, + description: + data.value?.hatchingQuantity.separatedByComma ?? '0', + iconPath: Assets.vec.hashtagSvg.path, iconColor: const Color(0xFF426060), bgDescriptionColor: const Color(0xFFC7DFE0), bgLabelColor: const Color(0xFFA5D1D2), @@ -239,8 +258,9 @@ class PoultryScienceHomePage extends GetView { title: 'مانده در سالن', unit: 'قطعه', isLoading: data.value == null, - description: data.value?.hatchingLeftOver.separatedByComma ?? '0', - iconPath: Assets.vec.cubeRotateSvg.path, + description: + data.value?.hatchingLeftOver.separatedByComma ?? '0', + iconPath: Assets.vec.homeHashtagSvg.path, iconColor: Color(0xFF5C4D64), bgLabelColor: Color(0xFFC8B8D1), bgDescriptionColor: Color(0xFFDAD4DD), @@ -262,7 +282,6 @@ class PoultryScienceHomePage extends GetView { child: ObxValue( (data) => _informationLabelCard( title: 'کل فارم ها', - titleColor: AppColor.blueNormal, isLoading: data.value == null, description: data.value?.farmCount?.separatedByComma ?? '0', iconPath: Assets.vec.cubeSearchSvg.path, @@ -281,15 +300,15 @@ class PoultryScienceHomePage extends GetView { Expanded( child: ObxValue((data) { return _informationLabelCard( - title: 'تعداد جوجه ریزی ها', + title: 'تعداد جوجه ریزی', isLoading: data.value == null, description: data.value?.hatchingCount.separatedByComma ?? '0', - iconPath: Assets.vec.cubeWattingSvg.path, + iconPath: Assets.vec.cubeCardSvg.path, bgDescriptionColor: Colors.white, gradient: LinearGradient( begin: Alignment.topCenter, end: Alignment.bottomCenter, - colors: [const Color(0xFFFFE7BB), Colors.white], + colors: [AppColor.greenLightHover, Colors.white], ), ); }, controller.homeInformation), @@ -304,7 +323,7 @@ class PoultryScienceHomePage extends GetView { required String description, required String iconPath, required Color bgDescriptionColor, - String unit = 'کیلوگرم', + String? unit, bool isLoading = false, Color? iconColor, Color? titleColor, @@ -343,7 +362,7 @@ class PoultryScienceHomePage extends GetView { Text( title, textAlign: TextAlign.right, - style: AppFonts.yekan14.copyWith( + style: AppFonts.yekan10.copyWith( color: titleColor ?? AppColor.mediumGreyDarkActive, ), ), @@ -370,12 +389,19 @@ class PoultryScienceHomePage extends GetView { Text( description, textAlign: TextAlign.right, - style: AppFonts.yekan16.copyWith(color: AppColor.mediumGreyDarkActive), + style: AppFonts.yekan12.copyWith( + color: AppColor.mediumGreyDarkActive, + ), ), - Text( - unit, - textAlign: TextAlign.center, - style: AppFonts.yekan12.copyWith(color: AppColor.mediumGreyDarkActive), + Visibility( + visible: unit != null, + child: Text( + unit ?? '', + textAlign: TextAlign.center, + style: AppFonts.yekan12.copyWith( + color: AppColor.mediumGreyDarkActive, + ), + ), ), ], ), @@ -397,7 +423,7 @@ class PoultryScienceHomePage extends GetView { required Color bgLabelColor, }) { return Container( - height: 80.h, + height: 100.h, width: 145.w, decoration: BoxDecoration(borderRadius: BorderRadius.circular(8)), clipBehavior: Clip.hardEdge, @@ -422,7 +448,9 @@ class PoultryScienceHomePage extends GetView { Text( title, textAlign: TextAlign.right, - style: AppFonts.yekan14.copyWith(color: AppColor.mediumGreyDarkActive), + style: AppFonts.yekan14.copyWith( + color: AppColor.mediumGreyDarkActive, + ), ), isLoading @@ -430,7 +458,9 @@ class PoultryScienceHomePage extends GetView { : Text( description, textAlign: TextAlign.right, - style: AppFonts.yekan16.copyWith(color: AppColor.mediumGreyDarkActive), + style: AppFonts.yekan16.copyWith( + color: AppColor.mediumGreyDarkActive, + ), ), Visibility( @@ -438,7 +468,9 @@ class PoultryScienceHomePage extends GetView { child: Text( unit ?? '', textAlign: TextAlign.center, - style: AppFonts.yekan12.copyWith(color: AppColor.mediumGreyDarkActive), + style: AppFonts.yekan12.copyWith( + color: AppColor.mediumGreyDarkActive, + ), ), ), ], @@ -499,8 +531,14 @@ class PoultryScienceHomePage extends GetView { 'کل ورودی به انبار (کیلوگرم)', model.totalFreeBarsCarcassesWeight.toString(), ), - buildRow('کل فروش (کیلوگرم)', model.realAllocatedWeight.toString()), - buildRow('مانده انبار (کیلوگرم)', model.totalRemainWeight.toString()), + buildRow( + 'کل فروش (کیلوگرم)', + model.realAllocatedWeight.toString(), + ), + buildRow( + 'مانده انبار (کیلوگرم)', + model.totalRemainWeight.toString(), + ), ], ), ), @@ -519,7 +557,9 @@ class PoultryScienceHomePage extends GetView { child: Text( title, textAlign: TextAlign.right, - style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover), + style: AppFonts.yekan14.copyWith( + color: AppColor.darkGreyDarkHover, + ), ), ), Flexible( @@ -527,7 +567,9 @@ class PoultryScienceHomePage extends GetView { child: Text( value, textAlign: TextAlign.center, - style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDarkHover), + style: AppFonts.yekan14.copyWith( + color: AppColor.darkGreyDarkHover, + ), ), ), ], @@ -553,7 +595,9 @@ class PoultryScienceHomePage extends GetView { Text( 'اطلاعات ارسالی', textAlign: TextAlign.right, - style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal), + style: AppFonts.yekan16Bold.copyWith( + color: AppColor.blueNormal, + ), ), const SizedBox(height: 12), buildRow( @@ -605,4 +649,193 @@ class PoultryScienceHomePage extends GetView { ), ); } + + Widget widelyWidget() { + return Column( + children: [ + Padding( + padding: EdgeInsetsGeometry.all(6), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'پر کاربرد ها', + textAlign: TextAlign.right, + style: AppFonts.yekan16, + ), + ], + ), + ), + + Padding( + padding: const EdgeInsets.symmetric(horizontal: 2.0, vertical: 2), + child: Wrap( + spacing: 15, + runSpacing: 8, + 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; + controller.rootLogic.currentPage.refresh(); + await Future.delayed(Duration(milliseconds: 100)); + Get.toNamed(ChickenRoutes.inspectionPoultryScience, id: 0); + }, + ), + + widelyUsed( + title: 'ثبت کشتار', + iconPath: Assets.vec.noteRemoveSvg.path, + + onTap: () async { + controller.rootLogic.currentPage.value = 0; + controller.rootLogic.currentPage.refresh(); + await Future.delayed(Duration(milliseconds: 100)); + //Get.toNamed(ChickenRoutes.inspectionPoultryScience, id: 0); + }, + isOnEdit: false, + ), + widelyUsed( + title: 'فارم ها', + iconPath: Assets.vec.a3dCubeSquareSvg.path, + isOnEdit: false, + onTap: () async { + controller.rootLogic.currentPage.value = 1; + controller.rootLogic.currentPage.refresh(); + await Future.delayed(Duration(milliseconds: 100)); + // Get.toNamed(ChickenRoutes.salesOutOfProvinceSteward, id: 1); + }, + ), + + widelyUsed( + title: 'جوجه ریزی فعال', + iconPath: Assets.vec.boxTickSvg.path, + isOnEdit: false, + onTap: () async { + controller.rootLogic.currentPage.value = 1; + controller.rootLogic.currentPage.refresh(); + await Future.delayed(Duration(milliseconds: 100)); + // Get.toNamed(ChickenRoutes.salesInProvinceSteward, id: 1); + }, + ), + ], + ), + ), + ], + ); + } + + Widget widelyUsed({ + required String title, + required String iconPath, + required VoidCallback onTap, + required bool isOnEdit, + Color? cardColor, + Color? labelColor, + Color? textColor, + }) { + return GestureDetector( + onTap: !isOnEdit ? onTap : null, + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.start, + spacing: 4, + children: [ + Stack( + clipBehavior: Clip.none, + children: [ + Container( + width: 48, + height: 48, + padding: EdgeInsets.all(4), + decoration: ShapeDecoration( + color: cardColor ?? Color(0xFFBECDFF), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + ), + child: Container( + width: 40, + height: 40, + decoration: ShapeDecoration( + color: labelColor ?? AppColor.blueNormal, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + ), + child: SvgGenImage.vec(iconPath).svg( + width: 24, + height: 24, + colorFilter: ColorFilter.mode( + Colors.white, + BlendMode.srcIn, + ), + fit: BoxFit.cover, + ), + ), + ), + Visibility( + visible: isOnEdit, + child: Container( + width: 48, + height: 48, + padding: EdgeInsets.all(4), + decoration: ShapeDecoration( + color: Colors.white60, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(8), + ), + ), + ), + ), + + Visibility( + visible: isOnEdit, + child: Positioned( + top: -15, + left: -12, + child: SizedBox( + width: 32.w, + height: 32.h, + child: GestureDetector( + onTap: () {}, + behavior: HitTestBehavior.translucent, + child: Center( + child: Container( + width: 16, + height: 16, + decoration: BoxDecoration( + shape: BoxShape.circle, + color: Colors.white, + ), + alignment: Alignment.center, + child: Icon( + CupertinoIcons.minus, + color: AppColor.error, + size: 15, + ), + ), + ), + ), + ), + ), + ), + ], + ), + Text( + title, + style: AppFonts.yekan10.copyWith( + color: textColor ?? AppColor.blueNormal, + ), + ), + ], + ), + ); + } } diff --git a/packages/chicken/lib/presentation/pages/poultry_science/poultry_action/logic.dart b/packages/chicken/lib/presentation/pages/poultry_science/poultry_action/logic.dart index c09d4f7..50c5bf1 100644 --- a/packages/chicken/lib/presentation/pages/poultry_science/poultry_action/logic.dart +++ b/packages/chicken/lib/presentation/pages/poultry_science/poultry_action/logic.dart @@ -4,15 +4,20 @@ import 'package:rasadyar_core/core.dart'; class PoultryActionItem { final String title; final String route; + final String icon; - PoultryActionItem({required this.title, required this.route}); + PoultryActionItem({required this.title, required this.route,required this.icon}); } class PoultryActionLogic extends GetxController { RxList items = [ - PoultryActionItem(title: "بازرسی", route: ChickenRoutes.inspectionPoultryScience), - PoultryActionItem(title: "ثبت کشتار", route: ChickenRoutes.killingRegistrationPoultryScience), - PoultryActionItem(title: "فارم ها", route: ChickenRoutes.farmPoultryScience), - PoultryActionItem(title: "جوجه ریزی فعال", route: ChickenRoutes.activeHatchingPoultryScience), + PoultryActionItem(title: "بازرسی", route: ChickenRoutes.inspectionPoultryScience,icon: Assets.vec.cubeSearchSvg.path), + PoultryActionItem(title: "ثبت کشتار", route: ChickenRoutes.killingRegistrationPoultryScience,icon: Assets.vec.noteRemoveSvg.path), + PoultryActionItem(title: "فارم ها", route: ChickenRoutes.farmPoultryScience,icon: Assets.vec.cubeBottomRotationSvg.path), + PoultryActionItem(title: "جوجه ریزی فعال", route: ChickenRoutes.activeHatchingPoultryScience,icon: Assets.vec.boxTickSvg.path), ].obs; + + + } + 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 1e284f7..88b9cbf 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 @@ -11,10 +11,19 @@ class PoultryActionPage extends GetView { @override Widget build(BuildContext context) { return Scaffold( - appBar: chickenAppBar(hasBack: false, hasFilter: false, hasSearch: false, isBase: false), + appBar: chickenAppBar( + hasBack: false, + hasFilter: false, + hasSearch: false, + isBase: false, + ), body: Column( children: [ - Assets.images.poultryAction.image(height: 212.h, width: Get.width.w, fit: BoxFit.cover), + Assets.images.poultryAction.image( + height: 212.h, + width: Get.width.w, + fit: BoxFit.cover, + ), ObxValue((data) { return Expanded( child: GridView.builder( @@ -28,8 +37,9 @@ class PoultryActionPage extends GetView { hitTestBehavior: HitTestBehavior.opaque, itemBuilder: (BuildContext context, int index) { var item = data[index]; - return roleCard( + return roleCardWithIcon( title: item.title, + icon: item.icon, onTap: () async { Get.toNamed(item.route, id: 0); }, @@ -43,3 +53,39 @@ class PoultryActionPage extends GetView { ); } } + +Widget roleCardWithIcon({ + required String title, + required String icon, + Function()? onTap, + int? width, + int? height, +}) { + return Container( + width: width?.w ?? 128.w, + height: height?.h ?? 48.h, + margin: EdgeInsets.all(8.w), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8.r), + border: Border.all(color: AppColor.blueNormal, width: 1.w), + ), + child: InkWell( + onTap: onTap, + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + spacing: 8, + children: [ + SvgGenImage.vec(icon).svg(width: 46.w, height: 46.h,colorFilter: ColorFilter.mode( + AppColor.blueNormal, + BlendMode.srcIn + )), + + Text( + title, + style: AppFonts.yekan12Bold.copyWith(color: AppColor.blueNormal), + ), + ], + ), + ), + ); +} diff --git a/packages/core/lib/presentation/common/assets.gen.dart b/packages/core/lib/presentation/common/assets.gen.dart index de55139..f160cf9 100644 --- a/packages/core/lib/presentation/common/assets.gen.dart +++ b/packages/core/lib/presentation/common/assets.gen.dart @@ -53,6 +53,12 @@ class $AssetsIconsGen { /// File path: assets/icons/bg_header_user_profile.svg SvgGenImage get bgHeaderUserProfile => const SvgGenImage('assets/icons/bg_header_user_profile.svg'); + /// File path: assets/icons/box_remove.svg + SvgGenImage get boxRemove => const SvgGenImage('assets/icons/box_remove.svg'); + + /// File path: assets/icons/box_tick.svg + SvgGenImage get boxTick => const SvgGenImage('assets/icons/box_tick.svg'); + /// File path: assets/icons/buy.svg SvgGenImage get buy => const SvgGenImage('assets/icons/buy.svg'); @@ -95,6 +101,9 @@ class $AssetsIconsGen { /// File path: assets/icons/close_square.svg SvgGenImage get closeSquare => const SvgGenImage('assets/icons/close_square.svg'); + /// File path: assets/icons/close_square_filled.svg + SvgGenImage get closeSquareFilled => const SvgGenImage('assets/icons/close_square_filled.svg'); + /// File path: assets/icons/convert_cube.svg SvgGenImage get convertCube => const SvgGenImage('assets/icons/convert_cube.svg'); @@ -149,9 +158,21 @@ class $AssetsIconsGen { /// File path: assets/icons/gps.svg SvgGenImage get gps => const SvgGenImage('assets/icons/gps.svg'); + /// File path: assets/icons/hashtag.svg + SvgGenImage get hashtag => const SvgGenImage('assets/icons/hashtag.svg'); + /// File path: assets/icons/home.svg SvgGenImage get home => const SvgGenImage('assets/icons/home.svg'); + /// File path: assets/icons/home_hashtag.svg + SvgGenImage get homeHashtag => const SvgGenImage('assets/icons/home_hashtag.svg'); + + /// File path: assets/icons/home_trend_down.svg + SvgGenImage get homeTrendDown => const SvgGenImage('assets/icons/home_trend_down.svg'); + + /// File path: assets/icons/home_trend_up.svg + SvgGenImage get homeTrendUp => const SvgGenImage('assets/icons/home_trend_up.svg'); + /// File path: assets/icons/hot_chicken.svg SvgGenImage get hotChicken => const SvgGenImage('assets/icons/hot_chicken.svg'); @@ -185,6 +206,9 @@ class $AssetsIconsGen { /// File path: assets/icons/message_add.svg SvgGenImage get messageAdd => const SvgGenImage('assets/icons/message_add.svg'); + /// File path: assets/icons/note_remove.svg + SvgGenImage get noteRemove => const SvgGenImage('assets/icons/note_remove.svg'); + /// File path: assets/icons/outside.svg SvgGenImage get outside => const SvgGenImage('assets/icons/outside.svg'); @@ -305,6 +329,8 @@ class $AssetsIconsGen { arrowRight, bgAuth, bgHeaderUserProfile, + boxRemove, + boxTick, buy, calendar, calendarSearch, @@ -319,6 +345,7 @@ class $AssetsIconsGen { clock, closeCircle, closeSquare, + closeSquareFilled, convertCube, cow, cube, @@ -337,7 +364,11 @@ class $AssetsIconsGen { filter, filterOutline, gps, + hashtag, home, + homeHashtag, + homeTrendDown, + homeTrendUp, hotChicken, information, inside, @@ -349,6 +380,7 @@ class $AssetsIconsGen { map, mapMarker, messageAdd, + noteRemove, outside, pdfDownload, people, @@ -458,6 +490,12 @@ class $AssetsVecGen { /// File path: assets/vec/bg_header_user_profile.svg.vec SvgGenImage get bgHeaderUserProfileSvg => const SvgGenImage.vec('assets/vec/bg_header_user_profile.svg.vec'); + /// File path: assets/vec/box_remove.svg.vec + SvgGenImage get boxRemoveSvg => const SvgGenImage.vec('assets/vec/box_remove.svg.vec'); + + /// File path: assets/vec/box_tick.svg.vec + SvgGenImage get boxTickSvg => const SvgGenImage.vec('assets/vec/box_tick.svg.vec'); + /// File path: assets/vec/buy.svg.vec SvgGenImage get buySvg => const SvgGenImage.vec('assets/vec/buy.svg.vec'); @@ -500,6 +538,9 @@ class $AssetsVecGen { /// File path: assets/vec/close_square.svg.vec SvgGenImage get closeSquareSvg => const SvgGenImage.vec('assets/vec/close_square.svg.vec'); + /// File path: assets/vec/close_square_filled.svg.vec + SvgGenImage get closeSquareFilledSvg => const SvgGenImage.vec('assets/vec/close_square_filled.svg.vec'); + /// File path: assets/vec/convert_cube.svg.vec SvgGenImage get convertCubeSvg => const SvgGenImage.vec('assets/vec/convert_cube.svg.vec'); @@ -554,9 +595,21 @@ class $AssetsVecGen { /// File path: assets/vec/gps.svg.vec SvgGenImage get gpsSvg => const SvgGenImage.vec('assets/vec/gps.svg.vec'); + /// File path: assets/vec/hashtag.svg.vec + SvgGenImage get hashtagSvg => const SvgGenImage.vec('assets/vec/hashtag.svg.vec'); + /// File path: assets/vec/home.svg.vec SvgGenImage get homeSvg => const SvgGenImage.vec('assets/vec/home.svg.vec'); + /// File path: assets/vec/home_hashtag.svg.vec + SvgGenImage get homeHashtagSvg => const SvgGenImage.vec('assets/vec/home_hashtag.svg.vec'); + + /// File path: assets/vec/home_trend_down.svg.vec + SvgGenImage get homeTrendDownSvg => const SvgGenImage.vec('assets/vec/home_trend_down.svg.vec'); + + /// File path: assets/vec/home_trend_up.svg.vec + SvgGenImage get homeTrendUpSvg => const SvgGenImage.vec('assets/vec/home_trend_up.svg.vec'); + /// File path: assets/vec/hot_chicken.svg.vec SvgGenImage get hotChickenSvg => const SvgGenImage.vec('assets/vec/hot_chicken.svg.vec'); @@ -590,6 +643,9 @@ class $AssetsVecGen { /// File path: assets/vec/message_add.svg.vec SvgGenImage get messageAddSvg => const SvgGenImage.vec('assets/vec/message_add.svg.vec'); + /// File path: assets/vec/note_remove.svg.vec + SvgGenImage get noteRemoveSvg => const SvgGenImage.vec('assets/vec/note_remove.svg.vec'); + /// File path: assets/vec/outside.svg.vec SvgGenImage get outsideSvg => const SvgGenImage.vec('assets/vec/outside.svg.vec'); @@ -710,6 +766,8 @@ class $AssetsVecGen { arrowRightSvg, bgAuthSvg, bgHeaderUserProfileSvg, + boxRemoveSvg, + boxTickSvg, buySvg, calendarSvg, calendarSearchSvg, @@ -724,6 +782,7 @@ class $AssetsVecGen { clockSvg, closeCircleSvg, closeSquareSvg, + closeSquareFilledSvg, convertCubeSvg, cowSvg, cubeSvg, @@ -742,7 +801,11 @@ class $AssetsVecGen { filterSvg, filterOutlineSvg, gpsSvg, + hashtagSvg, homeSvg, + homeHashtagSvg, + homeTrendDownSvg, + homeTrendUpSvg, hotChickenSvg, informationSvg, insideSvg, @@ -754,6 +817,7 @@ class $AssetsVecGen { mapSvg, mapMarkerSvg, messageAddSvg, + noteRemoveSvg, outsideSvg, pdfDownloadSvg, peopleSvg,