feat:修改鑫泓佳修改昵称/修改手机号/邮箱/重置密码/安全问题/设置/关于

This commit is contained in:
anfe 2024-04-30 10:55:48 +08:00
parent 7db613f5d7
commit aa4e741674
7 changed files with 240 additions and 102 deletions

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccount/mineUnbindPhoneOrEmail_logic.dart';
import 'package:star_lock/tools/tf_input_haveBorder.dart';
@ -26,10 +27,20 @@ class _MineUnbindPhoneOrEmailState extends State<MineUnbindPhoneOrEmailPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: Column(
children: [
Container(

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditAccount/minePersonInfoEditAccountNext/minePersonInfoEditAccountNext_logic.dart';
import '../../../../app_settings/app_colors.dart';
import '../../../../tools/submitBtn.dart';
@ -25,10 +26,20 @@ class _MinePersonInfoEditAccountNextPageState
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.modifyAccount!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: Column(
children: [
Container(

View File

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEditName/MinePersonInfoEditName_logic.dart';
import '../../../app_settings/app_colors.dart';
@ -25,45 +26,89 @@ class _MinePersonInfoEditNamePageState
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
appBar: TitleAppBar(
barTitle: TranslationLoader.lanKeys!.changeNickName!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
TextButton(
child: Text(
TranslationLoader.lanKeys!.save!.tr,
style: TextStyle(color: Colors.white, fontSize: 24.sp),
backgroundColor: AppColors.greyBackgroundColor,
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.changeNickName!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor,
actionsList: [
TextButton(
child: Text(
TranslationLoader.lanKeys!.save!.tr,
style: TextStyle(color: Colors.white, fontSize: 24.sp),
),
onPressed: () {
if (state.nickNameIsOK == false) {
logic.showToast("请输入昵称");
} else {
logic.updateUserInfoRequest();
}
},
),
onPressed: () {
if (state.nickNameIsOK == false) {
logic.showToast("请输入昵称");
} else {
logic.updateUserInfoRequest();
}
},
),
],
],
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.changeNickName!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
actionsList: [
TextButton(
child: Text(
TranslationLoader.lanKeys!.save!.tr,
style:
TextStyle(color: AppColors.blackColor, fontSize: 24.sp),
),
onPressed: () {
if (state.nickNameIsOK == false) {
logic.showToast("请输入昵称");
} else {
logic.updateUserInfoRequest();
}
},
),
],
),
),
body: Container(
padding: EdgeInsets.all(15.w),
child: Column(
children: [
LoginInput(
controller: state.nickNameController,
onchangeAction: (textStr) {
logic.checkNext(state.nickNameController);
},
isPwd: false,
leftWidget: SizedBox(width: 15.w),
hintText:
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.nickName!.tr}",
inputFormatters: [
LengthLimitingTextInputFormatter(20),
]),
],
),
child: listView(),
));
}
Widget listView() {
Widget view = Column(
mainAxisSize: MainAxisSize.min,
children: [
LoginInput(
controller: state.nickNameController,
onchangeAction: (textStr) {
logic.checkNext(state.nickNameController);
},
isPwd: false,
leftWidget: SizedBox(width: 15.w),
hintText:
"${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.nickName!.tr}",
inputFormatters: [
LengthLimitingTextInputFormatter(20),
]),
],
);
view = F.sw(
defaultCall: () => view,
xhjCall: () => Container(
margin: EdgeInsets.only(top: 20.h, left: 16.w, right: 16.w),
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 16.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(20.r))),
child: ClipRRect(
borderRadius: BorderRadius.circular(20.r),
child: view,
),
));
return view;
}
}

View File

