diff --git a/star_lock/images/icon_login_email.png b/star_lock/images/icon_login_email.png new file mode 100644 index 00000000..7e11d815 Binary files /dev/null and b/star_lock/images/icon_login_email.png differ diff --git a/star_lock/lib/login/register/starLock_register_page.dart b/star_lock/lib/login/register/starLock_register_page.dart index b23883c5..dd2d5bbe 100644 --- a/star_lock/lib/login/register/starLock_register_page.dart +++ b/star_lock/lib/login/register/starLock_register_page.dart @@ -78,7 +78,8 @@ class _StarLockRegisterPageState extends State { // color: Colors.red, decoration: BoxDecoration( 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( children: [ GestureDetector( @@ -146,40 +147,42 @@ class _StarLockRegisterPageState extends State { state.countryCode.value = result['code']; state.countryName.value = result['countryName']; } - AppLog.log("路由返回值: $result, countryCode:${logic.state.countryCode}"); + AppLog.log( + "路由返回值: $result, countryCode:${logic.state.countryCode}"); }, child: Obx(() => SizedBox( - height: 70.h, - 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, + height: 70.h, + child: Row( 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), + 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: [ + 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( height: 0.5.h, @@ -193,26 +196,29 @@ class _StarLockRegisterPageState extends State { return Column( children: [ Obx(() => LoginInput( - controller: state.phoneOrEmailController, - onchangeAction: (v) { - logic.checkNext(state.phoneOrEmailController); - }, - leftWidget: - // Image.asset('images/icon_login_account.png', width: 30.w, height: 30.w,), - Padding( - padding: EdgeInsets.only(right: 10.w, left: 5.w), - child: Image.asset( - 'images/icon_login_account.png', - width: 30.w, - height: 30.w, - ), - ), - hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${state.isIphoneType.value ? "手机号".tr : TranslationLoader.lanKeys!.email!.tr}", - keyboardType: TextInputType.number, - inputFormatters: [ - // FilteringTextInputFormatter.allow(RegExp('[0-9]')), - LengthLimitingTextInputFormatter(30), - ])), + controller: state.phoneOrEmailController, + onchangeAction: (v) { + logic.checkNext(state.phoneOrEmailController); + }, + leftWidget: + // Image.asset('images/icon_login_account.png', width: 30.w, height: 30.w,), + Padding( + padding: EdgeInsets.only(right: 10.w, left: 5.w), + child: Image.asset( + state.isIphoneType.value + ? 'images/icon_login_account.png' + : "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: [ + // FilteringTextInputFormatter.allow(RegExp('[0-9]')), + LengthLimitingTextInputFormatter(30), + ])), SizedBox(height: 10.w), LoginInput( controller: state.pwdController, @@ -285,20 +291,21 @@ class _StarLockRegisterPageState extends State { width: 20.w, ), Obx(() => GestureDetector( - onTap: state.phoneOrEmailStrIsOK.value && state.canResend.value - ? () async { - // Navigator.pushNamed(context, Routers.safetyVerificationPage, arguments: {"countryCode":"+86", "account":state.phoneOrEmailStr.value}); - var result = await Navigator.pushNamed( - context, Routers.safetyVerificationPage, - arguments: { - "countryCode": state.countryCode, - "account": state.phoneOrEmailStr.value - }); - state.xWidth.value = - (result as Map)['xWidth']; - logic.sendValidationCode(); - } - : null, + onTap: + state.phoneOrEmailStrIsOK.value && state.canResend.value + ? () async { + // Navigator.pushNamed(context, Routers.safetyVerificationPage, arguments: {"countryCode":"+86", "account":state.phoneOrEmailStr.value}); + var result = await Navigator.pushNamed( + context, Routers.safetyVerificationPage, + arguments: { + "countryCode": state.countryCode, + "account": state.phoneOrEmailStr.value + }); + state.xWidth.value = + (result as Map)['xWidth']; + logic.sendValidationCode(); + } + : null, child: Container( width: 180.w, // height: 60.h,