From f9a43c3ca7430b7b972732cbbd8c1ce5f73be055 Mon Sep 17 00:00:00 2001 From: "mr.mojtaba" Date: Mon, 16 Jun 2025 09:06:20 +0330 Subject: [PATCH] feat : out of the province --- assets/icons/shopping_basket.svg | 10 ++ assets/vec/shopping_basket.svg.vec | Bin 0 -> 811 bytes .../pages/sales_out_of_province/view.dart | 114 +++++++++--------- .../lib/presentation/common/assets.gen.dart | 8 ++ 4 files changed, 75 insertions(+), 57 deletions(-) create mode 100644 assets/icons/shopping_basket.svg create mode 100644 assets/vec/shopping_basket.svg.vec diff --git a/assets/icons/shopping_basket.svg b/assets/icons/shopping_basket.svg new file mode 100644 index 0000000..76d34a5 --- /dev/null +++ b/assets/icons/shopping_basket.svg @@ -0,0 +1,10 @@ + + + + + + diff --git a/assets/vec/shopping_basket.svg.vec b/assets/vec/shopping_basket.svg.vec new file mode 100644 index 0000000000000000000000000000000000000000..c19c21e35ece7d7116567e5cb36f2f22b7b5ae47 GIT binary patch literal 811 zcmZ8fTS!z<6y5h;$-p%65ysS%sMJK^qlZSpoV_e7iyF`mLrQ!gG>n0n(T9aF5fy$| z>3m33ANFBTA30HAL1Z6UXoVj=Buh&RwFf>hZR~dU9i+#BbJsolti8_K`<$|MXGn7q z`9M^M<)$?>%^<2*M9P|`xy%ZYp;>?b@9I{}K}5PWNna>m3b}4@tm<*^EoUr_SUxZH2gY-{hyUdH9e<_}a1xCmIPM*BA>roM&y+yh(gCm2h{# zJth3${?khG_Z>)4qIa32l<4R5>1z1qFvne;b!Sb#x3Oyb8ynj$_VTOmx|-_iw)uag|B#oT7m-_#xC)`}!fa0gk=U*c_N@gpey1dlDw!#D?R|H7AgBwy+iJ*ijp zJ)v^QdA|xPAmwcjd8)>@oR?@3k78h{wr| zb1HQv8z^=%r57V`D}{}mQuON?y!(13Mw*!~J@TT&Rlr~R4rW(XGJ>a~wTD#|h6YruR`0%9@5rG8nO$Nj6T2Ugs99xAaq2 zD-5<(Lf@K;XW6B=bAB7d&kp|{h(Axr1MxeOSb(ADCRdN;!k3*oyK{M69E mf}K+ { Text('خارج استان', style: AppFonts.yekan16Bold.copyWith(color: Colors.white)), ], ), - additionalActions: [ + /* additionalActions: [ Assets.vec.searchSvg.svg( width: 24, height: 24, @@ -43,15 +43,31 @@ class SalesOutOfProvincePage extends GetView { colorFilter: const ColorFilter.mode(Colors.white, BlendMode.srcIn), ), SizedBox(width: 8), - ], + ],*/ ), body: Column( children: [ - _typeOuterInfoCard( - title: 'خرید خارج استان', - iconPath: Assets.vec.searchSvg.path, - backgroundColor: AppColor.blueLight, - foregroundColor: AppColor.blueNormal, + Padding( + padding: const EdgeInsets.all(8.0), + child: Row( + spacing: 8, + children: [ + Expanded( + child: _typeOuterInfoCard( + title: 'خرید خارج استان', + iconPath: Assets.vec.cubeBottomRotationSvg.path, + foregroundColor: AppColor.blueNormal, + ), + ), + Expanded( + child: _typeOuterInfoCard( + title: 'فروش خارج استان', + iconPath: Assets.vec.cubeTopRotationSvg.path, + foregroundColor: AppColor.greenDark, + ), + ), + ], + ), ), /* SizedBox(height: 12), @@ -142,61 +158,45 @@ class SalesOutOfProvincePage extends GetView { ); } - Container _typeOuterInfoCard({ - required String title, - required String iconPath, - required Color backgroundColor, - required Color foregroundColor, - }) { + Container _typeOuterInfoCard({required String title, required String iconPath, required Color foregroundColor}) { return Container( - height: 110, - decoration: BoxDecoration(borderRadius: BorderRadius.circular(8)), - clipBehavior: Clip.hardEdge, - child: Stack( - alignment: Alignment.topCenter, + height: (Get.width - 24) / 2, + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.circular(8), + border: Border.all(width: 1, color: foregroundColor), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, children: [ - Positioned( - bottom: 0, - right: 0, - left: 0, - child: Container( - height: 120, - decoration: BoxDecoration( - color: backgroundColor, - borderRadius: BorderRadius.circular(8), - border: Border.all(width: 1, color: foregroundColor), - ), - child: Column( - mainAxisAlignment: MainAxisAlignment.center, - spacing: 4, - children: [ - Text( - title, - textAlign: TextAlign.right, - style: AppFonts.yekan14.copyWith(color: AppColor.mediumGreyDarkActive), - ), - ], - ), - ), - ), - Positioned( - top: 0, - child: Container( - width: 50, - height: 50, - decoration: ShapeDecoration( - color: backgroundColor, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(30), - side: BorderSide(width: 1, color: foregroundColor), - ), - ), - child: Center( + Stack( + clipBehavior: Clip.none, + alignment: Alignment.center, + children: [ + + Positioned( + top: -41, child: SvgGenImage.vec( iconPath, - ).svg(width: 36, height: 36, colorFilter: ColorFilter.mode(foregroundColor, BlendMode.srcIn)), + ).svg(width: 45, height: 45, colorFilter: ColorFilter.mode(foregroundColor, BlendMode.srcIn)), ), - ), + + + Assets.vec.shoppingBasketSvg.svg( + width: 55, + height: 60, + colorFilter: ColorFilter.mode(foregroundColor, BlendMode.srcIn), + fit: BoxFit.cover, + ), + ], + ), + const SizedBox(height: 15), + + Text( + title, + textAlign: TextAlign.right, + style: AppFonts.yekan16Bold.copyWith(color: foregroundColor), ), ], ), diff --git a/packages/core/lib/presentation/common/assets.gen.dart b/packages/core/lib/presentation/common/assets.gen.dart index c8fa214..f33b3bb 100644 --- a/packages/core/lib/presentation/common/assets.gen.dart +++ b/packages/core/lib/presentation/common/assets.gen.dart @@ -150,6 +150,9 @@ class $AssetsIconsGen { /// File path: assets/icons/setting.svg SvgGenImage get setting => const SvgGenImage('assets/icons/setting.svg'); + /// File path: assets/icons/shopping_basket.svg + SvgGenImage get shoppingBasket => const SvgGenImage('assets/icons/shopping_basket.svg'); + /// File path: assets/icons/tag_label.svg SvgGenImage get tagLabel => const SvgGenImage('assets/icons/tag_label.svg'); @@ -227,6 +230,7 @@ class $AssetsIconsGen { search, securityTime, setting, + shoppingBasket, tagLabel, tagUser, trash, @@ -407,6 +411,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/shopping_basket.svg.vec + SvgGenImage get shoppingBasketSvg => const SvgGenImage.vec('assets/vec/shopping_basket.svg.vec'); + /// File path: assets/vec/tag_label.svg.vec SvgGenImage get tagLabelSvg => const SvgGenImage.vec('assets/vec/tag_label.svg.vec'); @@ -484,6 +491,7 @@ class $AssetsVecGen { searchSvg, securityTimeSvg, settingSvg, + shoppingBasketSvg, tagLabelSvg, tagUserSvg, trashSvg,