@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoEmail/mineBindPhoneOrEmail_logic.dart';
import '../../../appRouters.dart';
@ -28,12 +29,24 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: state.channel.value == "1"
? TranslationLoader.lanKeys!.mobileNumber!.tr
: TranslationLoader.lanKeys!.email!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: state.channel.value == "1"
? TranslationLoader.lanKeys!.mobileNumber!.tr
: TranslationLoader.lanKeys!.email!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: Container(
color: Colors.white,
padding: EdgeInsets.only(top: 10.h, left: 30.w, right: 30.w),
@ -58,11 +71,12 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
rightWidget: Text(
'${state.countryName.value} +${state.countryCode.value}',
textAlign: TextAlign.end,
style:
TextStyle(fontSize: 22.sp, color: AppColors.darkGrayTextColor),
style: TextStyle(
fontSize: 22.sp, color: AppColors.darkGrayTextColor),
),
action: () async {
var result = await Get.toNamed(Routers.selectCountryRegionPage);
var result =
await Get.toNamed(Routers.selectCountryRegionPage);
if (result != null) {
result as Map<String, dynamic>;
state.countryCode.value = result['code'];
@ -105,7 +119,8 @@ class _MineBindPhoneOrEmailPageState extends State<MineBindPhoneOrEmailPage> {
),
Obx(() => GestureDetector(
onTap: () {
if (state.accountIsOK.value && state.canResend.value) {
if (state.accountIsOK.value &&
state.canResend.value) {
logic.sendValidationCode();
}
},

View File

@ -1,8 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoResetPassword/minePersonInfoResetPassword_logic.dart';
import '../../../appRouters.dart';
@ -29,64 +29,25 @@ class _MinePersonInfoResetPasswordPageState
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.resetPasswords!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.resetPasswords!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: Container(
margin: EdgeInsets.only(left: 30.w, right: 30.w),
child: Column(
children: [
LoginInput(
controller: state.oldPwdController,
onchangeAction: (textStr) {
logic.changeInput(state.oldPwdController);
},
isPwd: true,
leftWidget: Text(
"${TranslationLoader.lanKeys!.originalPassword!.tr} ",
style: TextStyle(fontSize: 22.sp),
),
hintText: "",
inputFormatters: [
LengthLimitingTextInputFormatter(20),
]),
LoginInput(
controller: state.newPwdController,
onchangeAction: (textStr) {
logic.changeInput(state.newPwdController);
},
isPwd: true,
leftWidget: Text(
"${TranslationLoader.lanKeys!.newPassword!.tr} ",
style: TextStyle(fontSize: 22.sp),
),
hintText: "",
inputFormatters: [
LengthLimitingTextInputFormatter(20),
]),
LoginInput(
controller: state.surePwdController,
onchangeAction: (textStr) {
logic.changeInput(state.surePwdController);
},
isPwd: true,
// isHaveLeftWidget: false,
leftWidget: Text(
"${TranslationLoader.lanKeys!.surePassword!.tr} ",
style: TextStyle(fontSize: 22.sp),
),
hintText: "",
inputFormatters: [
LengthLimitingTextInputFormatter(20),
]),
Container(
width: 1.sw,
padding: EdgeInsets.only(top: 15.h, bottom: 10.h),
child: Text(
TranslationLoader.lanKeys!.registerPasswordTip!.tr,
style: TextStyle(
fontSize: 18.w, color: AppColors.darkGrayTextColor))),
loginView(),
SizedBox(height: 50.w),
Obx(() => SubmitBtn(
btnName: TranslationLoader.lanKeys!.save!.tr,
@ -123,4 +84,76 @@ class _MinePersonInfoResetPasswordPageState
),
));
}
Widget loginView() {
Widget view = Column(
children: [
LoginInput(
controller: state.oldPwdController,
onchangeAction: (textStr) {
logic.changeInput(state.oldPwdController);
},
isPwd: true,
leftWidget: Text(
"${TranslationLoader.lanKeys!.originalPassword!.tr} ",
style: TextStyle(fontSize: 22.sp),
),
hintText: "",
inputFormatters: [
LengthLimitingTextInputFormatter(20),
]),
LoginInput(
controller: state.newPwdController,
onchangeAction: (textStr) {
logic.changeInput(state.newPwdController);
},
isPwd: true,
leftWidget: Text(
"${TranslationLoader.lanKeys!.newPassword!.tr} ",
style: TextStyle(fontSize: 22.sp),
),
hintText: "",
inputFormatters: [
LengthLimitingTextInputFormatter(20),
]),
LoginInput(
controller: state.surePwdController,
onchangeAction: (textStr) {
logic.changeInput(state.surePwdController);
},
isPwd: true,
// isHaveLeftWidget: false,
leftWidget: Text(
"${TranslationLoader.lanKeys!.surePassword!.tr} ",
style: TextStyle(fontSize: 22.sp),
),
hintText: "",
inputFormatters: [
LengthLimitingTextInputFormatter(20),
]),
Container(
width: 1.sw,
padding: EdgeInsets.only(top: 15.h, bottom: 10.h),
child: Text(TranslationLoader.lanKeys!.registerPasswordTip!.tr,
style: TextStyle(
fontSize: 18.w, color: AppColors.darkGrayTextColor))),
],
);
view = F.sw(
defaultCall: () => view,
xhjCall: () => Container(
margin: EdgeInsets.only(
top: 20.h,
),
padding: EdgeInsets.all(16.r),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(20.r))),
child: ClipRRect(
borderRadius: BorderRadius.circular(20.r),
child: view,
),
));
return view;
}
}

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:star_lock/flavors.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_entity.dart';
import 'package:star_lock/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_logic.dart';
import 'package:star_lock/tools/custom_bottom_sheet.dart';
@ -35,10 +36,20 @@ class _MinePersonInfoSetSafetyProblemPageState
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.mainBackgroundColor,
appBar: TitleAppBar(
appBar: F.sw(
defaultCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.safetyProblem!.tr,
haveBack: true,
backgroundColor: AppColors.mainColor),
backgroundColor: AppColors.mainColor,
),
xhjCall: () => TitleAppBar(
barTitle: TranslationLoader.lanKeys!.safetyProblem!.tr,
haveBack: true,
backgroundColor: Colors.white,
iconColor: AppColors.blackColor,
titleColor: AppColors.blackColor,
),
),
body: ListView(
children: [
Container(
@ -93,7 +104,7 @@ class _MinePersonInfoSetSafetyProblemPageState
Widget _safityProblemItem(String problemTitle, String answerTitle,
TextEditingController controller, Function() action) {
return Column(
Widget view = Column(
children: [
CommonItem(
leftTitel: problemTitle,
@ -125,6 +136,19 @@ class _MinePersonInfoSetSafetyProblemPageState
)
],
);
view = F.sw(
defaultCall: () => view,
xhjCall: () => Container(
margin: EdgeInsets.only(top: 20.h, left: 20.w, right: 20.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(20.r))),
child: ClipRRect(
borderRadius: BorderRadius.circular(20.r),
child: view,
),
));
return view;
}
Future _selectProblemBottomSheet(List dataList, int problemIndex) async {

View File

@ -52,7 +52,6 @@ class SubmitBtn extends StatelessWidget {
return Container(
width: ScreenUtil().screenWidth - 40.w,
height: 60.h,
padding: padding,
child: ElevatedButton(
style: ElevatedButton.styleFrom(
backgroundColor: isDisabled == false