1,更新登录、注册、忘记密码模块UI

This commit is contained in:
Daisy 2023-07-29 10:58:26 +08:00
parent bb725a7592
commit f53921fa5d
7 changed files with 440 additions and 276 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -296,7 +296,7 @@
"whenAddingLockThePhoneMustBeNextToTheLock":"whenAddingLockThePhoneMustBeNextToTheLock",
"login":"login",
"register":"Register",
"register":"register",
"forgetPassword":"forgetPassword",
"readAndAgree":"readAndAgree",
"verificationCode":"verificationCode",

View File

@ -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<StarLockForgetPasswordPage> createState() => _StarLockForgetPasswordPageState();
State<StarLockForgetPasswordPage> createState() =>
_StarLockForgetPasswordPageState();
}
class _StarLockForgetPasswordPageState extends State<StarLockForgetPasswordPage> {
class _StarLockForgetPasswordPageState
extends State<StarLockForgetPasswordPage> {
final TextEditingController _phoneController = TextEditingController();
final TextEditingController _pwdController = TextEditingController();
final TextEditingController _codeController = TextEditingController();
@ -34,89 +35,129 @@ class _StarLockForgetPasswordPageState extends State<StarLockForgetPasswordPage>
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<StarLockForgetPasswordPage>
],
),
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: () {}),
],
)
);
));
}
}
}

View File

@ -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<StarLockLoginPage> {
@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);
},
)
],
),
],
));
}
}

View File

@ -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<StarLockRegisterPage> {
final logic = Get.find<StarLockRegisterLogic>();
final state = Get.find<StarLockRegisterLogic>().state;
@ -34,13 +33,12 @@ class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
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<StarLockRegisterPage> {
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<StarLockRegisterPage> {
// 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<String, dynamic>)['code'];
var result = await Navigator.pushNamed(
context, Routers.seletCountryRegionPage);
logic.state.countryCode.value =
(result as Map<String, dynamic>)['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<StarLockRegisterPage> {
// 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<StarLockRegisterPage> {
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<StarLockRegisterPage> {
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<StarLockRegisterPage> {
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<StarLockRegisterPage> {
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<StarLockRegisterPage> {
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<StarLockRegisterPage> {
],
);
}
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: () {},
)),
],
)),
)
],
);
}
}