修复注册页面选中邮箱类型图片错误问题bugID为:ID1001493

This commit is contained in:
Daisy 2024-04-30 16:31:40 +08:00
parent d3cb7ad739
commit f6fba1498c
2 changed files with 71 additions and 64 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -78,7 +78,8 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
// color: Colors.red, // color: Colors.red,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(30.h)), borderRadius: BorderRadius.all(Radius.circular(30.h)),
border: Border.all(width: 1.0, color: AppColors.greyLineColor)), border:
Border.all(width: 1.0, color: AppColors.greyLineColor)),
child: Row( child: Row(
children: [ children: [
GestureDetector( GestureDetector(
@ -146,40 +147,42 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
state.countryCode.value = result['code']; state.countryCode.value = result['code'];
state.countryName.value = result['countryName']; state.countryName.value = result['countryName'];
} }
AppLog.log("路由返回值: $result, countryCode:${logic.state.countryCode}"); AppLog.log(
"路由返回值: $result, countryCode:${logic.state.countryCode}");
}, },
child: Obx(() => SizedBox( child: Obx(() => SizedBox(
height: 70.h, height: 70.h,
child: Row( child: Row(
children: [
SizedBox(width: 5.w),
Expanded(
child: Text("${"你所在的".tr}${TranslationLoader.lanKeys!.countryAndRegion!.tr}",
style: TextStyle(
fontSize: 26.sp, color: AppColors.blackColor))),
SizedBox(width: 20.w),
Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [ children: [
Text( SizedBox(width: 5.w),
state.isIphoneType.value Expanded(
? '${state.countryName.value} +${state.countryCode.value}' child: Text(
: state.countryName.value, "${"你所在的".tr}${TranslationLoader.lanKeys!.countryAndRegion!.tr}",
textAlign: TextAlign.end, style: TextStyle(
style: TextStyle( fontSize: 26.sp, color: AppColors.blackColor))),
fontSize: 26.sp, color: AppColors.blackColor), SizedBox(width: 20.w),
) Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Text(
state.isIphoneType.value
? '${state.countryName.value} +${state.countryCode.value}'
: state.countryName.value,
textAlign: TextAlign.end,
style: TextStyle(
fontSize: 26.sp, color: AppColors.blackColor),
)
],
),
SizedBox(width: 5.w),
Image.asset(
'images/icon_right.png',
width: 50.w,
height: 50.w,
),
], ],
), ),
SizedBox(width: 5.w), )),
Image.asset(
'images/icon_right.png',
width: 50.w,
height: 50.w,
),
],
),
)),
), ),
Container( Container(
height: 0.5.h, height: 0.5.h,
@ -193,26 +196,29 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
return Column( return Column(
children: [ children: [
Obx(() => LoginInput( Obx(() => LoginInput(
controller: state.phoneOrEmailController, controller: state.phoneOrEmailController,
onchangeAction: (v) { onchangeAction: (v) {
logic.checkNext(state.phoneOrEmailController); logic.checkNext(state.phoneOrEmailController);
}, },
leftWidget: leftWidget:
// Image.asset('images/icon_login_account.png', width: 30.w, height: 30.w,), // Image.asset('images/icon_login_account.png', width: 30.w, height: 30.w,),
Padding( Padding(
padding: EdgeInsets.only(right: 10.w, left: 5.w), padding: EdgeInsets.only(right: 10.w, left: 5.w),
child: Image.asset( child: Image.asset(
'images/icon_login_account.png', state.isIphoneType.value
width: 30.w, ? 'images/icon_login_account.png'
height: 30.w, : "images/icon_login_email.png",
), width: 30.w,
), height: 30.w,
hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${state.isIphoneType.value ? "手机号".tr : TranslationLoader.lanKeys!.email!.tr}", ),
keyboardType: TextInputType.number, ),
inputFormatters: [ hintText:
// FilteringTextInputFormatter.allow(RegExp('[0-9]')), "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${state.isIphoneType.value ? "手机号".tr : TranslationLoader.lanKeys!.email!.tr}",
LengthLimitingTextInputFormatter(30), keyboardType: TextInputType.number,
])), inputFormatters: [
// FilteringTextInputFormatter.allow(RegExp('[0-9]')),
LengthLimitingTextInputFormatter(30),
])),
SizedBox(height: 10.w), SizedBox(height: 10.w),
LoginInput( LoginInput(
controller: state.pwdController, controller: state.pwdController,
@ -285,20 +291,21 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
width: 20.w, width: 20.w,
), ),
Obx(() => GestureDetector( Obx(() => GestureDetector(
onTap: state.phoneOrEmailStrIsOK.value && state.canResend.value onTap:
? () async { state.phoneOrEmailStrIsOK.value && state.canResend.value
// Navigator.pushNamed(context, Routers.safetyVerificationPage, arguments: {"countryCode":"+86", "account":state.phoneOrEmailStr.value}); ? () async {
var result = await Navigator.pushNamed( // Navigator.pushNamed(context, Routers.safetyVerificationPage, arguments: {"countryCode":"+86", "account":state.phoneOrEmailStr.value});
context, Routers.safetyVerificationPage, var result = await Navigator.pushNamed(
arguments: { context, Routers.safetyVerificationPage,
"countryCode": state.countryCode, arguments: {
"account": state.phoneOrEmailStr.value "countryCode": state.countryCode,
}); "account": state.phoneOrEmailStr.value
state.xWidth.value = });
(result as Map<String, dynamic>)['xWidth']; state.xWidth.value =
logic.sendValidationCode(); (result as Map<String, dynamic>)['xWidth'];
} logic.sendValidationCode();
: null, }
: null,
child: Container( child: Container(
width: 180.w, width: 180.w,
// height: 60.h, // height: 60.h,