chore: clean up unused imports, update routing for authentication pages, and enhance UI components in the profile and captcha widgets
This commit is contained in:
@@ -2,6 +2,7 @@ import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
import 'package:rasadyar_livestock/features/auth/presentation/routes/pages.dart';
|
||||
import 'package:rasadyar_livestock/presentation/routes/app_pages.dart';
|
||||
|
||||
import 'logic.dart';
|
||||
@@ -84,7 +85,10 @@ class ProfilePage extends GetView<ProfileLogic> {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 30, vertical: 10),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 30,
|
||||
vertical: 10,
|
||||
),
|
||||
child: userProfileInformation(),
|
||||
),
|
||||
),
|
||||
@@ -99,18 +103,27 @@ class ProfilePage extends GetView<ProfileLogic> {
|
||||
title: 'تغییر رمز عبور',
|
||||
selected: true,
|
||||
onPressed: () {
|
||||
Get.bottomSheet(changePasswordBottomSheet(), isScrollControlled: true);
|
||||
Get.bottomSheet(
|
||||
changePasswordBottomSheet(),
|
||||
isScrollControlled: true,
|
||||
);
|
||||
},
|
||||
icon: Assets.vec.lockSvg.path,
|
||||
),
|
||||
cardActionWidget(
|
||||
title: 'خروج',
|
||||
selected: true,
|
||||
color: ColorFilter.mode(Colors.redAccent, BlendMode.srcIn),
|
||||
color: ColorFilter.mode(
|
||||
Colors.redAccent,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
cardColor: Color(0xFFEFEFEF),
|
||||
textColor: AppColor.redDarkerText,
|
||||
onPressed: () {
|
||||
Get.bottomSheet(exitBottomSheet(), isScrollControlled: true);
|
||||
Get.bottomSheet(
|
||||
exitBottomSheet(),
|
||||
isScrollControlled: true,
|
||||
);
|
||||
},
|
||||
icon: Assets.vec.logoutSvg.path,
|
||||
),
|
||||
@@ -157,7 +170,9 @@ class ProfilePage extends GetView<ProfileLogic> {
|
||||
children: [
|
||||
Text(
|
||||
'اطلاعات هویتی',
|
||||
style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal),
|
||||
style: AppFonts.yekan16Bold.copyWith(
|
||||
color: AppColor.blueNormal,
|
||||
),
|
||||
),
|
||||
Container(width: 37.w, height: 1.h, color: AppColor.greenNormal),
|
||||
],
|
||||
@@ -199,7 +214,11 @@ class ProfilePage extends GetView<ProfileLogic> {
|
||||
content: /*item.province ??*/ 'نامشخص',
|
||||
icon: Assets.vec.pictureFrameSvg.path,
|
||||
),
|
||||
itemList(title: 'شهر', content: /* item.city ?? */ 'نامشخص', icon: Assets.vec.mapSvg.path),
|
||||
itemList(
|
||||
title: 'شهر',
|
||||
content: /* item.city ?? */ 'نامشخص',
|
||||
icon: Assets.vec.mapSvg.path,
|
||||
),
|
||||
],
|
||||
);
|
||||
/* return ObxValue((data) {
|
||||
@@ -300,12 +319,25 @@ class ProfilePage extends GetView<ProfileLogic> {
|
||||
child: SvgGenImage.vec(icon).svg(
|
||||
width: 20.w,
|
||||
height: 20.h,
|
||||
colorFilter: ColorFilter.mode(AppColor.mediumGreyNormalActive, BlendMode.srcIn),
|
||||
colorFilter: ColorFilter.mode(
|
||||
AppColor.mediumGreyNormalActive,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
),
|
||||
Text(title, style: AppFonts.yekan12.copyWith(color: AppColor.mediumGreyNormalActive)),
|
||||
Text(
|
||||
title,
|
||||
style: AppFonts.yekan12.copyWith(
|
||||
color: AppColor.mediumGreyNormalActive,
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Text(content, style: AppFonts.yekan13.copyWith(color: AppColor.mediumGreyNormalHover)),
|
||||
Text(
|
||||
content,
|
||||
style: AppFonts.yekan13.copyWith(
|
||||
color: AppColor.mediumGreyNormalHover,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
@@ -330,7 +362,9 @@ class ProfilePage extends GetView<ProfileLogic> {
|
||||
padding: EdgeInsets.all(8),
|
||||
decoration: ShapeDecoration(
|
||||
color: cardColor ?? AppColor.blueLight,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
child: SvgGenImage.vec(icon).svg(
|
||||
width: 40,
|
||||
@@ -347,7 +381,9 @@ class ProfilePage extends GetView<ProfileLogic> {
|
||||
Text(
|
||||
title,
|
||||
style: AppFonts.yekan10.copyWith(
|
||||
color: textColor ?? (selected ? AppColor.blueNormal : AppColor.blueLightActive),
|
||||
color:
|
||||
textColor ??
|
||||
(selected ? AppColor.blueNormal : AppColor.blueLightActive),
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
@@ -365,7 +401,9 @@ class ProfilePage extends GetView<ProfileLogic> {
|
||||
children: [
|
||||
Text(
|
||||
'ویرایش اطلاعات هویتی',
|
||||
style: AppFonts.yekan16Bold.copyWith(color: AppColor.darkGreyDarkHover),
|
||||
style: AppFonts.yekan16Bold.copyWith(
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
),
|
||||
|
||||
Container(
|
||||
@@ -437,7 +475,9 @@ class ProfilePage extends GetView<ProfileLogic> {
|
||||
children: [
|
||||
Text(
|
||||
'عکس پروفایل',
|
||||
style: AppFonts.yekan16Bold.copyWith(color: AppColor.blueNormal),
|
||||
style: AppFonts.yekan16Bold.copyWith(
|
||||
color: AppColor.blueNormal,
|
||||
),
|
||||
),
|
||||
ObxValue((data) {
|
||||
return Container(
|
||||
@@ -446,15 +486,26 @@ class ProfilePage extends GetView<ProfileLogic> {
|
||||
decoration: BoxDecoration(
|
||||
color: AppColor.lightGreyNormal,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(width: 1, color: AppColor.blackLight),
|
||||
border: Border.all(
|
||||
width: 1,
|
||||
color: AppColor.blackLight,
|
||||
),
|
||||
),
|
||||
child: Center(
|
||||
child: data.value == null
|
||||
? Padding(
|
||||
padding: const EdgeInsets.fromLTRB(30, 10, 10, 30),
|
||||
padding: const EdgeInsets.fromLTRB(
|
||||
30,
|
||||
10,
|
||||
10,
|
||||
30,
|
||||
),
|
||||
child: Image.network(''),
|
||||
)
|
||||
: Image.file(File(data.value!.path), fit: BoxFit.cover),
|
||||
: Image.file(
|
||||
File(data.value!.path),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
);
|
||||
}, controller.selectedImage),
|
||||
@@ -467,14 +518,18 @@ class ProfilePage extends GetView<ProfileLogic> {
|
||||
text: 'گالری',
|
||||
width: 150.w,
|
||||
height: 40.h,
|
||||
textStyle: AppFonts.yekan20.copyWith(color: Colors.white),
|
||||
textStyle: AppFonts.yekan20.copyWith(
|
||||
color: Colors.white,
|
||||
),
|
||||
onPressed: () async {
|
||||
controller.selectedImage.value = await controller.imagePicker.pickImage(
|
||||
source: ImageSource.gallery,
|
||||
imageQuality: 60,
|
||||
maxWidth: 1080,
|
||||
maxHeight: 720,
|
||||
);
|
||||
controller.selectedImage.value = await controller
|
||||
.imagePicker
|
||||
.pickImage(
|
||||
source: ImageSource.gallery,
|
||||
imageQuality: 60,
|
||||
maxWidth: 1080,
|
||||
maxHeight: 720,
|
||||
);
|
||||
},
|
||||
),
|
||||
SizedBox(width: 16),
|
||||
@@ -482,14 +537,18 @@ class ProfilePage extends GetView<ProfileLogic> {
|
||||
text: 'دوربین',
|
||||
width: 150.w,
|
||||
height: 40.h,
|
||||
textStyle: AppFonts.yekan20.copyWith(color: AppColor.blueNormal),
|
||||
textStyle: AppFonts.yekan20.copyWith(
|
||||
color: AppColor.blueNormal,
|
||||
),
|
||||
onPressed: () async {
|
||||
controller.selectedImage.value = await controller.imagePicker.pickImage(
|
||||
source: ImageSource.camera,
|
||||
imageQuality: 60,
|
||||
maxWidth: 1080,
|
||||
maxHeight: 720,
|
||||
);
|
||||
controller.selectedImage.value = await controller
|
||||
.imagePicker
|
||||
.pickImage(
|
||||
source: ImageSource.camera,
|
||||
imageQuality: 60,
|
||||
maxWidth: 1080,
|
||||
maxHeight: 720,
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
@@ -568,7 +627,9 @@ class ProfilePage extends GetView<ProfileLogic> {
|
||||
children: [
|
||||
Text(
|
||||
'تغییر رمز عبور',
|
||||
style: AppFonts.yekan16Bold.copyWith(color: AppColor.darkGreyDarkHover),
|
||||
style: AppFonts.yekan16Bold.copyWith(
|
||||
color: AppColor.darkGreyDarkHover,
|
||||
),
|
||||
),
|
||||
SizedBox(),
|
||||
RTextField(
|
||||
@@ -664,7 +725,10 @@ class ProfilePage extends GetView<ProfileLogic> {
|
||||
child: Column(
|
||||
spacing: 8,
|
||||
children: [
|
||||
Text('خروج', style: AppFonts.yekan16Bold.copyWith(color: AppColor.error)),
|
||||
Text(
|
||||
'خروج',
|
||||
style: AppFonts.yekan16Bold.copyWith(color: AppColor.error),
|
||||
),
|
||||
SizedBox(),
|
||||
Text(
|
||||
'آیا مطمئن هستید که میخواهید از حساب کاربری خود خارج شوید؟',
|
||||
@@ -687,7 +751,10 @@ class ProfilePage extends GetView<ProfileLogic> {
|
||||
.deleteModuleTokens(Module.liveStocks)
|
||||
.then((value) {
|
||||
Get.back();
|
||||
Get.offAllNamed(LiveStockRoutes.auth, arguments: Module.chicken);
|
||||
Get.offAllNamed(
|
||||
AuthLiveStockRoutes.auth,
|
||||
arguments: Module.liveStocks,
|
||||
);
|
||||
});
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user