fix : ui bug
This commit is contained in:
@@ -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),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user