diff --git a/star_lock/images/icon_login_account.png b/star_lock/images/icon_login_account.png new file mode 100644 index 00000000..75986a03 Binary files /dev/null and b/star_lock/images/icon_login_account.png differ diff --git a/star_lock/images/icon_login_password.png b/star_lock/images/icon_login_password.png new file mode 100644 index 00000000..b3bf1c72 Binary files /dev/null and b/star_lock/images/icon_login_password.png differ diff --git a/star_lock/images/icon_select_circle.png b/star_lock/images/icon_select_circle.png new file mode 100644 index 00000000..9f5448bd Binary files /dev/null and b/star_lock/images/icon_select_circle.png differ diff --git a/star_lock/images/lan/lan_keys.json b/star_lock/images/lan/lan_keys.json index 818c2ca6..fc103269 100644 --- a/star_lock/images/lan/lan_keys.json +++ b/star_lock/images/lan/lan_keys.json @@ -296,7 +296,7 @@ "whenAddingLockThePhoneMustBeNextToTheLock":"whenAddingLockThePhoneMustBeNextToTheLock", "login":"login", - "register":"Register", + "register":"register", "forgetPassword":"forgetPassword", "readAndAgree":"readAndAgree", "verificationCode":"verificationCode", diff --git a/star_lock/lib/login/forgetPassword/starLock_forgetPassword_page.dart b/star_lock/lib/login/forgetPassword/starLock_forgetPassword_page.dart index 71946a56..755aef0b 100644 --- a/star_lock/lib/login/forgetPassword/starLock_forgetPassword_page.dart +++ b/star_lock/lib/login/forgetPassword/starLock_forgetPassword_page.dart @@ -1,4 +1,3 @@ - import 'dart:async'; import 'package:flutter/material.dart'; @@ -17,10 +16,12 @@ class StarLockForgetPasswordPage extends StatefulWidget { const StarLockForgetPasswordPage({Key? key}) : super(key: key); @override - State createState() => _StarLockForgetPasswordPageState(); + State createState() => + _StarLockForgetPasswordPageState(); } -class _StarLockForgetPasswordPageState extends State { +class _StarLockForgetPasswordPageState + extends State { final TextEditingController _phoneController = TextEditingController(); final TextEditingController _pwdController = TextEditingController(); final TextEditingController _codeController = TextEditingController(); @@ -34,89 +35,129 @@ class _StarLockForgetPasswordPageState extends State return Scaffold( resizeToAvoidBottomInset: false, backgroundColor: const Color(0xFFFFFFFF), - appBar: TitleAppBar(barTitle: "${TranslationLoader.lanKeys!.reset!.tr} ${TranslationLoader.lanKeys!.password!.tr}", haveBack:true, backgroundColor: AppColors.mainColor), - body:ListView( - padding: EdgeInsets.only( - top: 40.h, - left: 40.w, - right: 40.w - ), + appBar: TitleAppBar( + barTitle: + "${TranslationLoader.lanKeys!.reset!.tr}${TranslationLoader.lanKeys!.password!.tr}", + haveBack: true, + backgroundColor: AppColors.mainColor), + body: ListView( + padding: EdgeInsets.only(top: 40.h, left: 40.w, right: 40.w), children: [ - LoginInput(controller: _phoneController, - leftWidget:Padding( - padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), - child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), + LoginInput( + controller: _phoneController, + leftWidget: Padding( + padding: EdgeInsets.only( + top: 30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset( + 'images/icon_login_account.png', + width: 36.w, + height: 36.w, + ), ), - hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, + hintText: + TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, keyboardType: TextInputType.number, inputFormatters: [ FilteringTextInputFormatter.allow(RegExp('[0-9]')), LengthLimitingTextInputFormatter(20), - ]), - SizedBox(height: 10.w), + ]), + SizedBox(height: 10.h), LoginInput( controller: _pwdController, isPwd: true, - leftWidget:Padding( - padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), - child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), + leftWidget: Padding( + padding: EdgeInsets.only( + top: 30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset( + 'images/icon_login_password.png', + width: 36.w, + height: 36.w, + ), ), - hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.password!.tr}", + hintText: + "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}", inputFormatters: [ LengthLimitingTextInputFormatter(20), - ]), + ]), SizedBox(height: 15.w), - Text(TranslationLoader.lanKeys!.registerPasswordTip!.tr, style: TextStyle(color: const Color(0xFF999999), fontSize: 26.sp),), - SizedBox(height: 10.w), - LoginInput( - controller: _pwdController, - isPwd: true, - leftWidget:Padding( - padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), - child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), - ), - hintText: "${TranslationLoader.lanKeys!.sure!.tr} ${TranslationLoader.lanKeys!.password!.tr}", - inputFormatters: [ - LengthLimitingTextInputFormatter(20), - ] + Text( + TranslationLoader.lanKeys!.registerPasswordTip!.tr, + style: TextStyle( + color: AppColors.placeholderTextColor, fontSize: 20.sp), ), SizedBox(height: 10.w), + LoginInput( + controller: _pwdController, + isPwd: true, + leftWidget: Padding( + padding: EdgeInsets.only( + top: 30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset( + 'images/icon_login_password.png', + width: 36.w, + height: 36.w, + ), + ), + hintText: + "${TranslationLoader.lanKeys!.sure!.tr}${TranslationLoader.lanKeys!.password!.tr}", + inputFormatters: [ + LengthLimitingTextInputFormatter(20), + ]), + SizedBox(height: 10.h), Row( children: [ Expanded( child: LoginInput( controller: _codeController, isPwd: true, - leftWidget:Padding( - padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), - child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), - ), - hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}", + leftWidget: Padding( + padding: EdgeInsets.only( + top: 30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: SizedBox( + width: 36.w, + height: 36.w, + ) + // Image.asset( + // 'images/main/icon_main_search.png', + // width: 40.w, + // height: 40.w, + // ), + ), + hintText: + "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}", inputFormatters: [ LengthLimitingTextInputFormatter(20), - ]), + ]), + ), + SizedBox( + width: 20.w, ), - SizedBox(width: 20.w,), GestureDetector( child: Container( - width: 180.w, + width: 160.w, height: 60.h, padding: EdgeInsets.all(5.h), decoration: BoxDecoration( color: AppColors.mainColor, - borderRadius: BorderRadius.circular(5) - ), + borderRadius: BorderRadius.circular(5)), child: Center( - child: Text(_seconds==60?'${TranslationLoader.lanKeys!.getTip!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s', textAlign:TextAlign.center, style: TextStyle( - color: Colors.white, - fontSize: 26.sp, - )), + child: Text( + _seconds == 60 + ? '${TranslationLoader.lanKeys!.getTip!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}' + : (_seconds < 10) + ? '0$_seconds s' + : '$_seconds s', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontSize: 26.sp, + )), ), ), - onTap: (){ - if(_seconds==60){ + onTap: () { + if (_seconds == 60) { // _setVerify(); - }else{ + } else { // Toast.show(msg: '正在获取验证码'); } }, @@ -124,13 +165,14 @@ class _StarLockForgetPasswordPageState extends State ], ), SizedBox(height: 50.w), - SubmitBtn(btnName: "${TranslationLoader.lanKeys!.reset!.tr} ${TranslationLoader.lanKeys!.password!.tr}", fontSize: 30.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ - - }), + SubmitBtn( + btnName: + "${TranslationLoader.lanKeys!.reset!.tr}${TranslationLoader.lanKeys!.password!.tr}", + fontSize: 30.sp, + borderRadius: 20.w, + padding: EdgeInsets.only(top: 25.w, bottom: 25.w), + onClick: () {}), ], - ) - ); + )); } - - -} \ No newline at end of file +} diff --git a/star_lock/lib/login/login/starLock_login_page.dart b/star_lock/lib/login/login/starLock_login_page.dart index 79eaeb87..9c2f0d62 100644 --- a/star_lock/lib/login/login/starLock_login_page.dart +++ b/star_lock/lib/login/login/starLock_login_page.dart @@ -1,4 +1,3 @@ - import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; @@ -25,133 +24,148 @@ class _StarLockLoginPageState extends State { @override Widget build(BuildContext context) { return Scaffold( - resizeToAvoidBottomInset: false, - backgroundColor: const Color(0xFFFFFFFF), - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.login!.tr, haveBack:true, backgroundColor: AppColors.mainColor, actionsList: [ - TextButton( - child: Text(TranslationLoader.lanKeys!.register!.tr, style: const TextStyle(color: Colors.white),), - onPressed: (){ - Navigator.pushNamed(context, Routers.starLockRegisterPage); - },), - ],), - body:ListView( - padding: EdgeInsets.only( - top: 120.h, - left: 40.w, - right: 40.w + resizeToAvoidBottomInset: false, + backgroundColor: const Color(0xFFFFFFFF), + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.login!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor, + actionsList: [ + TextButton( + child: Text( + TranslationLoader.lanKeys!.register!.tr, + style: const TextStyle(color: Colors.white), + ), + onPressed: () { + Navigator.pushNamed(context, Routers.starLockRegisterPage); + }, + ), + ], ), - children: [ - Container( - padding: EdgeInsets.all(10.w), - child: Center( - child: Image.asset('images/icon_main_1024.png', width: 150.w, height: 150.w) - ) - ), - SizedBox(height: 50.w), - LoginInput( - controller: _phoneController, - leftWidget:Padding( - padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), - child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), - ), - hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, - keyboardType: TextInputType.number, - inputFormatters: [ - FilteringTextInputFormatter.allow(RegExp('[0-9]')), - LengthLimitingTextInputFormatter(20), - ] - ), - SizedBox(height: 50.w), - LoginInput( - controller: _pwdController, - isPwd: true, - leftWidget:Padding( - padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), - child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), - ), - hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.password!.tr}", - inputFormatters: [ - LengthLimitingTextInputFormatter(20), - ] - ), - SizedBox(height: 20.h), - Row( - mainAxisAlignment: MainAxisAlignment.start, - children: [ - SizedBox( - height: 20.h, - width: 26.w, - child: Checkbox(value: false, onChanged: (value){ - - }) - ), - SizedBox(width: 15.w,), - Flexible( - child: RichText( - text: TextSpan( - text: TranslationLoader.lanKeys!.readAndAgree!.tr, - style: TextStyle( - color: const Color(0xff333333), - fontSize: 26.sp - ), - children: [ - WidgetSpan( - alignment: PlaceholderAlignment.middle, - child: GestureDetector( - child: Text('《${TranslationLoader.lanKeys!.userAgreement!.tr}》',style: TextStyle( - color: AppColors.mainColor, - fontSize: 26.sp - )), - onTap: (){ - - }, - ) - ), - WidgetSpan( - alignment: PlaceholderAlignment.middle, - child: GestureDetector( - child: Text('《${TranslationLoader.lanKeys!.privacyPolicy!.tr}》',style: TextStyle( - color: AppColors.mainColor, - fontSize: 26.sp - )), - onTap: (){ - - }, - ) - ), - ], - ) - ), - ) - ], - ), - SizedBox(height: 50.w), - SubmitBtn(btnName: TranslationLoader.lanKeys!.login!.tr, fontSize: 28.sp, borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), onClick: (){ - - }), - SizedBox(height: 50.w), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - GestureDetector( - child: SizedBox( - // width: 150.w, - height: 50.h, - // color: Colors.red, - child: Center( - child: Text('${TranslationLoader.lanKeys!.forgetPassword!.tr}?',style: TextStyle(fontSize: 24.sp)), + body: ListView( + padding: EdgeInsets.only(top: 120.h, left: 40.w, right: 40.w), + children: [ + Container( + padding: EdgeInsets.all(10.w), + child: Center( + child: Image.asset('images/icon_main_1024.png', + width: 110.w, height: 110.w))), + SizedBox(height: 50.w), + LoginInput( + controller: _phoneController, + leftWidget: Padding( + padding: EdgeInsets.only( + top: 30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset( + 'images/icon_login_account.png', + width: 36.w, + height: 36.w, ), ), - onTap: (){ - Navigator.pushNamed(context, Routers.starLockForgetPasswordPage); - }, - ) - ], - ), - ], - ) - ); + hintText: + TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, + keyboardType: TextInputType.number, + inputFormatters: [ + FilteringTextInputFormatter.allow(RegExp('[0-9]')), + LengthLimitingTextInputFormatter(20), + ]), + SizedBox(height: 10.h), + LoginInput( + controller: _pwdController, + isPwd: true, + leftWidget: Padding( + padding: EdgeInsets.only( + top: 30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset( + 'images/icon_login_password.png', + width: 36.w, + height: 36.w, + ), + ), + hintText: + "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}", + inputFormatters: [ + LengthLimitingTextInputFormatter(20), + ]), + SizedBox(height: 20.h), + Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Image.asset( + 'images/icon_select_circle.png', + width: 28.w, + height: 28.w, + ), + // SizedBox( + // height: 20.h, + // width: 26.w, + // child: Checkbox(value: false, onChanged: (value) {})), + SizedBox( + width: 15.w, + ), + Flexible( + child: RichText( + text: TextSpan( + text: TranslationLoader.lanKeys!.readAndAgree!.tr, + style: TextStyle( + color: const Color(0xff333333), fontSize: 20.sp), + children: [ + WidgetSpan( + alignment: PlaceholderAlignment.middle, + child: GestureDetector( + child: Text( + '《${TranslationLoader.lanKeys!.userAgreement!.tr}》', + style: TextStyle( + color: AppColors.mainColor, + fontSize: 20.sp)), + onTap: () {}, + )), + WidgetSpan( + alignment: PlaceholderAlignment.middle, + child: GestureDetector( + child: Text( + '《${TranslationLoader.lanKeys!.privacyPolicy!.tr}》', + style: TextStyle( + color: AppColors.mainColor, + fontSize: 20.sp)), + onTap: () {}, + )), + ], + )), + ) + ], + ), + SizedBox(height: 50.w), + SubmitBtn( + btnName: TranslationLoader.lanKeys!.login!.tr, + fontSize: 28.sp, + borderRadius: 20.w, + padding: EdgeInsets.only(top: 25.w, bottom: 25.w), + onClick: () {}), + SizedBox(height: 50.w), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + GestureDetector( + child: SizedBox( + // width: 150.w, + height: 50.h, + // color: Colors.red, + child: Center( + child: Text( + '${TranslationLoader.lanKeys!.forgetPassword!.tr}?', + style: TextStyle( + fontSize: 22.sp, color: AppColors.mainColor)), + ), + ), + onTap: () { + Navigator.pushNamed( + context, Routers.starLockForgetPasswordPage); + }, + ) + ], + ), + ], + )); } - - } diff --git a/star_lock/lib/login/register/starLock_register_page.dart b/star_lock/lib/login/register/starLock_register_page.dart index 0b162c41..ecccf893 100644 --- a/star_lock/lib/login/register/starLock_register_page.dart +++ b/star_lock/lib/login/register/starLock_register_page.dart @@ -1,5 +1,5 @@ - import 'dart:async'; +import 'dart:ffi'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; @@ -22,7 +22,6 @@ class StarLockRegisterPage extends StatefulWidget { } class _StarLockRegisterPageState extends State { - final logic = Get.find(); final state = Get.find().state; @@ -34,13 +33,12 @@ class _StarLockRegisterPageState extends State { return Scaffold( resizeToAvoidBottomInset: false, backgroundColor: const Color(0xFFFFFFFF), - appBar: TitleAppBar(barTitle: TranslationLoader.lanKeys!.register!.tr, haveBack:true, backgroundColor: AppColors.mainColor), - body:ListView( - padding: EdgeInsets.only( - top: 40.h, - left: 40.w, - right: 40.w - ), + appBar: TitleAppBar( + barTitle: TranslationLoader.lanKeys!.register!.tr, + haveBack: true, + backgroundColor: AppColors.mainColor), + body: ListView( + padding: EdgeInsets.only(top: 40.h, left: 40.w, right: 40.w), children: [ topSeletCountryAndRegionWidget(), middleTFWidget(), @@ -53,64 +51,73 @@ class _StarLockRegisterPageState extends State { borderRadius: 20.w, padding: EdgeInsets.only(top: 25.w, bottom: 25.w), isDisabled: state.canSub.value, - onClick: state.canSub.value ? (){ - logic.register(); - }:null - ); + onClick: state.canSub.value + ? () { + logic.register(); + } + : null); }), + SizedBox( + height: 20.h, + ), + _buildBottomAgreement() ], - ) - ); + )); } - Widget topSeletCountryAndRegionWidget (){ + Widget topSeletCountryAndRegionWidget() { return Column( children: [ - SizedBox(height:50.h), + SizedBox(height: 50.h), Row( mainAxisAlignment: MainAxisAlignment.center, children: [ Container( - width: 420.w, + width: 340.w, height: 60.h, // color: Colors.red, decoration: BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(30.h)), border: const Border( - top: BorderSide(width: 1.0, color: Color(0xffC0C0C0)), - left: BorderSide(width: 1.0, color: Color(0xffC0C0C0)), - right: BorderSide(width: 1.0, color: Color(0xffC0C0C0)), - bottom: BorderSide(width: 1.0, color: Color(0xffC0C0C0)), - ) - ), + top: BorderSide(width: 1.0, color: AppColors.greyLineColor), + left: + BorderSide(width: 1.0, color: AppColors.greyLineColor), + right: + BorderSide(width: 1.0, color: AppColors.greyLineColor), + bottom: + BorderSide(width: 1.0, color: AppColors.greyLineColor), + )), child: Row( children: [ GestureDetector( - onTap: (){ - - }, + onTap: () {}, child: Container( - width: 210.w, + width: 170.w, height: 60.h, // color: Colors.red, decoration: BoxDecoration( - color: AppColors.mainColor, - borderRadius: BorderRadius.all(Radius.circular(30.h)), + color: AppColors.mainColor, + borderRadius: + BorderRadius.all(Radius.circular(30.h)), border: const Border( - top: BorderSide(width: 1.0, color: Color(0xffC0C0C0)), - left: BorderSide(width: 1.0, color: Color(0xffC0C0C0)), - right: BorderSide(width: 1.0, color: Color(0xffC0C0C0)), - bottom: BorderSide(width: 1.0, color: Color(0xffC0C0C0)), - ) - ), - child: Center(child: Text(TranslationLoader.lanKeys!.iphone!.tr, style: TextStyle(color: Colors.white),)) - ), + top: BorderSide( + width: 1.0, color: AppColors.greyLineColor), + left: BorderSide( + width: 1.0, color: AppColors.greyLineColor), + right: BorderSide( + width: 1.0, color: AppColors.greyLineColor), + bottom: BorderSide( + width: 1.0, color: AppColors.greyLineColor), + )), + child: Center( + child: Text( + TranslationLoader.lanKeys!.iphone!.tr, + style: TextStyle(color: Colors.white), + ))), ), Expanded( child: GestureDetector( - onTap: (){ - - }, + onTap: () {}, child: Container( height: 60.h, // color: Colors.red, @@ -123,22 +130,26 @@ class _StarLockRegisterPageState extends State { // bottom: BorderSide(width: 1.0, color: Color(0xffC0C0C0)), // ) // ), - child: Center(child: Text(TranslationLoader.lanKeys!.email!.tr, style: const TextStyle(color: Colors.black),)) - ), + child: Center( + child: Text( + TranslationLoader.lanKeys!.email!.tr, + style: const TextStyle(color: Colors.black), + ))), ), ), ], ), ), - ], ), - SizedBox(height:60.h), + SizedBox(height: 60.h), GestureDetector( onTap: () async { Navigator.pushNamed(context, Routers.seletCountryRegionPage); - var result = await Navigator.pushNamed(context, Routers.seletCountryRegionPage); - logic.state.countryCode.value = (result as Map)['code']; + var result = await Navigator.pushNamed( + context, Routers.seletCountryRegionPage); + logic.state.countryCode.value = + (result as Map)['code']; logic.state.countryId.value = result["countryId"]; // print("路由返回值: ${result}, countryCode:${logic.state.countryCode} ,countryId:${logic.state.countryId}"); }, @@ -148,27 +159,42 @@ class _StarLockRegisterPageState extends State { // padding: EdgeInsets.only(left:20.w, right: 10.w, top: 20.w, bottom: 20.w), child: Row( children: [ - SizedBox(width:5.w), - Expanded(child: Text(TranslationLoader.lanKeys!.countryAndRegion!.tr, style: TextStyle(fontSize: 26.sp))), - SizedBox(width:20.w), + SizedBox(width: 5.w), + Expanded( + child: Text(TranslationLoader.lanKeys!.countryAndRegion!.tr, + style: TextStyle( + fontSize: 26.sp, color: AppColors.blackColor))), + SizedBox(width: 20.w), Row( mainAxisAlignment: MainAxisAlignment.end, children: [ - Text("中国+86", textAlign: TextAlign.end, style: TextStyle(fontSize: 26.sp),) + Text( + "中国+86", + 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, color: Colors.grey,) + Container( + height: 0.5.h, + color: Colors.grey, + ) ], ); } - Widget middleTFWidget (){ + Widget middleTFWidget() { return Column( children: [ LoginInput( @@ -177,17 +203,21 @@ class _StarLockRegisterPageState extends State { print("3333333:${v}"); logic.checkNext(state.phoneOrEmailController); }, - leftWidget:Padding( - padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), - child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), + leftWidget: Padding( + padding: EdgeInsets.only( + top: 30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset( + 'images/icon_login_account.png', + width: 40.w, + height: 40.w, + ), ), hintText: TranslationLoader.lanKeys!.pleaseEnterNumberOrEmail!.tr, keyboardType: TextInputType.number, inputFormatters: [ FilteringTextInputFormatter.allow(RegExp('[0-9]')), LengthLimitingTextInputFormatter(20), - ] - ), + ]), SizedBox(height: 10.w), LoginInput( controller: state.pwdController, @@ -195,17 +225,26 @@ class _StarLockRegisterPageState extends State { logic.checkNext(state.pwdController); }, isPwd: true, - leftWidget:Padding( - padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), - child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), + leftWidget: Padding( + padding: EdgeInsets.only( + top: 30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset( + 'images/icon_login_password.png', + width: 40.w, + height: 40.w, + ), ), - hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.password!.tr}", + hintText: + "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.password!.tr}", inputFormatters: [ LengthLimitingTextInputFormatter(20), - ] - ), + ]), SizedBox(height: 15.w), - Text(TranslationLoader.lanKeys!.registerPasswordTip!.tr, style: TextStyle(color: const Color(0xFF999999), fontSize: 26.sp),), + Text( + TranslationLoader.lanKeys!.registerPasswordTip!.tr, + style: + TextStyle(color: AppColors.placeholderTextColor, fontSize: 20.sp), + ), SizedBox(height: 10.w), LoginInput( controller: state.sureController, @@ -213,15 +252,20 @@ class _StarLockRegisterPageState extends State { logic.checkNext(state.sureController); }, isPwd: true, - leftWidget:Padding( - padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), - child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), + leftWidget: Padding( + padding: EdgeInsets.only( + top: 30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: Image.asset( + 'images/icon_login_password.png', + width: 40.w, + height: 40.w, + ), ), - hintText: "${TranslationLoader.lanKeys!.sure!.tr} ${TranslationLoader.lanKeys!.password!.tr}", + hintText: + "${TranslationLoader.lanKeys!.sure!.tr}${TranslationLoader.lanKeys!.password!.tr}", inputFormatters: [ LengthLimitingTextInputFormatter(20), - ] - ), + ]), SizedBox(height: 10.w), Row( children: [ @@ -232,17 +276,28 @@ class _StarLockRegisterPageState extends State { onchangeAction: (v) { logic.checkNext(state.codeController); }, - leftWidget:Padding( - padding: EdgeInsets.only(top:30.w, bottom: 20.w, right: 20.w, left: 5.w), - child: Image.asset('images/main/icon_main_search.png', width: 40.w, height: 40.w,), + leftWidget: Padding( + padding: EdgeInsets.only( + top: 30.w, bottom: 20.w, right: 20.w, left: 5.w), + child: SizedBox( + width: 36.w, + height: 36.w, + ), + // Image.asset( + // 'images/main/icon_main_search.png', + // width: 40.w, + // height: 40.w, + // ), ), - hintText: "${TranslationLoader.lanKeys!.pleaseEnter!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}", + hintText: + "${TranslationLoader.lanKeys!.pleaseEnter!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}", inputFormatters: [ LengthLimitingTextInputFormatter(20), - ] - ), + ]), + ), + SizedBox( + width: 20.w, ), - SizedBox(width: 20.w,), GestureDetector( child: Container( width: 180.w, @@ -250,20 +305,26 @@ class _StarLockRegisterPageState extends State { padding: EdgeInsets.all(5.h), decoration: BoxDecoration( color: AppColors.mainColor, - borderRadius: BorderRadius.circular(5) - ), + borderRadius: BorderRadius.circular(5)), child: Center( - child: Text(_seconds==60?'${TranslationLoader.lanKeys!.getTip!.tr} ${TranslationLoader.lanKeys!.verificationCode!.tr}': (_seconds<10)?'0$_seconds s':'$_seconds s', textAlign:TextAlign.center, style: TextStyle( - color: Colors.white, - fontSize: 26.sp, - )), + child: Text( + _seconds == 60 + ? '${TranslationLoader.lanKeys!.getTip!.tr}${TranslationLoader.lanKeys!.verificationCode!.tr}' + : (_seconds < 10) + ? '0$_seconds s' + : '$_seconds s', + textAlign: TextAlign.center, + style: TextStyle( + color: Colors.white, + fontSize: 26.sp, + )), ), ), - onTap: (){ + onTap: () { Navigator.pushNamed(context, Routers.safetyVerificationPage); - if(_seconds==60){ + if (_seconds == 60) { // _setVerify(); - }else{ + } else { // Toast.show(msg: '正在获取验证码'); } }, @@ -274,4 +335,51 @@ class _StarLockRegisterPageState extends State { ], ); } + + Widget _buildBottomAgreement() { + return Row( + mainAxisAlignment: MainAxisAlignment.start, + children: [ + Image.asset( + 'images/icon_select_circle.png', + width: 28.w, + height: 28.w, + ), + // SizedBox( + // height: 20.h, + // width: 26.w, + // child: Checkbox(value: false, onChanged: (value) {})), + SizedBox( + width: 15.w, + ), + Flexible( + child: RichText( + text: TextSpan( + text: TranslationLoader.lanKeys!.readAndAgree!.tr, + style: TextStyle(color: const Color(0xff333333), fontSize: 20.sp), + children: [ + WidgetSpan( + alignment: PlaceholderAlignment.middle, + child: GestureDetector( + child: Text( + '《${TranslationLoader.lanKeys!.userAgreement!.tr}》', + style: TextStyle( + color: AppColors.mainColor, fontSize: 20.sp)), + onTap: () {}, + )), + WidgetSpan( + alignment: PlaceholderAlignment.middle, + child: GestureDetector( + child: Text( + '《${TranslationLoader.lanKeys!.privacyPolicy!.tr}》', + style: TextStyle( + color: AppColors.mainColor, fontSize: 20.sp)), + onTap: () {}, + )), + ], + )), + ) + ], + ); + } }