fix: profile ui fix
This commit is contained in:
@@ -72,13 +72,7 @@ class ProfilePage extends GetView<ProfileLogic> {
|
|||||||
spacing: 16,
|
spacing: 16,
|
||||||
children: [
|
children: [
|
||||||
rolesWidget(),
|
rolesWidget(),
|
||||||
|
SizedBox(height: 320.h, child: userProfileInformation()),
|
||||||
Expanded(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 30, vertical: 10),
|
|
||||||
child: userProfileInformation(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
|
|
||||||
Center(
|
Center(
|
||||||
child: Wrap(
|
child: Wrap(
|
||||||
@@ -89,6 +83,8 @@ class ProfilePage extends GetView<ProfileLogic> {
|
|||||||
cardActionWidget(
|
cardActionWidget(
|
||||||
title: 'تغییر رمز عبور',
|
title: 'تغییر رمز عبور',
|
||||||
selected: true,
|
selected: true,
|
||||||
|
cardColor:AppColor.blueLightActive,
|
||||||
|
cardIconColor: AppColor.blueNormal,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Get.bottomSheet(changePasswordBottomSheet(), isScrollControlled: true);
|
Get.bottomSheet(changePasswordBottomSheet(), isScrollControlled: true);
|
||||||
},
|
},
|
||||||
@@ -97,8 +93,8 @@ class ProfilePage extends GetView<ProfileLogic> {
|
|||||||
cardActionWidget(
|
cardActionWidget(
|
||||||
title: 'خروج',
|
title: 'خروج',
|
||||||
selected: true,
|
selected: true,
|
||||||
color: ColorFilter.mode(Colors.redAccent, BlendMode.srcIn),
|
cardColor: Color(0xFFF6BDBD),
|
||||||
cardColor: Color(0xFFEFEFEF),
|
cardIconColor: Color(0xFFEB5757),
|
||||||
textColor: AppColor.redDarkerText,
|
textColor: AppColor.redDarkerText,
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
Get.bottomSheet(exitBottomSheet(), isScrollControlled: true);
|
Get.bottomSheet(exitBottomSheet(), isScrollControlled: true);
|
||||||
@@ -138,66 +134,105 @@ class ProfilePage extends GetView<ProfileLogic> {
|
|||||||
return ErrorWidget('خطا در دریافت اطلاعات کاربر');
|
return ErrorWidget('خطا در دریافت اطلاعات کاربر');
|
||||||
} else if (data.value.status == ResourceStatus.success) {
|
} else if (data.value.status == ResourceStatus.success) {
|
||||||
UserProfile item = data.value.data!;
|
UserProfile item = data.value.data!;
|
||||||
return Column(
|
return Stack(
|
||||||
spacing: 6,
|
clipBehavior: Clip.none,
|
||||||
children: [
|
children: [
|
||||||
buildRowOnTapped(
|
Positioned.fill(
|
||||||
onTap: () {
|
child: Container(
|
||||||
Get.bottomSheet(
|
margin: const EdgeInsets.symmetric(horizontal: 8, vertical: 10),
|
||||||
userInformationBottomSheet(),
|
padding: EdgeInsets.symmetric(horizontal: 11.h, vertical: 8.h),
|
||||||
isScrollControlled: true,
|
decoration: BoxDecoration(
|
||||||
ignoreSafeArea: false,
|
color: Colors.white,
|
||||||
);
|
borderRadius: BorderRadius.circular(8),
|
||||||
},
|
border: Border.all(width: 0.5, color: AppColor.darkGreyLight),
|
||||||
titleWidget: Column(
|
),
|
||||||
spacing: 3,
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
spacing: 6,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Row(
|
||||||
'اطلاعات هویتی',
|
mainAxisAlignment: MainAxisAlignment.end,
|
||||||
style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal),
|
children: [
|
||||||
),
|
GestureDetector(
|
||||||
Container(width: 37.w, height: 1.h, color: AppColor.greenNormal),
|
onTap: () {
|
||||||
],
|
Get.bottomSheet(
|
||||||
),
|
userInformationBottomSheet(),
|
||||||
valueWidget: Assets.vec.editSvg.svg(
|
isScrollControlled: true,
|
||||||
width: 24.w,
|
ignoreSafeArea: false,
|
||||||
height: 24.h,
|
);
|
||||||
colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
|
},
|
||||||
|
child: Assets.vec.editSvg.svg(
|
||||||
|
width: 24.w,
|
||||||
|
height: 24.h,
|
||||||
|
colorFilter: ColorFilter.mode(AppColor.blueNormal, BlendMode.srcIn),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 8.0),
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
itemList(
|
||||||
|
title: 'نام و نام خانوادگی',
|
||||||
|
content: item.fullname ?? 'نامشخص',
|
||||||
|
icon: Assets.vec.userSvg.path,
|
||||||
|
hasColoredBox: true,
|
||||||
|
),
|
||||||
|
itemList(
|
||||||
|
title: 'موبایل',
|
||||||
|
content: item.mobile ?? 'نامشخص',
|
||||||
|
icon: Assets.vec.callSvg.path,
|
||||||
|
),
|
||||||
|
itemList(
|
||||||
|
title: 'کدملی',
|
||||||
|
content: item.nationalId ?? 'نامشخص',
|
||||||
|
icon: Assets.vec.tagUserSvg.path,
|
||||||
|
),
|
||||||
|
itemList(
|
||||||
|
title: 'شماره شناسنامه',
|
||||||
|
content: item.nationalCode ?? 'نامشخص',
|
||||||
|
icon: Assets.vec.userSquareSvg.path,
|
||||||
|
),
|
||||||
|
itemList(
|
||||||
|
title: 'تاریخ تولد',
|
||||||
|
content: item.birthday?.toJalali.formatCompactDate() ?? 'نامشخص',
|
||||||
|
icon: Assets.vec.calendarSvg.path,
|
||||||
|
),
|
||||||
|
itemList(
|
||||||
|
title: 'استان',
|
||||||
|
content: item.province ?? 'نامشخص',
|
||||||
|
icon: Assets.vec.pictureFrameSvg.path,
|
||||||
|
),
|
||||||
|
itemList(
|
||||||
|
title: 'شهر',
|
||||||
|
content: item.city ?? 'نامشخص',
|
||||||
|
icon: Assets.vec.mapSvg.path,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
itemList(
|
|
||||||
title: 'نام و نام خانوادگی',
|
Positioned(
|
||||||
content: item.fullname ?? 'نامشخص',
|
right: 16,
|
||||||
icon: Assets.vec.userSvg.path,
|
top: -7,
|
||||||
hasColoredBox: true,
|
child: Container(
|
||||||
|
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
border: Border.all(width: 0.5, color: Color(0xFFA9A9A9)),
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
'اطلاعات هویتی',
|
||||||
|
style: AppFonts.yekan16.copyWith(color: AppColor.iconColor),
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
itemList(
|
|
||||||
title: 'موبایل',
|
|
||||||
content: item.mobile ?? 'نامشخص',
|
|
||||||
icon: Assets.vec.callSvg.path,
|
|
||||||
),
|
|
||||||
itemList(
|
|
||||||
title: 'کدملی',
|
|
||||||
content: item.nationalId ?? 'نامشخص',
|
|
||||||
icon: Assets.vec.tagUserSvg.path,
|
|
||||||
),
|
|
||||||
itemList(
|
|
||||||
title: 'شماره شناسنامه',
|
|
||||||
content: item.nationalCode ?? 'نامشخص',
|
|
||||||
icon: Assets.vec.userSquareSvg.path,
|
|
||||||
),
|
|
||||||
itemList(
|
|
||||||
title: 'تاریخ تولد',
|
|
||||||
content: item.birthday?.toJalali.formatCompactDate() ?? 'نامشخص',
|
|
||||||
icon: Assets.vec.calendarSvg.path,
|
|
||||||
),
|
|
||||||
itemList(
|
|
||||||
title: 'استان',
|
|
||||||
content: item.province ?? 'نامشخص',
|
|
||||||
icon: Assets.vec.pictureFrameSvg.path,
|
|
||||||
),
|
|
||||||
itemList(title: 'شهر', content: item.city ?? 'نامشخص', icon: Assets.vec.mapSvg.path),
|
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
@@ -246,6 +281,7 @@ class ProfilePage extends GetView<ProfileLogic> {
|
|||||||
bool selected = false,
|
bool selected = false,
|
||||||
ColorFilter? color,
|
ColorFilter? color,
|
||||||
Color? cardColor,
|
Color? cardColor,
|
||||||
|
Color? cardIconColor,
|
||||||
Color? textColor,
|
Color? textColor,
|
||||||
}) {
|
}) {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
@@ -254,22 +290,24 @@ class ProfilePage extends GetView<ProfileLogic> {
|
|||||||
spacing: 4,
|
spacing: 4,
|
||||||
children: [
|
children: [
|
||||||
Container(
|
Container(
|
||||||
width: 52,
|
width: 52.w,
|
||||||
height: 52,
|
height: 52.h,
|
||||||
padding: EdgeInsets.all(8),
|
padding: EdgeInsets.all(6),
|
||||||
decoration: ShapeDecoration(
|
decoration: ShapeDecoration(
|
||||||
color: cardColor ?? AppColor.blueLight,
|
color: cardColor ?? AppColor.blueLight,
|
||||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||||
),
|
),
|
||||||
child: SvgGenImage.vec(icon).svg(
|
child: Container(
|
||||||
width: 40,
|
padding: EdgeInsets.all(4),
|
||||||
height: 40,
|
decoration: BoxDecoration(
|
||||||
colorFilter:
|
color:cardIconColor,
|
||||||
color ??
|
borderRadius: BorderRadius.circular(8),
|
||||||
ColorFilter.mode(
|
),
|
||||||
selected ? AppColor.blueNormal : AppColor.whiteLight,
|
child: SvgGenImage.vec(icon).svg(
|
||||||
BlendMode.srcIn,
|
width: 40.w,
|
||||||
),
|
height: 40.h,
|
||||||
|
colorFilter: color ?? ColorFilter.mode(Colors.white, BlendMode.srcIn),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(height: 2),
|
SizedBox(height: 2),
|
||||||
@@ -460,7 +498,6 @@ class ProfilePage extends GetView<ProfileLogic> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Widget changePasswordBottomSheet() {
|
Widget changePasswordBottomSheet() {
|
||||||
return BaseBottomSheet(
|
return BaseBottomSheet(
|
||||||
height: 400.h,
|
height: 400.h,
|
||||||
@@ -631,13 +668,11 @@ class ProfilePage extends GetView<ProfileLogic> {
|
|||||||
children: List.generate(item?.length ?? 0, (index) {
|
children: List.generate(item?.length ?? 0, (index) {
|
||||||
Map tmpRole = getFaUserRoleWithOnTap(item?[index]);
|
Map tmpRole = getFaUserRoleWithOnTap(item?[index]);
|
||||||
return CustomChip(
|
return CustomChip(
|
||||||
isSelected:
|
isSelected: controller.gService.getRoute(Module.chicken) == tmpRole.values.first,
|
||||||
controller.gService.getRoute(Module.chicken) == tmpRole.values.first,
|
|
||||||
title: tmpRole.keys.first,
|
title: tmpRole.keys.first,
|
||||||
index: index,
|
index: index,
|
||||||
onTap: (int p1) {
|
onTap: (int p1) {
|
||||||
controller.changeUserRole(tmpRole.values.first);
|
controller.changeUserRole(tmpRole.values.first);
|
||||||
|
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user