diff --git a/android/local.properties b/android/local.properties
index ef261f3..462c4e6 100644
--- a/android/local.properties
+++ b/android/local.properties
@@ -1,5 +1,5 @@
-sdk.dir=C:\\Users\\Housh11\\AppData\\Local\\Android\\sdk
+sdk.dir=C:/Users/Housh11/AppData/Local/Android/Sdk
flutter.sdk=C:\\src\\flutter
-flutter.buildMode=release
+flutter.buildMode=debug
flutter.versionName=1.3.11
flutter.versionCode=8
\ No newline at end of file
diff --git a/assets/icons/empty.svg b/assets/icons/empty.svg
index 9d67b54..d39e1d0 100644
--- a/assets/icons/empty.svg
+++ b/assets/icons/empty.svg
@@ -1,55 +1,55 @@
diff --git a/assets/vec/empty.svg.vec b/assets/vec/empty.svg.vec
index b60778f..3ce3d51 100644
Binary files a/assets/vec/empty.svg.vec and b/assets/vec/empty.svg.vec differ
diff --git a/packages/chicken/lib/presentation/pages/steward/buy/view.dart b/packages/chicken/lib/presentation/pages/steward/buy/view.dart
index 1f1300e..8b37283 100644
--- a/packages/chicken/lib/presentation/pages/steward/buy/view.dart
+++ b/packages/chicken/lib/presentation/pages/steward/buy/view.dart
@@ -2,7 +2,6 @@ import 'package:flutter/material.dart';
import 'package:rasadyar_chicken/presentation/routes/routes.dart';
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/sale_buy_card_item.dart';
import 'package:rasadyar_core/core.dart';
import 'logic.dart';
@@ -18,28 +17,33 @@ class BuyPage extends GetView {
widgets: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
+ spacing: 21.w,
children: [
- Wrap(
- alignment: WrapAlignment.center,
- spacing: 14.w,
- children: [
- saleOrBuyItemCard(
- title: 'خرید داخل استان',
- iconPath: Assets.vec.cubeSvg.path,
- color: AppColor.greenNormalActive,
- onTap: () {
- Get.toNamed(ChickenRoutes.buysInProvinceSteward, id: stewardFirstKey);
- },
- ),
- saleOrBuyItemCard(
- title: 'خرید خارج استان',
- iconPath: Assets.vec.truckFastSvg.path,
- color: AppColor.greenNormalActive,
- onTap: () {
- Get.toNamed(ChickenRoutes.buysOutOfProvinceSteward, id: stewardFirstKey);
- },
- ),
- ],
+ GlassMorphismCardIcon(
+ title: 'خرید داخل استان',
+ vecIcon: Assets.vec.cubeSvg.path,
+ gradient: LinearGradient(
+ colors: [Color(0xFF00E096), Color(0xFF007D5E)],
+ stops: [0.0, 0.95],
+ begin: AlignmentGeometry.topLeft,
+ end: AlignmentGeometry.bottomRight,
+ ),
+ onTap: () {
+ Get.toNamed(ChickenRoutes.buysInProvinceSteward, id: stewardFirstKey);
+ },
+ ),
+ GlassMorphismCardIcon(
+ title: 'خرید خارج استان',
+ vecIcon: Assets.vec.truckFastSvg.path,
+ gradient: LinearGradient(
+ colors: [Color(0xFF00E096), Color(0xFF007D5E)],
+ stops: [0.0, 0.95],
+ begin: AlignmentGeometry.topLeft,
+ end: AlignmentGeometry.bottomRight,
+ ),
+ onTap: () {
+ Get.toNamed(ChickenRoutes.buysOutOfProvinceSteward, id: stewardFirstKey);
+ },
),
],
),
diff --git a/packages/chicken/lib/presentation/pages/steward/home/view.dart b/packages/chicken/lib/presentation/pages/steward/home/view.dart
index eaa222e..e714e47 100644
--- a/packages/chicken/lib/presentation/pages/steward/home/view.dart
+++ b/packages/chicken/lib/presentation/pages/steward/home/view.dart
@@ -17,140 +17,136 @@ class HomePage extends GetView {
scrollable: true,
isBase: true,
widgets: [
- 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: ObxValue((data) {
- return AnimatedSize(
- duration: Duration(milliseconds: 300),
- child: data.value
- ? Padding(
- padding: const EdgeInsets.all(8.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- children: [
- Row(
- spacing: 8,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Container(
- width: 40,
- height: 40,
- decoration: ShapeDecoration(
- image: DecorationImage(
- image: AssetImage(Assets.images.chicken.path),
- fit: BoxFit.cover,
- ),
- shape: RoundedRectangleBorder(
- side: BorderSide(width: 0.25, color: const Color(0xFFB0B0B0)),
- borderRadius: BorderRadius.circular(4),
- ),
- ),
- ),
- Text(
- 'مرغ گرم',
- textAlign: TextAlign.right,
- style: AppFonts.yekan16.copyWith(
- color: AppColor.darkGreyDarkActive,
- ),
- ),
- Spacer(),
- AnimatedRotation(
- turns: 180,
- duration: Duration(milliseconds: 3000),
- child: Icon(CupertinoIcons.chevron_up, size: 18),
- ),
- ],
- ),
- SizedBox(height: 8),
- _todayShipmentWidget(),
-
- _inventoryWidget(),
-
- Row(
- children: [
- Text(
- 'اطلاعات بارها',
- textAlign: TextAlign.right,
- style: AppFonts.yekan16,
- ),
- ],
- ),
-
- _informationShipment(),
-
- Row(
- children: [
- Text(
- 'اطلاعات توزیع',
- textAlign: TextAlign.right,
- style: AppFonts.yekan16,
- ),
- ],
- ),
-
- distributionInformationWidget(),
- ],
- ),
- )
- : Padding(
- padding: const EdgeInsets.all(8.0),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- children: [
- Row(
- spacing: 8,
- crossAxisAlignment: CrossAxisAlignment.center,
- children: [
- Container(
- width: 40,
- height: 40,
- decoration: ShapeDecoration(
- image: DecorationImage(
- image: AssetImage(Assets.images.chicken.path),
- fit: BoxFit.cover,
- ),
- shape: RoundedRectangleBorder(
- side: BorderSide(width: 0.25, color: const Color(0xFFB0B0B0)),
- borderRadius: BorderRadius.circular(4),
- ),
- ),
- ),
- Text(
- 'مرغ گرم',
- textAlign: TextAlign.right,
- style: AppFonts.yekan16.copyWith(
- color: AppColor.darkGreyDarkActive,
- ),
- ),
- Spacer(),
- Icon(CupertinoIcons.chevron_down, size: 18),
- ],
- ),
- _todayShipmentWidget(),
- _inventoryWidget(),
- ],
- ),
- ),
- );
- }, controller.isExpanded),
- ),
- ),
-
+ SizedBox(height: 8.h),
+ mainInformation(),
+ SizedBox(height: 8.h),
WidelyUsedWidget(),
SizedBox(height: 20),
],
);
}
+ InkWell mainInformation() {
+ return InkWell(
+ onTap: () {
+ controller.isExpanded.value = !controller.isExpanded.value;
+ },
+
+ child: Stack(
+ clipBehavior: Clip.none,
+ children: [
+ Container(
+ margin: EdgeInsetsGeometry.all(6),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ 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
+ ? Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Row(
+ spacing: 8,
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ AnimatedRotation(
+ turns: 180,
+ duration: Duration(milliseconds: 3000),
+ child: Icon(CupertinoIcons.chevron_up, size: 18),
+ ),
+ ],
+ ),
+ SizedBox(height: 8),
+ _todayShipmentWidget(),
+
+ _inventoryWidget(),
+
+ Row(
+ children: [
+ Text(
+ 'اطلاعات بارها',
+ textAlign: TextAlign.right,
+ style: AppFonts.yekan16,
+ ),
+ ],
+ ),
+
+ _informationShipment(),
+
+ Row(
+ children: [
+ Text(
+ 'اطلاعات توزیع',
+ textAlign: TextAlign.right,
+ style: AppFonts.yekan16,
+ ),
+ ],
+ ),
+
+ distributionInformationWidget(),
+ ],
+ ),
+ )
+ : Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Row(
+ spacing: 8,
+ mainAxisAlignment: MainAxisAlignment.end,
+ children: [
+ Icon(CupertinoIcons.chevron_down, size: 18),
+ ],
+ ),
+ _todayShipmentWidget(),
+ _inventoryWidget(),
+ ],
+ ),
+ ),
+ );
+ }, controller.isExpanded),
+ ),
+ Positioned(
+ top: -10,
+ right: 20,
+ child: Container(
+ height: 32.h,
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(8),
+ border: Border.all(width: 0.50, color: const Color(0xFFA9A9A9)),
+ ),
+ padding: EdgeInsets.symmetric(horizontal: 8),
+ child: Row(
+ spacing: 8,
+ children: [
+ Assets.vec.chicken2Svg.svg(
+ width: 24.w,
+ height: 24.h,
+ colorFilter: ColorFilter.mode(AppColor.blueDark, BlendMode.srcIn),
+ ),
+ Text(
+ 'اطلاعات مرغ گرم',
+ textAlign: TextAlign.right,
+ style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor),
+ ),
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+
Widget distributionInformationWidget() {
return Padding(
padding: const EdgeInsets.fromLTRB(0, 8, 0, 13),
diff --git a/packages/chicken/lib/presentation/pages/steward/sale/view.dart b/packages/chicken/lib/presentation/pages/steward/sale/view.dart
index 212680c..fd6f2e2 100644
--- a/packages/chicken/lib/presentation/pages/steward/sale/view.dart
+++ b/packages/chicken/lib/presentation/pages/steward/sale/view.dart
@@ -19,26 +19,22 @@ class SalePage extends GetView {
widgets: [
Row(
mainAxisAlignment: MainAxisAlignment.center,
+ spacing: 21,
children: [
- Wrap(
- alignment: WrapAlignment.center,
- spacing: 14.w,
- children: [
- saleOrBuyItemCard(
- title: 'فروش داخل استان',
- iconPath: Assets.vec.cubeSvg.path,
- onTap: () {
- Get.toNamed(ChickenRoutes.salesInProvinceSteward, id: stewardSecondKey);
- },
- ),
- saleOrBuyItemCard(
- title: 'فروش خارج استان',
- iconPath: Assets.vec.truckFastSvg.path,
- onTap: () {
- Get.toNamed(ChickenRoutes.salesOutOfProvinceSteward, id: stewardSecondKey);
- },
- ),
- ],
+
+ GlassMorphismCardIcon(
+ title: 'فروش داخل استان',
+ vecIcon: Assets.vec.cubeSvg.path,
+ onTap: () {
+ Get.toNamed(ChickenRoutes.salesInProvinceSteward, id: stewardSecondKey);
+ },
+ ),
+ GlassMorphismCardIcon(
+ title: 'فروش خارج استان',
+ vecIcon: Assets.vec.truckFastSvg.path,
+ onTap: () {
+ Get.toNamed(ChickenRoutes.salesOutOfProvinceSteward, id: stewardSecondKey);
+ },
),
],
),
diff --git a/packages/chicken/lib/presentation/widget/steward/widely_used/logic.dart b/packages/chicken/lib/presentation/widget/steward/widely_used/logic.dart
index ca05ef0..40729eb 100644
--- a/packages/chicken/lib/presentation/widget/steward/widely_used/logic.dart
+++ b/packages/chicken/lib/presentation/widget/steward/widely_used/logic.dart
@@ -1,4 +1,4 @@
-import 'package:rasadyar_chicken/chicken.dart';
+
import 'package:rasadyar_chicken/presentation/pages/steward/root/logic.dart';
import 'package:rasadyar_core/core.dart';
diff --git a/packages/chicken/lib/presentation/widget/steward/widely_used/view.dart b/packages/chicken/lib/presentation/widget/steward/widely_used/view.dart
index 1933281..a6cd243 100644
--- a/packages/chicken/lib/presentation/widget/steward/widely_used/view.dart
+++ b/packages/chicken/lib/presentation/widget/steward/widely_used/view.dart
@@ -12,100 +12,94 @@ class WidelyUsedWidget extends StatelessWidget {
Widget build(BuildContext context) {
final WidelyUsedLogic controller = Get.put(WidelyUsedLogic());
- return Column(
- children: [
- Padding(
- padding: EdgeInsetsGeometry.all(6),
- child: Row(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Text('پر کاربرد ها', textAlign: TextAlign.right, style: AppFonts.yekan16),
- /* ObxValue((data) {
- return GestureDetector(
- onTap: () {
- controller.toggleType();
+ return Container(
+ height: 110.h,
+ margin: EdgeInsetsGeometry.all(6),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(8),
+ border: Border.all(width: 0.50, color: const Color(0xFFA9A9A9)),
+ ),
+ 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.truckFastSvg.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.buysOutOfProvinceSteward, id: 0);
},
- child: controller.isOnEdit()
- ? Assets.vec.checkSvg.svg(
- width: 12.w,
- height: 12.h,
- colorFilter: ColorFilter.mode(AppColor.greenNormal, BlendMode.srcIn),
- )
- : Assets.vec.editSvg.svg(
- width: 16.w,
- height: 16.h,
- colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
- ),
- );
- }, controller.type)*/
- ],
+ ),
+
+ widelyUsed(
+ title: 'خرید داخل استان',
+ iconPath: Assets.vec.cubeSvg.path,
+ 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.buysInProvinceSteward, id: 0);
+ },
+ isOnEdit: false,
+ ),
+
+ widelyUsed(
+ title: 'فروش خارج استان',
+ iconPath: Assets.vec.truckFastSvg.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.cubeSvg.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);
+ },
+ ),
+ ],
+ )
),
- ),
-
- Padding(
- padding: const EdgeInsets.symmetric(horizontal: 2.0, vertical: 2),
- child: Wrap(
- spacing: 15,
- runSpacing: 8,
- children: [
- widelyUsed(
- title: 'خرید خارج استان',
- iconPath: Assets.vec.truckFastSvg.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.buysOutOfProvinceSteward, id: 0);
- },
+ Positioned(
+ top: -17,
+ right: 11,
+ child: Container(
+ padding: EdgeInsets.all(4),
+ decoration: BoxDecoration(
+ color: Colors.white,
+ borderRadius: BorderRadius.circular(8),
+ border: Border.all(width: 0.50, color: const Color(0xFFA9A9A9)),
),
-
- widelyUsed(
- title: 'خرید داخل استان',
- iconPath: Assets.vec.cubeSvg.path,
- 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.buysInProvinceSteward, id: 0);
- },
- isOnEdit: false,
- ),
-
- widelyUsed(
- title: 'فروش خارج استان',
- iconPath: Assets.vec.truckFastSvg.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.cubeSvg.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);
- },
- ),
- ],
+ child: Text('پر کاربردها', textAlign: TextAlign.right, style: AppFonts.yekan16),
+ ),
),
- ),
- ],
+ ],
+ ),
);
}
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 ecacd38..b198b49 100644
--- a/packages/core/lib/presentation/widget/card/card_icon_widget.dart
+++ b/packages/core/lib/presentation/widget/card/card_icon_widget.dart
@@ -113,6 +113,7 @@ class GlassMorphismCardIcon extends StatelessWidget {
this.iconWidth = 48,
this.iconHeight = 48,
this.iconColor,
+ this.gradient,
}) : assert((svgIcon != null) || (vecIcon != null), 'Either svgIcon or vecIcon must be provided');
final String title;
@@ -123,6 +124,7 @@ class GlassMorphismCardIcon extends StatelessWidget {
final VoidCallback? onTap;
final Color titleColor;
final TextStyle? titleStyle;
+ final Gradient? gradient;
final Color borderColor;
final Color backgroundColor;
@@ -149,7 +151,6 @@ class GlassMorphismCardIcon extends StatelessWidget {
onTap: onTap,
child: Stack(
children: [
-
Positioned.fill(
child: Container(
width: width.w,
@@ -159,14 +160,6 @@ class GlassMorphismCardIcon extends StatelessWidget {
color: Colors.white54,
border: Border.all(width: 1, color: Colors.white),
borderRadius: BorderRadius.circular(borderRadius),
- boxShadow: [
- BoxShadow(
- color: Colors.black12,
- blurRadius: 5,
- offset: Offset(10, 12),
- ),
- ],
-
),
child: InkWell(
onTap: onTap,
@@ -180,7 +173,7 @@ class GlassMorphismCardIcon extends StatelessWidget {
title,
textAlign: TextAlign.center,
style:
- titleStyle ??
+ titleStyle ??
AppFonts.yekan18Bold.copyWith(color: titleColor, height: 1.20),
),
),
@@ -201,11 +194,13 @@ class GlassMorphismCardIcon extends StatelessWidget {
topLeft: Radius.circular(borderRadius),
topRight: Radius.circular(borderRadius),
),
- gradient: LinearGradient(
- colors: [Color(0xff00b6bc), Color(0xff003ae0)],
- begin: Alignment.centerLeft,
- end: Alignment.centerRight,
- ),
+ gradient:
+ gradient ??
+ LinearGradient(
+ colors: [Color(0xff00b6bc), Color(0xff003ae0)],
+ begin: Alignment.centerLeft,
+ end: Alignment.centerRight,
+ ),
),
child: Center(
child: svgIcon != null
@@ -224,10 +219,6 @@ class GlassMorphismCardIcon extends StatelessWidget {
),
),
),
-
-
-
-
],
),
),
diff --git a/packages/core/lib/presentation/widget/empty_widget.dart b/packages/core/lib/presentation/widget/empty_widget.dart
index fe0e414..8a87f5d 100644
--- a/packages/core/lib/presentation/widget/empty_widget.dart
+++ b/packages/core/lib/presentation/widget/empty_widget.dart
@@ -9,18 +9,21 @@ class EmptyWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return RefreshIndicator(
- onRefresh: onRefresh?? () async {},
+ onRefresh: onRefresh ?? () async {},
child: SingleChildScrollView(
physics: AlwaysScrollableScrollPhysics(),
child: SizedBox(
- height: MediaQuery.of(context).size.height/1.5,
+ height: MediaQuery.of(context).size.height / 1.5,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Row(),
- Assets.vec.emptySvg.svg(width: 170.w, height: 170.h),
- Text('داده ای یافت نشد!', style: AppFonts.yekan20.copyWith(color: AppColor.textColor)),
+ Assets.vec.emptySvg.svg(height: 190.h),
+ Text(
+ 'داده ای یافت نشد!',
+ style: AppFonts.yekan20.copyWith(color: AppColor.textColor),
+ ),
],
),
),