feat : ui change's like
1 - logout icon's color 2 - profile itemList change color 3 - change empty icon and vec 4 - reset nested navigation when change main page's changed
This commit is contained in:
@@ -16,145 +16,149 @@ class HomePage extends GetView<HomeLogic> {
|
||||
return Scaffold(
|
||||
backgroundColor: AppColor.bgLight,
|
||||
appBar: chickenAppBar(hasBack: false, hasFilter: false, hasSearch: false),
|
||||
body: Column(
|
||||
spacing: 8,
|
||||
children: [
|
||||
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)),
|
||||
body: SingleChildScrollView(
|
||||
physics: BouncingScrollPhysics(),
|
||||
child: Column(
|
||||
spacing: 8,
|
||||
children: [
|
||||
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),
|
||||
),
|
||||
|
||||
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),
|
||||
),
|
||||
),
|
||||
|
||||
WidelyUsedWidget(),
|
||||
],
|
||||
|
||||
WidelyUsedWidget(),
|
||||
SizedBox(height: 20,)
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -288,13 +292,18 @@ class HomePage extends GetView<HomeLogic> {
|
||||
Expanded(
|
||||
child: ObxValue(
|
||||
(data) => _informationLabelCard(
|
||||
title: 'بارهای امروز',
|
||||
title: 'بارهای امروز',
|
||||
titleColor: AppColor.blueNormal,
|
||||
isLoading: data.value == null,
|
||||
description: data.value?.separatedByComma ?? '0',
|
||||
iconPath: Assets.vec.cubeSearchSvg.path,
|
||||
iconColor: AppColor.blueNormal,
|
||||
bgDescriptionColor: Colors.white,
|
||||
bgLabelColor: Color(0xFFEAEFFF),
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [AppColor.blueLight, Colors.white],
|
||||
),
|
||||
),
|
||||
controller.totalWeightTodayBars,
|
||||
),
|
||||
@@ -305,30 +314,35 @@ class HomePage extends GetView<HomeLogic> {
|
||||
return _informationLabelCard(
|
||||
title: 'درانتظار تایید',
|
||||
isLoading: data.value == null,
|
||||
description: '(${data.value?.totalNotEnteredBars.separatedByComma ?? '0'})',
|
||||
unit: '(${data.value?.totalNotEnteredKillHouseRequestsWeight.separatedByComma})کیلوگرم',
|
||||
iconPath: Assets.vec.cubeRotateSvg.path,
|
||||
iconColor: Color(0xFF8F4124),
|
||||
bgLabelColor: Color(0xFFF59770),
|
||||
bgDescriptionColor: Color(0xFFF6DFD8),
|
||||
description: data.value?.totalNotEnteredBars.separatedByComma ?? '0',
|
||||
unit:
|
||||
'(${data.value?.totalNotEnteredKillHouseRequestsWeight.separatedByComma})\nکیلوگرم',
|
||||
iconPath: Assets.vec.cubeWattingSvg.path,
|
||||
bgDescriptionColor: Colors.white,
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [const Color(0xFFFFE7BB), Colors.white],
|
||||
),
|
||||
);
|
||||
}, controller.barInformation),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
Container _informationLabelCard({
|
||||
required String title,
|
||||
required String description,
|
||||
required String iconPath,
|
||||
required Color bgDescriptionColor,
|
||||
String unit = 'کیلوگرم',
|
||||
bool isLoading = false,
|
||||
required String iconPath,
|
||||
required Color iconColor,
|
||||
required Color bgDescriptionColor,
|
||||
required Color bgLabelColor,
|
||||
Color? iconColor,
|
||||
Color? titleColor,
|
||||
Color? bgLabelColor,
|
||||
LinearGradient? gradient,
|
||||
}) {
|
||||
return Container(
|
||||
height: 82,
|
||||
@@ -341,11 +355,12 @@ class HomePage extends GetView<HomeLogic> {
|
||||
child: Container(
|
||||
height: 82,
|
||||
decoration: BoxDecoration(
|
||||
color: bgLabelColor,
|
||||
color: gradient == null ? bgLabelColor : null,
|
||||
borderRadius: BorderRadius.only(
|
||||
topRight: Radius.circular(8),
|
||||
bottomRight: Radius.circular(8),
|
||||
),
|
||||
gradient: gradient,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
@@ -354,12 +369,16 @@ class HomePage extends GetView<HomeLogic> {
|
||||
SvgGenImage.vec(iconPath).svg(
|
||||
width: 24,
|
||||
height: 24,
|
||||
colorFilter: ColorFilter.mode(iconColor, BlendMode.srcIn),
|
||||
colorFilter: iconColor != null
|
||||
? ColorFilter.mode(iconColor, BlendMode.srcIn)
|
||||
: null,
|
||||
),
|
||||
Text(
|
||||
title,
|
||||
textAlign: TextAlign.right,
|
||||
style: AppFonts.yekan14.copyWith(color: AppColor.mediumGreyDarkActive),
|
||||
style: AppFonts.yekan14.copyWith(
|
||||
color: titleColor ?? AppColor.mediumGreyDarkActive,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user