From b86a2d986ebfe334b0fa6f81aedaed457570295f Mon Sep 17 00:00:00 2001 From: "mr.mojtaba" Date: Wed, 28 May 2025 14:15:19 +0330 Subject: [PATCH] feat : new tagging page --- assets/icons/tag_label.svg | 4 + assets/icons/virtual.svg | 24 + assets/icons/virtual_tag.svg | 1 - assets/vec/tag_label.svg.vec | Bin 0 -> 487 bytes assets/vec/virtual.svg.vec | Bin 0 -> 11224 bytes assets/vec/virtual_tag.svg.vec | Bin 1725 -> 0 bytes lib/presentation/common/assets.dart | 46 -- .../lib/presentation/common/assets.gen.dart | 20 +- .../bottom_sheet/base_bottom_sheet.dart | 5 +- .../lib/presentation/page/tagging/logic.dart | 3 + .../lib/presentation/page/tagging/view.dart | 635 +++++++++++++----- tools/runner.sh | 5 +- 12 files changed, 509 insertions(+), 234 deletions(-) create mode 100644 assets/icons/tag_label.svg create mode 100644 assets/icons/virtual.svg delete mode 100644 assets/icons/virtual_tag.svg create mode 100644 assets/vec/tag_label.svg.vec create mode 100644 assets/vec/virtual.svg.vec delete mode 100644 assets/vec/virtual_tag.svg.vec delete mode 100644 lib/presentation/common/assets.dart diff --git a/assets/icons/tag_label.svg b/assets/icons/tag_label.svg new file mode 100644 index 0000000..7db9b38 --- /dev/null +++ b/assets/icons/tag_label.svg @@ -0,0 +1,4 @@ + + + diff --git a/assets/icons/virtual.svg b/assets/icons/virtual.svg new file mode 100644 index 0000000..b3563c1 --- /dev/null +++ b/assets/icons/virtual.svg @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/icons/virtual_tag.svg b/assets/icons/virtual_tag.svg deleted file mode 100644 index 1f8b8aa..0000000 --- a/assets/icons/virtual_tag.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/assets/vec/tag_label.svg.vec b/assets/vec/tag_label.svg.vec new file mode 100644 index 0000000000000000000000000000000000000000..7afb4cd8e5999ee56f01bc2e1cc232da9f6e1b5a GIT binary patch literal 487 zcmYe&?O&Hu~{4FCVjy2dd4XJ7!b6@W4g_KZL=X$A%caUf=3 zWC8<5CJ1C^0CAaxSdh0v>*_B+m+nd!Lpa_Z_||b35KT`O2ZqlgH7H^_#=dem2M4=SGe)s%IUvtP&lg+zlPPem6N<2q=N+ zyN);PL41(k?iF@`X+`;dF#YxRZ!o>hh0zJ5j)8&238W81^XJ~UWVBzxRZ@S|=6)wjm_d~&SsDZm9pV4;*5DoGVh+dhs x-T@?E6+FoSq#i^&%T$5slc_CWc@Pa!528W(LGmDTVdfjifnwwTe;@^lIsjfytH1yN literal 0 HcmV?d00001 diff --git a/assets/vec/virtual.svg.vec b/assets/vec/virtual.svg.vec new file mode 100644 index 0000000000000000000000000000000000000000..13b9ec3a2de7d3874214a0df0bbfc7d6bf510ac1 GIT binary patch literal 11224 zcma)icU%_BvMoUcL;*n*Bu7CqD4B0+Nk&u*C@KmV0ryrEML|$<&Il+55D_yX62zQy z4%-Ok>^A54>ci*xopblS?>_!neA7MMGd0~+t5)?yi%bbgQwfPBkdR1(rvHqbpVAT% zKYwaSN=O(>@SoIw`ID6XZ!R4Z_mt>C)~byU7nO-#lsea8Hbh@T00e9{6jO|2^7!Hly<-b#*BpP? zKTV>0M~6Y8D4S$LM&aSf#q@{VSlo4~B9*YQpuww1!D1Xt`c~7bzs4bG-6}fgF%i~R zm(zyO2+SC^oC3bh#4EchT3<5@xfZKvqbM4SBCC16IXLxVHP!Z>3stuonlNoHMwQjj z=a#uBdsRbg+GCLBTuV+p=Hpn=TG|{D3l+t+^yjEJeA!k@pA{EiL&X}ZJiP!yQ4QT& z6Az8atI1?x0=_y|Q*6*eTh>@yn@4a}v7AR8WvfGSp8jp(cl9 zNS`eunOjMaGApIu-yw2WJbpGTBjfuEpnrQg-H~5_fpROU&?XL3>?^6JR~%G>E9v-` zSVU!3l4^S_^qVV5CMFiA$5qjNsaR;LtRjc3`3P*UqJtObLAIcZF3ZisKv5+PnHYmR z7^*_Gp-%;720kbs6-Wt!4}P?aq)j;iFv}Q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K^P zI&<>*JiwpWx;Kw=uNmmyBad~?nRw!m%UW6#c2CM-eK-n8&f@(sn>FGL?5Ug$owPKz z&uoq@NzBipS(l7u-VqJ=%~7yf8jbB+rm^j!QPwa4pAJOx_X_0aibkCMF#hJzybk=~ zyCNDd9euDkBN`XOz40g|8gI(Ia5gC#YmRuLWl=N+lnq2Sk2@+vfd5SK{jOZ+i)P)z z5w*)^v(7ev`PVGm_-xzp+deu@emt(ZnPc12Ag+y?@$-yC?-n!Oe*s+cVGgp{o4Jq~Yk&fOJ2QAh*mLYL$5B&T zIAob)(hG}@@v0k5c|HrSm-glQv<0t8BbX>!vb_zN<6E-Usn0yo3Q=ctc`O?grs#BN zx9zVr`B`|(rar7uIzjG7Z&WOG!D@e1_OTqxCMh#A_Z+RrvEK(9^`v+``16^i2ej;= z7>`hs>R_yt*~9tKV0cS6cU*6ms-rsZAw1p|K6^Bj>#JMorq?j2I&b5cI1-=onklI? z24#nm#4V<^~87sL4KI=9akt$m$V&+s_i?8Q=Gn~)9 z)$>`iKVb4^3u(qj;n1^sj;V97Gi)2RHN|1tvKFqbCc^Dra$2!+fm`f@xdWFKY9x_u%3m~Y0M zsE~b(71w2okbA=pZ>+`f!Vy#F6>;5)Fkog8uMwYr?MDqsIf*X6P7{%j>+kcO*A=yo$+rMnyQQ?v9&%ZU}1F^vO39nT? zAK3bhK39!LvS%00-==k-f9XtaAOHXW literal 0 HcmV?d00001 diff --git a/assets/vec/virtual_tag.svg.vec b/assets/vec/virtual_tag.svg.vec deleted file mode 100644 index 3d6d199286f982295e9d2982b8ee96f77fe7fc5e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1725 zcmZuydr(wW96tA6Koka%M*+Jm4v$d`2{HpqLhh%ypo2)_Ac!`gf;A{Gm5ov=C|WZO zWQYPQAgnBcYapOF7Q2*2H5y^WqflOEqoQGplv3Qzy}Q@?qjTrX_dCDyxWDiFokz;T z!-VlCge(`UQW!WXaD)hg(mQImz%il~P(LPctZ41+Y!Nt4wA@3I1kOsdhJLv%aMsjP zFod|!MF`6>EW^-h`B;{V5&g7GfRKH(PT;jW0$*=!q_#1_>@!B($PM(*-3wCr6S6)(fJM$fVpeYf)@|s* zVDvGhUHS$b(I9PGJ6%_U);5iVC6@}#ZTjEg&rX^DZ)}t>>{}Cp_8f$M*o2-(dB}cf zLhX)R6g)PeD<&7APfYkDFc;kvJ!a=3b;<Q`fAw>hV`0q>40lj>k*LUj?_7gC~leu zwRJNF3tplenz8aU;3_mBFd-JsO^ujLPlSE09%U69k$L){vafjz!8_}TYabR5^>j)xPjmujJ#c7TI_4YrQhA^L(2x|?>u(mKfTD;O&>Q)DF5 z3y|oMnP+SX?bPV{#DLeIc%rbP zjruug-fBc)K0)EFPho#=l0QT-xPF{JME&dEyvyfXHQ_u(yN_BR$EhIJ|I5Ri4=wft z2Z3j`uyb7ibz2oyAM-;YhRw>-L4BW2**7^sk`7sSHY|aOBjMV29^&+!!grqlb}jJz9pGuc8pM z@&xXzjl$!r75Mo63akz}3FQfT#<*%EEnJHCglY^)`$kLe0UPsP74yM)NXbwL;$0Vt zjO{uJ6+#`7o(qSF;&~JCRClbUKY_Nz@d^04s9ZvYP%8C{XdYiG%{TXlTE const SvgGenImage('assets/icons/setting.svg'); + /// File path: assets/icons/tag_label.svg + SvgGenImage get tagLabel => const SvgGenImage('assets/icons/tag_label.svg'); + /// File path: assets/icons/tag_user.svg SvgGenImage get tagUser => const SvgGenImage('assets/icons/tag_user.svg'); @@ -123,8 +126,8 @@ class $AssetsIconsGen { /// File path: assets/icons/user_square.svg SvgGenImage get userSquare => const SvgGenImage('assets/icons/user_square.svg'); - /// File path: assets/icons/virtual_tag.svg - SvgGenImage get virtualTag => const SvgGenImage('assets/icons/virtual_tag.svg'); + /// File path: assets/icons/virtual.svg + SvgGenImage get virtual => const SvgGenImage('assets/icons/virtual.svg'); /// List of all assets List get values => [ @@ -160,11 +163,12 @@ class $AssetsIconsGen { search, securityTime, setting, + tagLabel, tagUser, trash, user, userSquare, - virtualTag, + virtual, ]; } @@ -283,6 +287,9 @@ class $AssetsVecGen { /// File path: assets/vec/setting.svg.vec SvgGenImage get settingSvg => const SvgGenImage.vec('assets/vec/setting.svg.vec'); + /// File path: assets/vec/tag_label.svg.vec + SvgGenImage get tagLabelSvg => const SvgGenImage.vec('assets/vec/tag_label.svg.vec'); + /// File path: assets/vec/tag_user.svg.vec SvgGenImage get tagUserSvg => const SvgGenImage.vec('assets/vec/tag_user.svg.vec'); @@ -295,8 +302,8 @@ class $AssetsVecGen { /// File path: assets/vec/user_square.svg.vec SvgGenImage get userSquareSvg => const SvgGenImage.vec('assets/vec/user_square.svg.vec'); - /// File path: assets/vec/virtual_tag.svg.vec - SvgGenImage get virtualTagSvg => const SvgGenImage.vec('assets/vec/virtual_tag.svg.vec'); + /// File path: assets/vec/virtual.svg.vec + SvgGenImage get virtualSvg => const SvgGenImage.vec('assets/vec/virtual.svg.vec'); /// List of all assets List get values => [ @@ -332,11 +339,12 @@ class $AssetsVecGen { searchSvg, securityTimeSvg, settingSvg, + tagLabelSvg, tagUserSvg, trashSvg, userSvg, userSquareSvg, - virtualTagSvg, + virtualSvg, ]; } diff --git a/packages/core/lib/presentation/widget/bottom_sheet/base_bottom_sheet.dart b/packages/core/lib/presentation/widget/bottom_sheet/base_bottom_sheet.dart index c685305..cb646f0 100644 --- a/packages/core/lib/presentation/widget/bottom_sheet/base_bottom_sheet.dart +++ b/packages/core/lib/presentation/widget/bottom_sheet/base_bottom_sheet.dart @@ -3,10 +3,11 @@ import 'package:flutter/material.dart'; import 'package:rasadyar_core/presentation/common/app_color.dart'; class BaseBottomSheet extends StatelessWidget { - const BaseBottomSheet({super.key, required this.child, this.height}); + const BaseBottomSheet({super.key, required this.child, this.height, this.bgColor}); final Widget child; final double? height; + final Color? bgColor; @override Widget build(BuildContext context) { @@ -14,7 +15,7 @@ class BaseBottomSheet extends StatelessWidget { height: height ?? MediaQuery.of(context).size.height * 0.85, padding: EdgeInsets.symmetric(vertical: 15, horizontal: 20), decoration: BoxDecoration( - color: Colors.white, + color:bgColor?? Colors.white, borderRadius: BorderRadius.only(topLeft: Radius.circular(25), topRight: Radius.circular(25)), ), child: SingleChildScrollView( diff --git a/packages/livestock/lib/presentation/page/tagging/logic.dart b/packages/livestock/lib/presentation/page/tagging/logic.dart index c60d7ff..30e8316 100644 --- a/packages/livestock/lib/presentation/page/tagging/logic.dart +++ b/packages/livestock/lib/presentation/page/tagging/logic.dart @@ -2,6 +2,9 @@ import 'package:rasadyar_core/core.dart'; class TaggingLogic extends GetxController { RxInt selectedSegment = 0.obs; + RxBool searchIsSelected = false.obs; + RxBool filterIsSelected = false.obs; + RxList filterSelected = [].obs; @override void onReady() { diff --git a/packages/livestock/lib/presentation/page/tagging/view.dart b/packages/livestock/lib/presentation/page/tagging/view.dart index 8623a91..6e21741 100644 --- a/packages/livestock/lib/presentation/page/tagging/view.dart +++ b/packages/livestock/lib/presentation/page/tagging/view.dart @@ -1,6 +1,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:rasadyar_core/core.dart'; +import 'package:rasadyar_core/presentation/widget/buttons/fab.dart'; import 'logic.dart'; @@ -15,190 +16,194 @@ class TaggingPage extends GetView { title: 'پلاک کوبی', leadingWidth: 40, leading: Assets.vec.messageAddSvg.svg(width: 12, height: 12), + additionalActions: [ + GestureDetector( + onTap: () { + if (controller.searchIsSelected.value) { + controller.searchIsSelected.value = !controller.searchIsSelected.value; + } + controller.filterIsSelected.value = !controller.filterIsSelected.value; + }, + child: Assets.icons.filter.svg(width: 20, height: 20), + ), + SizedBox(width: 16), + GestureDetector( + onTap: () { + if (controller.filterIsSelected.value) { + controller.filterIsSelected.value = !controller.filterIsSelected.value; + } + controller.searchIsSelected.value = !controller.searchIsSelected.value; + }, + child: Assets.icons.search.svg(width: 20, height: 20), + ), + ], ), - body: Padding( - padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 15), - child: Column( - children: [ - Row( - children: [ - Expanded( - child: Container( - height: 40, - decoration: BoxDecoration( - color: AppColor.greenLightHover, - borderRadius: BorderRadius.circular(8), - border: Border.all(color: AppColor.darkGreyLight), - ), - alignment: Alignment.center, - child: Text('آمار ثبت شده : سبک 5 و سنگین 8 راس'), - ), + body: Stack( + children: [ + Column( + children: [ + _buildFilterWidget(), + _buildSearchWidget(), + _buildInfoDetails(), + _buildListContent(), + SizedBox(height: 10), + + Padding( + padding: const EdgeInsets.fromLTRB(35, 0, 35, 20), + child: RElevated( + text: 'ثبت نهایی و ارسال به اتحادیه', + textStyle: AppFonts.yekan18, + height: 40, + backgroundColor: AppColor.greenNormal, + onPressed: () {}, + isFullWidth: true, ), - SizedBox(width: 4), - IconButton( - onPressed: () { - Get.bottomSheet(_buildBottomSheet(), isScrollControlled: true); - }, - style: IconButton.styleFrom( - backgroundColor: AppColor.blueNormal, - fixedSize: Size(40, 40), - shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)), + ), + ], + ), + Positioned( + right: 10, + bottom: 75, + child: RFab.add( + onPressed: () { + Get.bottomSheet(_buildBottomSheet(), isScrollControlled: true); + }, + ), + ), + ], + ), + ); + } + + Container _buildInfoDetails() { + return Container( + height: 40, + margin: EdgeInsets.fromLTRB(15, 10, 15, 2), + decoration: BoxDecoration( + color: AppColor.greenLightHover, + borderRadius: BorderRadius.circular(8), + border: Border.all(color: AppColor.darkGreyLight), + ), + alignment: Alignment.center, + child: Text('پلاک شده : سبک 5 و سنگین 8 راس'), + ); + } + + Expanded _buildListContent() { + return Expanded( + child: ListView.separated( + padding: EdgeInsets.symmetric(horizontal: 15, vertical: 10), + itemCount: 20, + physics: BouncingScrollPhysics(), + cacheExtent: 280, + addRepaintBoundaries: true, + itemBuilder: (context, index) { + return _buildItemList(index); + }, + separatorBuilder: (BuildContext context, int index) => SizedBox(height: 6), + ), + ); + } + + Stack _buildItemList(int index) { + return Stack( + clipBehavior: Clip.none, + children: [ + Container( + width: Get.width, + height: 75, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8), + border: Border.all( + width: 2, + color: + index < 5 + ? AppColor.yellowNormal + : index < 12 + ? AppColor.greenLightActive + : AppColor.blueLight, + ), + ), + child: Row( + children: [ + SizedBox(width: 30), + GestureDetector( + behavior: HitTestBehavior.opaque, + onTap: () { + Get.bottomSheet(_buildInfoBottomSheet(), isScrollControlled: true); + }, + child: Stack( + clipBehavior: Clip.none, + children: [ + Text('123456789012346', style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal)), + Positioned(top: -20, right: -10, child: Assets.icons.virtual.svg(width: 20, height: 20)), + ], + ), + ), + Spacer(), + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text('گوسفند ماده', style: AppFonts.yekan14.copyWith(color: AppColor.blueNormal)), + SizedBox(height: 4), + Text('نوع نژاد', style: AppFonts.yekan14.copyWith(color: AppColor.bgDark)), + ], + ), + Spacer(), + Text('18 ماه', style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark)), + Spacer(), + Padding( + padding: const EdgeInsets.symmetric(vertical: 6), + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Assets.vec.editSvg.svg( + width: 20, + height: 20, + colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn), + ), + Assets.vec.trashSvg.svg( + width: 20, + height: 20, + colorFilter: ColorFilter.mode(AppColor.error, BlendMode.srcIn), + ), + ], + ), + ), + SizedBox(width: 8), + ], + ), + ), + Positioned( + right: -12, + top: 0, + bottom: 0, + child: Container( + width: 30, + height: 30, + child: Stack( + alignment: Alignment.center, + children: [ + Assets.vec.tagLabelSvg.svg(width: 30, height: 30), + Positioned( + bottom: 25, + right: 2, + left: 2, + child: Text( + (index > 10 ? index * 1000 : index + 1).toString(), + textAlign: TextAlign.center, + style: AppFonts.yekan10.copyWith( + fontSize: ((index > 10 ? index * 1000 : index + 1).toString()).length > 3 ? 6 : 8, + color: AppColor.blueDarkActive, + ), + textScaler: TextScaler.linear(1.5), ), - icon: Assets.vec.addSvg.svg(), ), ], ), - - Expanded( - child: ListView.separated( - padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10), - itemCount: 20, - itemBuilder: (context, index) { - return Container( - width: Get.width, - height: 85, - decoration: BoxDecoration( - color: - index < 5 - ? AppColor.yellowNormal - : index < 12 - ? AppColor.greenLightActive - : AppColor.blueLight, - borderRadius: BorderRadius.circular(8), - ), - child: Row( - children: [ - SizedBox(width: 5), - Expanded( - child: Container( - decoration: BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topRight: Radius.circular(8), - bottomRight: Radius.circular(8), - ), - border: Border.all( - color: - index < 5 - ? AppColor.yellowNormal - : index < 12 - ? AppColor.greenLightActive - : AppColor.blueLight, - width: 2, - ), - ), - child: Column( - children: [ - SizedBox(height: 10), - Expanded(child: Row( - children: [ - SizedBox(width: 10,), - Container( - padding: EdgeInsets.all(8), - alignment: AlignmentDirectional.center, - decoration: BoxDecoration( - shape: BoxShape.circle, - color: Colors.black54,), - child: Text((index+1).toString(),style: AppFonts.yekan18.copyWith(color: Colors.white),), - ), - - Expanded( - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceAround, - children: [ - Container( - padding: EdgeInsets.all(8), - alignment: AlignmentDirectional.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - color: Colors.black26,), - child: Text('ماده',style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark),), - ), - Container( - padding: EdgeInsets.all(8), - alignment: AlignmentDirectional.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - color: Colors.black26,), - child: Text('18 ماه',style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark),), - ), - Container( - padding: EdgeInsets.all(8), - alignment: AlignmentDirectional.center, - decoration: BoxDecoration( - borderRadius: BorderRadius.circular(12), - color: Colors.black26,), - child: Text('سرابی',style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark),), - ), - ], - ), - ), - ], - )), - SizedBox(height: 10), - Expanded(child: - Row( - children: [ - SizedBox(width: 10,), - Text('پلاک : 1212115112512', style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark)), - Spacer(), - Assets.vec.editSvg.svg( - width: 24, - height: 24, - colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn), - ), - SizedBox(width: 10), - Assets.vec.trashSvg.svg( - width: 24, - height: 24, - colorFilter: ColorFilter.mode(AppColor.error, BlendMode.srcIn)), - SizedBox(width: 10,), - ], - - )), - - ], - ), - ), - ), - - Container( - width: 20, - child: Center( - child: RotatedBox( - quarterTurns: 3, - child: Text( - index < 5 - ? 'گاو' - : index < 12 - ? 'گوسفند' - : 'مرغ', - style: AppFonts.yekan8, - textAlign: TextAlign.center, - ), - ), - ), - ), - ], - ), - ); - }, separatorBuilder: (BuildContext context, int index) =>SizedBox(height: 4,) - ), - ), - - SizedBox(height: 10), - - RElevated( - text: 'ثبت نهایی و ارسال به اتحادیه', - textStyle: AppFonts.yekan18, - height: 40, - backgroundColor: AppColor.greenNormal, - onPressed: () {}, - isFullWidth: true, - ), - ], + ), ), - ), + ], ); } @@ -278,7 +283,6 @@ class TaggingPage extends GetView { ), ), ); - } Widget _buildBottomSheet() { @@ -319,6 +323,178 @@ class TaggingPage extends GetView { ); } + Widget _buildInfoBottomSheet() { + return BaseBottomSheet( + height: Get.height * 0.5, + bgColor: const Color(0xFFF5F5F5), + child: Card( + color: Colors.white, + child: Padding( + padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: CrossAxisAlignment.center, + spacing: 15, + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Assets.vec.editSvg.svg( + width: 16, + height: 16, + colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn), + ), + Text('محمد احمدی', style: AppFonts.yekan14), + + GestureDetector( + onTap: () { + _buildDeleteDialog(onConfirm: () { + + }); + }, + child: Assets.vec.trashSvg.svg( + width: 16, + height: 16, + colorFilter: ColorFilter.mode(AppColor.error, BlendMode.srcIn), + ), + ), + ], + ), + Container( + height: 32, + padding: EdgeInsets.all(8), + decoration: BoxDecoration(color: AppColor.blueLightHover), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'تاریخ ثبت', + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark), + ), + Text( + '1404/2/2', + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark), + ), + ], + ), + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'شماره پلاک', + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark), + ), + Text( + '123456789012346', + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'جنسیت ', + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark), + ), + Text( + 'ماده', + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'نوع نژاد', + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark), + ), + Text( + 'افشاری', + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'نوع گله', + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark), + ), + Text( + 'روستایی', + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'شهر', + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark), + ), + Text( + 'کرج', + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark), + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + 'سن', + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark), + ), + Text( + '18 ماه', + textAlign: TextAlign.center, + style: AppFonts.yekan14.copyWith(color: AppColor.darkGreyDark), + ), + ], + ), + ], + ), + ), + ), + ); + } + + void _buildDeleteDialog({required VoidCallback onConfirm}) { + Get.defaultDialog( + title: 'حذف دام', + middleText: 'آیا از حذف این دام مطمئن هستید؟', + confirm: ElevatedButton( + style: ElevatedButton.styleFrom(backgroundColor: AppColor.error, foregroundColor: Colors.white), + onPressed: onConfirm, + child: Text('بله'), + ), + cancel: ElevatedButton( + onPressed: () { + Get.back(); + }, + child: Text('خیر'), + ), + ); + } + SizedBox _buildLiveStockImage() { return SizedBox( width: Get.width, @@ -482,4 +658,107 @@ class TaggingPage extends GetView { labelBuilder: (item) => Text(item ?? 'گونه دام'), ); } + + ObxValue _buildFilterWidget() { + return ObxValue((data) { + return AnimatedContainer( + duration: Duration(milliseconds: 300), + padding: EdgeInsets.only(top: 5), + curve: Curves.easeInOut, + height: data.value ? 50 : 0, + child: SingleChildScrollView( + scrollDirection: Axis.horizontal, + padding: EdgeInsets.symmetric(horizontal: 12), + child: ObxValue((data) { + return Row( + spacing: 12, + children: [ + CustomChip( + title: 'انتخاب فیلتر', + index: 0, + isSelected: true, + selectedColor: AppColor.blueNormal, + onTap: (index) {}, + ), + + RFilterChips( + title: 'درخواست‌های من', + index: 1, + isSelected: data.contains(1), + selectedColor: AppColor.yellowNormal, + onTap: (index) { + if (data.contains(1)) { + data.remove(1); + } else { + data.add(1); + } + }, + ), + + RFilterChips( + title: 'در انتظار ثبت ', + index: 2, + selectedColor: AppColor.greenLightActive, + isSelected: data.contains(2), + onTap: (index) { + if (data.contains(2)) { + data.remove(2); + } else { + data.add(2); + } + }, + ), + + RFilterChips( + title: 'ارجاع به تعاونی', + index: 3, + selectedColor: AppColor.blueLightHover, + isSelected: data.contains(3), + onTap: (index) { + if (data.contains(3)) { + data.remove(3); + } else { + data.add(3); + } + }, + ), + ], + ); + }, controller.filterSelected), + ), + ); + }, controller.filterIsSelected); + } + + ObxValue _buildSearchWidget() { + return ObxValue((data) { + return AnimatedContainer( + duration: Duration(milliseconds: 300), + padding: EdgeInsets.only(top: 5), + curve: Curves.easeInOut, + height: data.value ? 50 : 0, + child: Visibility( + visible: data.value, + child: Padding( + padding: const EdgeInsets.only(right: 8.0, left: 20.0), + child: RTextField( + suffixIcon: Padding( + padding: const EdgeInsets.all(12.0), + child: Assets.vec.searchSvg.svg( + width: 10, + height: 10, + colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn), + ), + ), + hintText: 'جستجو', + onChanged: (value) { + //controller.search(value); + }, + controller: TextEditingController(), + ), + ), + ), + ); + }, controller.searchIsSelected); + } } diff --git a/tools/runner.sh b/tools/runner.sh index e0b9992..1931741 100644 --- a/tools/runner.sh +++ b/tools/runner.sh @@ -1 +1,4 @@ -dart run build_runner build --delete-conflicting-outputs \ No newline at end of file +cd ../ +dart run build_runner build --delete-conflicting-outputs + +