feat : new tagging page
This commit is contained in:
4
assets/icons/tag_label.svg
Normal file
4
assets/icons/tag_label.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg width="29" height="34" viewBox="0 0 29 34" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M26.4673 16.3731H26.3971C23.8763 14.6 20.6141 12.5924 20.111 7.84137C20.2039 7.44288 20.2533 7.02873 20.2533 6.60332C20.2533 3.50891 17.6579 1 14.456 1C11.2541 1 8.65872 3.50842 8.65872 6.60332C8.65872 6.97439 8.69628 7.33714 8.76795 7.68814C8.4101 11.1815 6.41078 14.0767 2.76998 16.3727H2.53224C1.68951 16.3727 1 17.0556 1 17.8902V31.4824C1 32.3171 1.68951 33 2.53224 33H26.4678C27.3105 33 28 32.3171 28 31.4824V17.8902C28 17.0556 27.31 16.3731 26.4673 16.3731ZM14.4995 8.63394C13.3671 8.63394 12.4493 7.72486 12.4493 6.60332C12.4493 5.48177 13.3671 4.57269 14.4995 4.57269C15.6319 4.57269 16.5497 5.48177 16.5497 6.60332C16.5497 7.72486 15.6319 8.63394 14.4995 8.63394Z"
|
||||
fill="#D9F7F0" stroke="#005C45" stroke-miterlimit="10"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 857 B |
24
assets/icons/virtual.svg
Normal file
24
assets/icons/virtual.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 21 KiB |
@@ -1 +0,0 @@
|
||||
<svg id="flat" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><circle cx="256" cy="256" fill="#a1dcff" r="232"/><path d="m437.25 265.48-11.1 22.2a43.994 43.994 0 0 1 -39.35 24.32h-73.31a43.5 43.5 0 0 0 -43.5 43.5v132.08q-6.945.42-13.99.42c-128.13 0-232-103.87-232-232a232.241 232.241 0 0 1 6.81-56h191.18a68.43 68.43 0 0 1 -32.33-70.01l.33-1.99 80 24h54.3a45.277 45.277 0 0 1 30.71 12.01l76.63 70.74a25.985 25.985 0 0 1 5.62 30.73z" fill="#a1dcff"/><path d="m437.25 265.48-11.1 22.2a43.994 43.994 0 0 1 -39.35 24.32h-73.31a43.5 43.5 0 0 0 -43.5 43.5v132.08q-6.945.42-13.99.42c-128.13 0-232-103.87-232-232a232.241 232.241 0 0 1 6.81-56h191.18a68.43 68.43 0 0 1 -32.33-70.01l.33-1.99 80 24h54.3a45.277 45.277 0 0 1 30.71 12.01l76.63 70.74a25.985 25.985 0 0 1 5.62 30.73z" fill="#7a4922"/><path d="m222.193 186.844-46.678 15.799-30.878 62.479 62.478 30.878 30.878-62.478z" fill="#ecab2c"/><g fill="#b5cf7f"><path d="m182.562 360a55.637 55.637 0 0 1 -39.6-16.4 8 8 0 0 1 11.312-11.315 39.994 39.994 0 0 0 53.888 2.444 8 8 0 1 1 10.248 12.287 56.064 56.064 0 0 1 -35.848 12.984z"/><path d="m182.562 392a87.424 87.424 0 0 1 -62.226-25.774 8 8 0 1 1 11.314-11.315 71.985 71.985 0 0 0 97 4.4 8 8 0 1 1 10.25 12.289 88.1 88.1 0 0 1 -56.338 20.4z"/><path d="m182.562 328a23.843 23.843 0 0 1 -16.971-7.029 8 8 0 1 1 11.314-11.315 7.992 7.992 0 0 0 10.773.49 8 8 0 0 1 10.25 12.286 24.034 24.034 0 0 1 -15.366 5.568z"/></g><circle cx="325.993" cy="200" fill="#5b3719" r="16"/><path d="m277.993 152 9.373-9.373a77.254 77.254 0 0 1 54.627-22.627l-4.031 2.687a44.847 44.847 0 0 0 -19.25 29.313z" fill="#e6e5e0"/></svg>
|
||||
|
Before Width: | Height: | Size: 1.6 KiB |
BIN
assets/vec/tag_label.svg.vec
Normal file
BIN
assets/vec/tag_label.svg.vec
Normal file
Binary file not shown.
BIN
assets/vec/virtual.svg.vec
Normal file
BIN
assets/vec/virtual.svg.vec
Normal file
Binary file not shown.
Binary file not shown.
@@ -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';
|
||||
|
||||
}
|
||||
@@ -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<SvgGenImage> 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<SvgGenImage> get values => [
|
||||
@@ -332,11 +339,12 @@ class $AssetsVecGen {
|
||||
searchSvg,
|
||||
securityTimeSvg,
|
||||
settingSvg,
|
||||
tagLabelSvg,
|
||||
tagUserSvg,
|
||||
trashSvg,
|
||||
userSvg,
|
||||
userSquareSvg,
|
||||
virtualTagSvg,
|
||||
virtualSvg,
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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<int> filterSelected = <int>[].obs;
|
||||
|
||||
@override
|
||||
void onReady() {
|
||||
|
||||
@@ -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<TaggingLogic> {
|
||||
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<TaggingLogic> {
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
Widget _buildBottomSheet() {
|
||||
@@ -319,6 +323,178 @@ class TaggingPage extends GetView<TaggingLogic> {
|
||||
);
|
||||
}
|
||||
|
||||
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<TaggingLogic> {
|
||||
labelBuilder: (item) => Text(item ?? 'گونه دام'),
|
||||
);
|
||||
}
|
||||
|
||||
ObxValue<RxBool> _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<RxBool> _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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1,4 @@
|
||||
cd ../
|
||||
dart run build_runner build --delete-conflicting-outputs
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user