fix: ui changes steward
This commit is contained in:
@@ -17,140 +17,136 @@ class HomePage extends GetView<HomeLogic> {
|
||||
scrollable: true,
|
||||
isBase: true,
|
||||
widgets: [
|
||||
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: ObxValue((data) {
|
||||
return AnimatedSize(
|
||||
duration: Duration(milliseconds: 300),
|
||||
child: data.value
|
||||
? Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
spacing: 8,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: ShapeDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(Assets.images.chicken.path),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(width: 0.25, color: const Color(0xFFB0B0B0)),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'مرغ گرم',
|
||||
textAlign: TextAlign.right,
|
||||
style: AppFonts.yekan16.copyWith(
|
||||
color: AppColor.darkGreyDarkActive,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
AnimatedRotation(
|
||||
turns: 180,
|
||||
duration: Duration(milliseconds: 3000),
|
||||
child: Icon(CupertinoIcons.chevron_up, size: 18),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
_todayShipmentWidget(),
|
||||
|
||||
_inventoryWidget(),
|
||||
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'اطلاعات بارها',
|
||||
textAlign: TextAlign.right,
|
||||
style: AppFonts.yekan16,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
_informationShipment(),
|
||||
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'اطلاعات توزیع',
|
||||
textAlign: TextAlign.right,
|
||||
style: AppFonts.yekan16,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
distributionInformationWidget(),
|
||||
],
|
||||
),
|
||||
)
|
||||
: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
spacing: 8,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
width: 40,
|
||||
height: 40,
|
||||
decoration: ShapeDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(Assets.images.chicken.path),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(width: 0.25, color: const Color(0xFFB0B0B0)),
|
||||
borderRadius: BorderRadius.circular(4),
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'مرغ گرم',
|
||||
textAlign: TextAlign.right,
|
||||
style: AppFonts.yekan16.copyWith(
|
||||
color: AppColor.darkGreyDarkActive,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Icon(CupertinoIcons.chevron_down, size: 18),
|
||||
],
|
||||
),
|
||||
_todayShipmentWidget(),
|
||||
_inventoryWidget(),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}, controller.isExpanded),
|
||||
),
|
||||
),
|
||||
|
||||
SizedBox(height: 8.h),
|
||||
mainInformation(),
|
||||
SizedBox(height: 8.h),
|
||||
WidelyUsedWidget(),
|
||||
SizedBox(height: 20),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
InkWell mainInformation() {
|
||||
return InkWell(
|
||||
onTap: () {
|
||||
controller.isExpanded.value = !controller.isExpanded.value;
|
||||
},
|
||||
|
||||
child: Stack(
|
||||
clipBehavior: Clip.none,
|
||||
children: [
|
||||
Container(
|
||||
margin: EdgeInsetsGeometry.all(6),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
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
|
||||
? Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
spacing: 8,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
AnimatedRotation(
|
||||
turns: 180,
|
||||
duration: Duration(milliseconds: 3000),
|
||||
child: Icon(CupertinoIcons.chevron_up, size: 18),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
_todayShipmentWidget(),
|
||||
|
||||
_inventoryWidget(),
|
||||
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'اطلاعات بارها',
|
||||
textAlign: TextAlign.right,
|
||||
style: AppFonts.yekan16,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
_informationShipment(),
|
||||
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
'اطلاعات توزیع',
|
||||
textAlign: TextAlign.right,
|
||||
style: AppFonts.yekan16,
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
distributionInformationWidget(),
|
||||
],
|
||||
),
|
||||
)
|
||||
: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Row(
|
||||
spacing: 8,
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Icon(CupertinoIcons.chevron_down, size: 18),
|
||||
],
|
||||
),
|
||||
_todayShipmentWidget(),
|
||||
_inventoryWidget(),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}, controller.isExpanded),
|
||||
),
|
||||
Positioned(
|
||||
top: -10,
|
||||
right: 20,
|
||||
child: Container(
|
||||
height: 32.h,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(width: 0.50, color: const Color(0xFFA9A9A9)),
|
||||
),
|
||||
padding: EdgeInsets.symmetric(horizontal: 8),
|
||||
child: Row(
|
||||
spacing: 8,
|
||||
children: [
|
||||
Assets.vec.chicken2Svg.svg(
|
||||
width: 24.w,
|
||||
height: 24.h,
|
||||
colorFilter: ColorFilter.mode(AppColor.blueDark, BlendMode.srcIn),
|
||||
),
|
||||
Text(
|
||||
'اطلاعات مرغ گرم',
|
||||
textAlign: TextAlign.right,
|
||||
style: AppFonts.yekan16Bold.copyWith(color: AppColor.iconColor),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget distributionInformationWidget() {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.fromLTRB(0, 8, 0, 13),
|
||||
|
||||
Reference in New Issue
Block a user