diff --git a/lib/login/register/starLock_register_page.dart b/lib/login/register/starLock_register_page.dart index 2e8174df..e9d599e9 100755 --- a/lib/login/register/starLock_register_page.dart +++ b/lib/login/register/starLock_register_page.dart @@ -1,4 +1,4 @@ - +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -87,7 +87,8 @@ class _StarLockRegisterPageState extends State { onTap: () { state.isIphoneType.value = true; }, - child: Obx(() => Container( + child: Obx( + () => Container( width: 170.w, height: 60.h, decoration: state.isIphoneType.value @@ -99,39 +100,52 @@ class _StarLockRegisterPageState extends State { width: 1.0, color: AppColors.greyLineColor)) : null, child: Center( - child: Text( - '手机'.tr, - style: TextStyle( - color: state.isIphoneType.value - ? Colors.white - : Colors.black), - )))), + child: Text( + '手机'.tr, + style: TextStyle( + color: state.isIphoneType.value + ? Colors.white + : Colors.black), + ), + ), + ), + ), ), Expanded( child: GestureDetector( onTap: () { state.isIphoneType.value = false; }, - child: Obx(() => Container( + child: Obx( + () => Container( height: 60.h, // color: Colors.red, decoration: state.isIphoneType.value ? null : BoxDecoration( color: AppColors.mainColor, - borderRadius: - BorderRadius.all(Radius.circular(30.h)), + borderRadius: BorderRadius.all( + Radius.circular( + 30.h, + ), + ), border: Border.all( - width: 1.0, - color: AppColors.greyLineColor)), + width: 1.0, + color: AppColors.greyLineColor, + ), + ), child: Center( - child: Text( - '邮箱'.tr, - style: TextStyle( + child: Text( + '邮箱'.tr, + style: TextStyle( color: state.isIphoneType.value ? Colors.black - : Colors.white), - )))), + : Colors.white, + ), + ), + ), + ), + ), ), ), ], @@ -157,8 +171,7 @@ class _StarLockRegisterPageState extends State { children: [ SizedBox(width: 5.w), Expanded( - child: Text( - '你所在的国家/地区'.tr, + child: Text('你所在的国家/地区'.tr, style: TextStyle( fontSize: 26.sp, color: AppColors.blackColor))), SizedBox(width: 20.w), @@ -213,8 +226,7 @@ class _StarLockRegisterPageState extends State { height: 30.w, ), ), - hintText: - state.isIphoneType.value ? '请输入手机号'.tr : '请输入邮箱'.tr, + hintText: state.isIphoneType.value ? '请输入手机号'.tr : '请输入邮箱'.tr, keyboardType: TextInputType.number, inputFormatters: [ // FilteringTextInputFormatter.allow(RegExp('[0-9]')), @@ -236,7 +248,7 @@ class _StarLockRegisterPageState extends State { height: 30.w, ), ), - hintText:'请输入密码'.tr, + hintText: '请输入密码'.tr, inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), @@ -282,8 +294,7 @@ class _StarLockRegisterPageState extends State { height: 30.w, ), ), - hintText: - '请输入验证码'.tr, + hintText: '请输入验证码'.tr, inputFormatters: [ LengthLimitingTextInputFormatter(20), ]), @@ -292,29 +303,29 @@ class _StarLockRegisterPageState extends State { width: 20.w, ), Obx(() => GestureDetector( - onTap: - (state.canSendCode.value && state.canResend.value) - ? () async { - // Navigator.pushNamed(context, Routers.safetyVerificationPage, arguments: {"countryCode":"+86", "account":state.phoneOrEmailStr.value}); - final Object? 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.canSendCode.value && state.canResend.value) + ? () async { + // Navigator.pushNamed(context, Routers.safetyVerificationPage, arguments: {"countryCode":"+86", "account":state.phoneOrEmailStr.value}); + final Object? 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, padding: EdgeInsets.all(10.h), decoration: BoxDecoration( - color: (state.canSendCode.value && state.canResend.value) - ? AppColors.mainColor - : Colors.grey, + color: + (state.canSendCode.value && state.canResend.value) + ? AppColors.mainColor + : Colors.grey, borderRadius: BorderRadius.circular(5)), child: Center( child: Text(state.btnText.value, @@ -361,29 +372,29 @@ class _StarLockRegisterPageState extends State { WidgetSpan( alignment: PlaceholderAlignment.middle, child: GestureDetector( - child: Text( - '《${'用户协议'.tr}》', + child: Text('《${'用户协议'.tr}》', style: TextStyle( color: AppColors.mainColor, fontSize: 20.sp)), onTap: () { - Get.toNamed(Routers.webviewShowPage, arguments: { - 'url': XSConstantMacro.userAgreementURL, - 'title': '用户协议'.tr - }); + Get.toNamed(Routers.webviewShowPage, + arguments: { + 'url': XSConstantMacro.userAgreementURL, + 'title': '用户协议'.tr + }); }, )), WidgetSpan( alignment: PlaceholderAlignment.middle, child: GestureDetector( - child: Text( - '《${'隐私政策'.tr}》', + child: Text('《${'隐私政策'.tr}》', style: TextStyle( color: AppColors.mainColor, fontSize: 20.sp)), onTap: () { - Get.toNamed(Routers.webviewShowPage, arguments: { - 'url': XSConstantMacro.privacyPolicyURL, - 'title': '隐私政策'.tr - }); + Get.toNamed(Routers.webviewShowPage, + arguments: { + 'url': XSConstantMacro.privacyPolicyURL, + 'title': '隐私政策'.tr + }); }, )), ],