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 a5c1c29..38b50f6 100644
Binary files a/assets/vec/bg_auth.svg.vec and b/assets/vec/bg_auth.svg.vec differ
diff --git a/assets/vec/box_remove.svg.vec b/assets/vec/box_remove.svg.vec
new file mode 100644
index 0000000..d70cda0
Binary files /dev/null and b/assets/vec/box_remove.svg.vec differ
diff --git a/assets/vec/box_tick.svg.vec b/assets/vec/box_tick.svg.vec
new file mode 100644
index 0000000..d79de28
Binary files /dev/null and b/assets/vec/box_tick.svg.vec differ
diff --git a/assets/vec/close_square_filled.svg.vec b/assets/vec/close_square_filled.svg.vec
new file mode 100644
index 0000000..490075c
Binary files /dev/null and b/assets/vec/close_square_filled.svg.vec differ
diff --git a/assets/vec/empty.svg.vec b/assets/vec/empty.svg.vec
index b60778f..f6caea4 100644
Binary files a/assets/vec/empty.svg.vec and b/assets/vec/empty.svg.vec differ
diff --git a/assets/vec/hashtag.svg.vec b/assets/vec/hashtag.svg.vec
new file mode 100644
index 0000000..72ac8d5
Binary files /dev/null and b/assets/vec/hashtag.svg.vec differ
diff --git a/assets/vec/home_hashtag.svg.vec b/assets/vec/home_hashtag.svg.vec
new file mode 100644
index 0000000..7d4a181
Binary files /dev/null and b/assets/vec/home_hashtag.svg.vec differ
diff --git a/assets/vec/home_trend_down.svg.vec b/assets/vec/home_trend_down.svg.vec
new file mode 100644
index 0000000..6282fbe
Binary files /dev/null and b/assets/vec/home_trend_down.svg.vec differ
diff --git a/assets/vec/home_trend_up.svg.vec b/assets/vec/home_trend_up.svg.vec
new file mode 100644
index 0000000..d12e2cc
Binary files /dev/null and b/assets/vec/home_trend_up.svg.vec differ
diff --git a/assets/vec/note_remove.svg.vec b/assets/vec/note_remove.svg.vec
new file mode 100644
index 0000000..aeeebd0
Binary files /dev/null and b/assets/vec/note_remove.svg.vec differ
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,