fix : ui bug
This commit is contained in:
@@ -5,6 +5,7 @@ import 'package:rasadyar_chicken/data/models/response/hatching_report/hatching_r
|
||||
import 'package:rasadyar_chicken/presentation/pages/poultry_science/active_hatching/logic.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/page_route.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
import 'package:rasadyar_core/presentation/widget/list_item/list_item2.dart';
|
||||
import 'package:rasadyar_core/presentation/widget/list_view/r_paginated_list_view.dart';
|
||||
@@ -17,7 +18,7 @@ class ActiveHatchingPage extends GetView<ActiveHatchingLogic> {
|
||||
return BasePage(
|
||||
hasSearch: false,
|
||||
hasFilter: false,
|
||||
routes: controller.routesName,
|
||||
routesWidget: buildContainerPageRoute(controller.routesName),
|
||||
onBackPressed: () => Get.back(id: poultryFirstKey),
|
||||
widgets: [
|
||||
hatchingWidget()
|
||||
|
||||
@@ -6,7 +6,7 @@ import 'package:rasadyar_chicken/presentation/pages/poultry_science/root/logic.d
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class FarmLogic extends GetxController {
|
||||
List<String> routes = ['اقدام', 'فارم ها'];
|
||||
List<String> routesName = ['اقدام', 'فارم ها'];
|
||||
PoultryScienceRootLogic rootLogic = Get.find<PoultryScienceRootLogic>();
|
||||
final PoultryScienceHomeLogic _homeLogic = Get.find<PoultryScienceHomeLogic>();
|
||||
RxList<InformationTagData> tagInfo = <InformationTagData>[
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'package:rasadyar_chicken/data/models/response/poultry_farm/poultry_farm.
|
||||
|
||||
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/page_route.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
@@ -13,9 +14,9 @@ class FarmPage extends GetView<FarmLogic> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BasePage(
|
||||
routes: controller.routes,
|
||||
hasFilter: false,
|
||||
hasSearch: false,
|
||||
routesWidget: buildContainerPageRoute(controller.routesName),
|
||||
onBackPressed: () => Get.back(id: poultryFirstKey),
|
||||
widgets: [firstTagInformation(), farmListWidget()],
|
||||
);
|
||||
|
||||
@@ -4,7 +4,7 @@ import 'package:rasadyar_chicken/presentation/pages/poultry_science/root/logic.d
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
class GenocideLogic extends GetxController {
|
||||
List<String> routes = ['اقدام', 'درخواست کشتارها'];
|
||||
List<String> routesName = ['اقدام', 'درخواست کشتارها'];
|
||||
var tokenService = Get.find<TokenStorageService>();
|
||||
var gService = Get.find<GService>();
|
||||
var rootLogic = Get.find<PoultryScienceRootLogic>();
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:rasadyar_chicken/presentation/pages/poultry_science/killing_regi
|
||||
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/filter_bottom_sheet.dart';
|
||||
import 'package:rasadyar_chicken/presentation/widget/page_route.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
@@ -14,7 +15,7 @@ class GenocidePage extends GetView<GenocideLogic> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return BasePage(
|
||||
routes: controller.routes,
|
||||
routesWidget: buildContainerPageRoute(controller.routesName),
|
||||
hasSearch: true,
|
||||
hasFilter: true,
|
||||
onSearchChanged: (data) {
|
||||
|
||||
@@ -15,32 +15,71 @@ class PoultryScienceHomePage extends GetView<PoultryScienceHomeLogic> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColor.bgLight,
|
||||
appBar: chickenAppBar(hasBack: false, hasFilter: false, hasSearch: false),
|
||||
appBar: chickenAppBar(
|
||||
hasBack: false,
|
||||
hasFilter: false,
|
||||
hasSearch: false,
|
||||
additionalActions: [
|
||||
SizedBox(width: 12),
|
||||
Icon(CupertinoIcons.envelope_fill, color: Colors.white),
|
||||
SizedBox(width: 12),
|
||||
Icon(CupertinoIcons.bell_fill, color: Colors.white),
|
||||
SizedBox(width: 12),
|
||||
],
|
||||
),
|
||||
body: SingleChildScrollView(
|
||||
physics: BouncingScrollPhysics(),
|
||||
child: Column(
|
||||
spacing: 8,
|
||||
children: [
|
||||
SizedBox(height: 22.h),
|
||||
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: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsetsGeometry.all(6),
|
||||
decoration: BoxDecoration(
|
||||
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 ? mainItemWidget() : mainItemWidgetExpanded(),
|
||||
);
|
||||
}, controller.isExpanded),
|
||||
child: ObxValue((data) {
|
||||
return AnimatedSize(
|
||||
duration: Duration(milliseconds: 300),
|
||||
child: data.value ? mainItemWidget() : mainItemWidgetExpanded(),
|
||||
);
|
||||
}, controller.isExpanded),
|
||||
),
|
||||
Positioned(
|
||||
top: -4,
|
||||
right: 20,
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Row(
|
||||
spacing: 8,
|
||||
children: [
|
||||
Assets.vec.chicken2Svg.svg(
|
||||
width: 16.w,
|
||||
height: 16.h,
|
||||
colorFilter: ColorFilter.mode(AppColor.iconColor, BlendMode.srcIn),
|
||||
),
|
||||
Text(
|
||||
'فارم های مرغ گوشتی',
|
||||
textAlign: TextAlign.right,
|
||||
style: AppFonts.yekan16.copyWith(color: AppColor.iconColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(height: 10),
|
||||
widelyWidget(),
|
||||
SizedBox(height: 20),
|
||||
],
|
||||
@@ -55,7 +94,8 @@ class PoultryScienceHomePage extends GetView<PoultryScienceHomeLogic> {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
SizedBox(height: 8),
|
||||
/* Row(
|
||||
spacing: 8,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
@@ -75,14 +115,14 @@ class PoultryScienceHomePage extends GetView<PoultryScienceHomeLogic> {
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'فارم ها',
|
||||
'فارم ها',
|
||||
textAlign: TextAlign.right,
|
||||
style: AppFonts.yekan16.copyWith(color: AppColor.darkGreyDarkActive),
|
||||
),
|
||||
Spacer(),
|
||||
Icon(CupertinoIcons.chevron_down, size: 18),
|
||||
],
|
||||
),
|
||||
),*/
|
||||
firstTagInformation(),
|
||||
secondTagInformation(),
|
||||
],
|
||||
@@ -96,7 +136,8 @@ class PoultryScienceHomePage extends GetView<PoultryScienceHomeLogic> {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
SizedBox(height: 8),
|
||||
/* Row(
|
||||
spacing: 8,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
@@ -127,7 +168,7 @@ class PoultryScienceHomePage extends GetView<PoultryScienceHomeLogic> {
|
||||
child: Icon(CupertinoIcons.chevron_up, size: 18),
|
||||
),
|
||||
],
|
||||
),
|
||||
),*/
|
||||
SizedBox(height: 8),
|
||||
firstTagInformation(),
|
||||
Row(
|
||||
@@ -208,68 +249,84 @@ class PoultryScienceHomePage extends GetView<PoultryScienceHomeLogic> {
|
||||
|
||||
//region Widely Used Widget
|
||||
Widget widelyWidget() {
|
||||
return Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsetsGeometry.all(6),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [Text('پر کاربرد ها', textAlign: TextAlign.right, style: AppFonts.yekan16)],
|
||||
return Container(
|
||||
margin: EdgeInsetsGeometry.all(6),
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(width: 1, color: AppColor.borderColor),
|
||||
),
|
||||
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.cubeSearchSvg.path,
|
||||
isOnEdit: false,
|
||||
cardColor: AppColor.greenLightActive,
|
||||
labelColor: AppColor.greenNormal,
|
||||
textColor: AppColor.textColor,
|
||||
onTap: () async {
|
||||
controller.rootLogic.currentPage.value = 0;
|
||||
|
||||
Get.toNamed(ChickenRoutes.inspectionPoultryScience, id: poultryFirstKey);
|
||||
},
|
||||
),
|
||||
|
||||
widelyUsed(
|
||||
title: 'ثبت کشتار',
|
||||
iconPath: Assets.vec.noteRemoveSvg.path,
|
||||
isOnEdit: false,
|
||||
cardColor: AppColor.blueLightActive,
|
||||
labelColor: AppColor.blueNormalOld,
|
||||
textColor: AppColor.textColor,
|
||||
onTap: () async {
|
||||
controller.rootLogic.currentPage.value = 0;
|
||||
Get.toNamed(ChickenRoutes.genocidePoultryScience, id: poultryFirstKey);
|
||||
},
|
||||
),
|
||||
widelyUsed(
|
||||
title: 'فارم ها',
|
||||
iconPath: Assets.vec.cubeScanSvg.path,
|
||||
cardColor: Color(0xFFFFCFA3),
|
||||
labelColor: Color(0xFFF68D2B),
|
||||
textColor: AppColor.textColor,
|
||||
isOnEdit: false,
|
||||
onTap: () async {
|
||||
controller.rootLogic.currentPage.value = 0;
|
||||
Get.toNamed(ChickenRoutes.farmPoultryScience, id: poultryFirstKey);
|
||||
},
|
||||
),
|
||||
|
||||
widelyUsed(
|
||||
title: 'جوجه ریزی فعال',
|
||||
iconPath: Assets.vec.boxTickSvg.path,
|
||||
isOnEdit: false,
|
||||
cardColor: Color(0xFFD9BEFF),
|
||||
labelColor: Color(0xFF9757FF),
|
||||
textColor: AppColor.textColor,
|
||||
onTap: () async {
|
||||
controller.rootLogic.currentPage.value = 0;
|
||||
Get.toNamed(ChickenRoutes.activeHatchingPoultryScience, id: poultryFirstKey);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 2.0, vertical: 2),
|
||||
child: Wrap(
|
||||
spacing: 24.w,
|
||||
runSpacing: 8.h,
|
||||
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;
|
||||
|
||||
Get.toNamed(ChickenRoutes.inspectionPoultryScience, id: poultryFirstKey);
|
||||
},
|
||||
),
|
||||
|
||||
widelyUsed(
|
||||
title: 'ثبت کشتار',
|
||||
iconPath: Assets.vec.noteRemoveSvg.path,
|
||||
isOnEdit: false,
|
||||
onTap: () async {
|
||||
controller.rootLogic.currentPage.value = 0;
|
||||
Get.toNamed(ChickenRoutes.genocidePoultryScience, id: poultryFirstKey);
|
||||
},
|
||||
),
|
||||
widelyUsed(
|
||||
title: 'فارم ها',
|
||||
iconPath: Assets.vec.cubeSvg.path,
|
||||
isOnEdit: false,
|
||||
onTap: () async {
|
||||
controller.rootLogic.currentPage.value = 0;
|
||||
Get.toNamed(ChickenRoutes.farmPoultryScience, id: poultryFirstKey);
|
||||
},
|
||||
),
|
||||
|
||||
widelyUsed(
|
||||
title: 'جوجه ریزی فعال',
|
||||
iconPath: Assets.vec.boxTickSvg.path,
|
||||
isOnEdit: false,
|
||||
onTap: () async {
|
||||
controller.rootLogic.currentPage.value = 0;
|
||||
Get.toNamed(ChickenRoutes.activeHatchingPoultryScience, id: poultryFirstKey);
|
||||
},
|
||||
),
|
||||
],
|
||||
Positioned(
|
||||
top: -12,
|
||||
right: 11,
|
||||
child: Container(
|
||||
color: Colors.white,
|
||||
child: Text('پر کاربرد ها', textAlign: TextAlign.right, style: AppFonts.yekan16),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -354,7 +411,10 @@ class PoultryScienceHomePage extends GetView<PoultryScienceHomeLogic> {
|
||||
),
|
||||
],
|
||||
),
|
||||
Text(title, style: AppFonts.yekan10.copyWith(color: textColor ?? AppColor.blueNormal)),
|
||||
Text(
|
||||
title,
|
||||
style: AppFonts.yekan10Bold.copyWith(color: textColor ?? AppColor.blueNormal),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -22,7 +22,7 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
||||
filteringWidget: filterBottomSheet(),
|
||||
onSearchChanged: (data) => controller.setSearchValue(data),
|
||||
|
||||
routesWidget: ObxValue((route) => buildPageRoute(route), controller.routesName),
|
||||
routesWidget: ObxValue((route) => buildContainerPageRoute(route), controller.routesName),
|
||||
onBackPressed: () => Get.back(id: poultryFirstKey),
|
||||
widgets: [
|
||||
segmentWidget(),
|
||||
@@ -110,7 +110,8 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
|
||||
Text('نژاد:${ item.breed?.first.breed ?? 'N/A'}', style: AppFonts.yekan14.copyWith(color: AppColor.textColor)),
|
||||
Text('نژاد:${ item.breed?.first.breed ?? 'N/A'}',
|
||||
style: AppFonts.yekan14.copyWith(color: AppColor.textColor)),
|
||||
Text(
|
||||
' سن ${item.age} (روزه)',
|
||||
|
||||
@@ -131,8 +132,9 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
||||
|
||||
unit: '(قطعه)',
|
||||
),
|
||||
buildUnitRow(title: 'مانده در سالن', value: item.leftOver.separatedByCommaFa,unit: '(قطعه)',),
|
||||
buildUnitRow(title: 'تلفات', value: item.losses.separatedByCommaFa,unit: '(قطعه)',),
|
||||
buildUnitRow(
|
||||
title: 'مانده در سالن', value: item.leftOver.separatedByCommaFa, unit: '(قطعه)',),
|
||||
buildUnitRow(title: 'تلفات', value: item.losses.separatedByCommaFa, unit: '(قطعه)',),
|
||||
buildRow(
|
||||
title: 'دامپزشک فارم',
|
||||
value: '${item.vetFarm?.vetFarmFullName}(${item.vetFarm?.vetFarmMobile})',
|
||||
@@ -171,94 +173,99 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
||||
Get.bottomSheet(
|
||||
isDismissible: false,
|
||||
isScrollControlled: false,
|
||||
|
||||
BaseBottomSheet(
|
||||
height: 350.h,
|
||||
child: Column(
|
||||
children: [
|
||||
GridView.builder(
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 4,
|
||||
mainAxisSpacing: 8,
|
||||
crossAxisSpacing: 8,
|
||||
childAspectRatio: 1,
|
||||
),
|
||||
shrinkWrap: true,
|
||||
itemCount: 7,
|
||||
itemBuilder: (context, index) {
|
||||
return ObxValue((data) {
|
||||
if (index + 1 > data.length) {
|
||||
return GestureDetector(
|
||||
onTap: () async {
|
||||
await controller.pickImages();
|
||||
},
|
||||
child: Container(
|
||||
ObxValue((data) {
|
||||
return GridView.builder(
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 4,
|
||||
mainAxisSpacing: 8,
|
||||
crossAxisSpacing: 8,
|
||||
childAspectRatio: 1,
|
||||
),
|
||||
shrinkWrap: true,
|
||||
itemCount: controller.pickedImages.length + 1,
|
||||
itemBuilder: (context, index) {
|
||||
if (index + 1 < 7&& index == data.length) {
|
||||
return GestureDetector(
|
||||
onTap: () async {
|
||||
await controller.pickImages();
|
||||
},
|
||||
child: Container(
|
||||
width: 80.h,
|
||||
height: 80.h,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.lightGreyNormal,
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
Icons.add_a_photo,
|
||||
color: AppColor.lightGreyDarker,
|
||||
size: 32.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Container(
|
||||
width: 80.h,
|
||||
height: 80.h,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.lightGreyNormal,
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
),
|
||||
child: Center(
|
||||
child: Icon(
|
||||
Icons.camera_alt,
|
||||
color: AppColor.lightGreyDarker,
|
||||
size: 32.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Container(
|
||||
width: 80.h,
|
||||
height: 80.h,
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.lightGreyNormal,
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned.fill(
|
||||
child: Image.file(File(data[index].path), fit: BoxFit.cover),
|
||||
),
|
||||
child: Stack(
|
||||
children: [
|
||||
Positioned.fill(
|
||||
child: Image.file(File(data[index].path), fit: BoxFit.cover),
|
||||
),
|
||||
|
||||
Positioned(
|
||||
top: 4,
|
||||
left: 4,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
controller.removeImage(index);
|
||||
},
|
||||
child: Container(
|
||||
width: 24.w,
|
||||
height: 24.h,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
padding: EdgeInsets.all(4),
|
||||
decoration: ShapeDecoration(
|
||||
color: Colors.white.withValues(alpha: 0.80),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
Positioned(
|
||||
top: 4,
|
||||
left: 4,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
controller.removeImage(index);
|
||||
},
|
||||
child: Container(
|
||||
width: 24.w,
|
||||
height: 24.h,
|
||||
clipBehavior: Clip.antiAlias,
|
||||
padding: EdgeInsets.all(4),
|
||||
decoration: ShapeDecoration(
|
||||
color: Colors.white.withValues(alpha: 0.80),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Assets.vec.trashSvg.svg(
|
||||
width: 8.w,
|
||||
height: 8.h,
|
||||
colorFilter: ColorFilter.mode(
|
||||
AppColor.redNormal,
|
||||
BlendMode.srcIn,
|
||||
child: Assets.vec.trashSvg.svg(
|
||||
width: 8.w,
|
||||
height: 8.h,
|
||||
colorFilter: ColorFilter.mode(
|
||||
AppColor.redNormal,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}, controller.pickedImages);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}, );
|
||||
|
||||
SizedBox(height: 20),
|
||||
},controller.pickedImages),
|
||||
|
||||
SizedBox(height: 35.h),
|
||||
Text(
|
||||
'حداقل ۲ تصویر برای ثبت بازرسی لازم است',
|
||||
style: AppFonts.yekan12.copyWith(color: AppColor.textColor),
|
||||
),
|
||||
SizedBox(height: 8.h),
|
||||
Row(
|
||||
spacing: 16,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -292,10 +299,13 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
||||
}, controller.isOnUpload),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8.h),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
).whenComplete(() {
|
||||
controller.pickedImages.clear();
|
||||
},);
|
||||
}
|
||||
|
||||
Padding segmentWidget() {
|
||||
@@ -402,8 +412,6 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
||||
),
|
||||
|
||||
|
||||
|
||||
|
||||
],
|
||||
),
|
||||
Text(
|
||||
@@ -420,21 +428,23 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
||||
|
||||
buildRow(title: 'شماره مجوز جوجه ریزی', value: item.hatching?.licenceNumber ?? 'N/A'),
|
||||
buildUnitRow(
|
||||
title: 'حجم جوجه ریزی',
|
||||
value: item.hatching?.quantity.separatedByCommaFa ?? 'N/A',
|
||||
title: 'حجم جوجه ریزی',
|
||||
value: item.hatching?.quantity.separatedByCommaFa ?? 'N/A',
|
||||
|
||||
unit: '(قطعه)'
|
||||
),
|
||||
buildUnitRow(
|
||||
title: 'مانده در سالن',
|
||||
value: item.hatching?.leftOver.separatedByCommaFa ?? 'N/A',
|
||||
unit: '(قطعه)'
|
||||
),
|
||||
buildUnitRow(title: 'تلفات', value: item.hatching?.losses.separatedByCommaFa ?? 'N/A', unit: '(قطعه)'),
|
||||
buildUnitRow(
|
||||
title: 'مانده در سالن',
|
||||
value: item.hatching?.leftOver.separatedByCommaFa ?? 'N/A',
|
||||
unit: '(قطعه)'
|
||||
),
|
||||
buildUnitRow(title: 'تلفات',
|
||||
value: item.hatching?.losses.separatedByCommaFa ?? 'N/A',
|
||||
unit: '(قطعه)'),
|
||||
buildRow(
|
||||
title: 'دامپزشک فارم',
|
||||
value:
|
||||
'${item.hatching?.vetFarm?.vetFarmFullname}(${item.hatching?.vetFarm?.vetFarmMobile})',
|
||||
'${item.hatching?.vetFarm?.vetFarmFullname}(${item.hatching?.vetFarm?.vetFarmMobile})',
|
||||
),
|
||||
buildRow(
|
||||
title: 'شرح بازرسی',
|
||||
@@ -446,11 +456,13 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
||||
if (item.state == 'accepted') ...{
|
||||
Visibility(
|
||||
visible: item.realQuantityAi != null,
|
||||
child: buildRow(title: 'تعداد تاییده هوش مصنوعی', value: item.realQuantityAi.separatedByComma),
|
||||
child: buildRow(
|
||||
title: 'تعداد تاییده هوش مصنوعی', value: item.realQuantityAi.separatedByComma),
|
||||
),
|
||||
Visibility(
|
||||
visible: item.realQuantity != null,
|
||||
child: buildRow(title: 'تعداد تاییده', value: item.realQuantity.separatedByComma ?? '-'),
|
||||
child: buildRow(
|
||||
title: 'تعداد تاییده', value: item.realQuantity.separatedByComma ?? '-'),
|
||||
),
|
||||
},
|
||||
|
||||
@@ -494,17 +506,18 @@ class InspectionPoultrySciencePage extends GetView<InspectionPoultryScienceLogic
|
||||
mainAxisSpacing: 10,
|
||||
crossAxisSpacing: 10,
|
||||
),
|
||||
itemBuilder: (context, index) => Container(
|
||||
height: 100.h,
|
||||
clipBehavior: Clip.hardEdge,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
image: DecorationImage(
|
||||
image: NetworkImage(item.image?[index] ?? ''),
|
||||
fit: BoxFit.cover,
|
||||
itemBuilder: (context, index) =>
|
||||
Container(
|
||||
height: 100.h,
|
||||
clipBehavior: Clip.hardEdge,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(8.r),
|
||||
image: DecorationImage(
|
||||
image: NetworkImage(item.image?[index] ?? ''),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -26,11 +26,11 @@ class PoultryActionPage extends GetView<PoultryActionLogic> {
|
||||
return ObxValue((data) {
|
||||
return GridView.builder(
|
||||
physics: BouncingScrollPhysics(),
|
||||
padding: EdgeInsets.all(16),
|
||||
padding: EdgeInsets.symmetric(vertical: 18.h, horizontal: 32.w),
|
||||
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
mainAxisSpacing: 16.h,
|
||||
crossAxisSpacing: 16.w,
|
||||
mainAxisSpacing: 24.h,
|
||||
crossAxisSpacing: 24.w,
|
||||
),
|
||||
itemCount: data.length,
|
||||
hitTestBehavior: HitTestBehavior.opaque,
|
||||
|
||||
Reference in New Issue
Block a user