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 0000000..7afb4cd
Binary files /dev/null and b/assets/vec/tag_label.svg.vec differ
diff --git a/assets/vec/virtual.svg.vec b/assets/vec/virtual.svg.vec
new file mode 100644
index 0000000..13b9ec3
Binary files /dev/null and b/assets/vec/virtual.svg.vec differ
diff --git a/assets/vec/virtual_tag.svg.vec b/assets/vec/virtual_tag.svg.vec
deleted file mode 100644
index 3d6d199..0000000
Binary files a/assets/vec/virtual_tag.svg.vec and /dev/null differ
diff --git a/lib/presentation/common/assets.dart b/lib/presentation/common/assets.dart
deleted file mode 100644
index e199492..0000000
--- a/lib/presentation/common/assets.dart
+++ /dev/null
@@ -1,46 +0,0 @@
-///This file is automatically generated. DO NOT EDIT, all your changes would be lost.
-class Assets {
- Assets._();
-
- static const String iconsAdd = 'assets/icons/add.svg';
- static const String iconsArrowLeft = 'assets/icons/arrow_left.svg';
- static const String iconsArrowRight = 'assets/icons/arrow_right.svg';
- static const String iconsBgHeaderUserProfile = 'assets/icons/bg_header_user_profile.svg';
- static const String iconsCalendar = 'assets/icons/calendar.svg';
- static const String iconsCalendarSearch = 'assets/icons/calendar_search.svg';
- static const String iconsCall = 'assets/icons/call.svg';
- static const String iconsDiagram = 'assets/icons/diagram.svg';
- static const String iconsDownload = 'assets/icons/download.svg';
- static const String iconsEdit = 'assets/icons/edit.svg';
- static const String iconsExcelDownload = 'assets/icons/excel_download.svg';
- static const String iconsFilter = 'assets/icons/filter.svg';
- static const String iconsGps = 'assets/icons/gps.svg';
- static const String iconsInformation = 'assets/icons/information.svg';
- static const String iconsInspection = 'assets/icons/inspection.svg';
- static const String iconsKey = 'assets/icons/key.svg';
- static const String iconsLiveStock = 'assets/icons/liveStock.svg';
- static const String iconsLogout = 'assets/icons/logout.svg';
- static const String iconsMap = 'assets/icons/map.svg';
- static const String iconsMapMarker = 'assets/icons/map_marker.svg';
- static const String iconsMessageAdd = 'assets/icons/message_add.svg';
- static const String iconsPdfDownload = 'assets/icons/pdf_download.svg';
- static const String iconsPictureFrame = 'assets/icons/picture_frame.svg';
- static const String iconsPlaceHolder = 'assets/icons/place_holder.svg';
- static const String iconsProfileCircle = 'assets/icons/profile_circle.svg';
- static const String iconsProfileUser = 'assets/icons/profile_user.svg';
- static const String iconsReceiptDiscount = 'assets/icons/receipt_discount.svg';
- static const String iconsScan = 'assets/icons/scan.svg';
- static const String iconsScanBarcode = 'assets/icons/scan_barcode.svg';
- static const String iconsSearch = 'assets/icons/search.svg';
- static const String iconsSecurityTime = 'assets/icons/security_time.svg';
- static const String iconsSetting = 'assets/icons/setting.svg';
- static const String iconsTagUser = 'assets/icons/tag_user.svg';
- static const String iconsTrash = 'assets/icons/trash.svg';
- static const String iconsUser = 'assets/icons/user.svg';
- static const String iconsUserSquare = 'assets/icons/user_square.svg';
- static const String iconsVirtualTag = 'assets/icons/virtual_tag.svg';
- static const String imagesInnerSplash = 'assets/images/inner_splash.webp';
- static const String imagesOutterSplash = 'assets/images/outter_splash.webp';
- static const String imagesPlaceHolder = 'assets/images/place_holder.png';
-
-}
diff --git a/packages/core/lib/presentation/common/assets.gen.dart b/packages/core/lib/presentation/common/assets.gen.dart
index aeec0dd..c289778 100644
--- a/packages/core/lib/presentation/common/assets.gen.dart
+++ b/packages/core/lib/presentation/common/assets.gen.dart
@@ -111,6 +111,9 @@ class $AssetsIconsGen {
/// File path: assets/icons/setting.svg
SvgGenImage get setting => 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
+
+