2025-03-13 15:07:26 +08:00
|
|
|
|
import 'package:flutter/cupertino.dart';
|
2023-07-10 17:50:31 +08:00
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
|
|
import 'package:get/get.dart';
|
2024-04-26 15:38:59 +08:00
|
|
|
|
import 'package:star_lock/app_settings/app_settings.dart';
|
2024-06-03 13:50:07 +08:00
|
|
|
|
import 'package:star_lock/login/register/starLock_register_state.dart';
|
2023-07-10 17:50:31 +08:00
|
|
|
|
|
|
|
|
|
|
import '../../appRouters.dart';
|
|
|
|
|
|
import '../../app_settings/app_colors.dart';
|
2023-11-03 13:58:41 +08:00
|
|
|
|
import '../../common/XSConstantMacro/XSConstantMacro.dart';
|
2023-07-10 17:50:31 +08:00
|
|
|
|
import '../../tools/submitBtn.dart';
|
2024-06-03 13:50:07 +08:00
|
|
|
|
import '../../tools/tf_loginInput.dart';
|
2023-07-10 17:50:31 +08:00
|
|
|
|
import '../../tools/titleAppBar.dart';
|
2023-07-29 09:25:21 +08:00
|
|
|
|
import 'starLock_register_logic.dart';
|
2023-07-10 17:50:31 +08:00
|
|
|
|
|
|
|
|
|
|
class StarLockRegisterPage extends StatefulWidget {
|
2023-07-15 15:11:28 +08:00
|
|
|
|
const StarLockRegisterPage({Key? key}) : super(key: key);
|
2023-07-10 17:50:31 +08:00
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
State<StarLockRegisterPage> createState() => _StarLockRegisterPageState();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class _StarLockRegisterPageState extends State<StarLockRegisterPage> {
|
2024-06-03 13:50:07 +08:00
|
|
|
|
final StarLockRegisterLogic logic = Get.put(StarLockRegisterLogic());
|
|
|
|
|
|
final StarLockRegisterState state = Get.find<StarLockRegisterLogic>().state;
|
2023-07-10 17:50:31 +08:00
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
|
return Scaffold(
|
|
|
|
|
|
resizeToAvoidBottomInset: false,
|
|
|
|
|
|
backgroundColor: const Color(0xFFFFFFFF),
|
2023-07-29 10:58:26 +08:00
|
|
|
|
appBar: TitleAppBar(
|
2024-08-01 18:54:32 +08:00
|
|
|
|
barTitle: '注册'.tr,
|
2023-07-29 10:58:26 +08:00
|
|
|
|
haveBack: true,
|
|
|
|
|
|
backgroundColor: AppColors.mainColor),
|
|
|
|
|
|
body: ListView(
|
|
|
|
|
|
padding: EdgeInsets.only(top: 40.h, left: 40.w, right: 40.w),
|
2024-06-03 13:50:07 +08:00
|
|
|
|
children: <Widget>[
|
2024-01-23 17:29:18 +08:00
|
|
|
|
topSelectCountryAndRegionWidget(),
|
2023-07-29 09:25:21 +08:00
|
|
|
|
middleTFWidget(),
|
|
|
|
|
|
Obx(() {
|
|
|
|
|
|
return SubmitBtn(
|
2024-08-01 18:54:32 +08:00
|
|
|
|
btnName: '注册'.tr,
|
2023-07-29 09:25:21 +08:00
|
|
|
|
// backgroundColorList: state.canSub.value ? [AppColors.mainColor] :[Colors.grey],
|
|
|
|
|
|
fontSize: 30.sp,
|
|
|
|
|
|
borderRadius: 20.w,
|
|
|
|
|
|
padding: EdgeInsets.only(top: 25.w, bottom: 25.w),
|
|
|
|
|
|
isDisabled: state.canSub.value,
|
2023-07-29 10:58:26 +08:00
|
|
|
|
onClick: state.canSub.value
|
|
|
|
|
|
? () {
|
2024-03-08 13:55:47 +08:00
|
|
|
|
if (state.agree.value == false) {
|
2024-04-07 14:03:59 +08:00
|
|
|
|
logic.showToast('请先同意用户协议及隐私政策'.tr);
|
2024-03-08 13:55:47 +08:00
|
|
|
|
return;
|
|
|
|
|
|
} else {
|
|
|
|
|
|
logic.register();
|
|
|
|
|
|
}
|
2023-07-29 10:58:26 +08:00
|
|
|
|
}
|
|
|
|
|
|
: null);
|
2023-07-10 17:50:31 +08:00
|
|
|
|
}),
|
2023-07-29 10:58:26 +08:00
|
|
|
|
SizedBox(
|
|
|
|
|
|
height: 20.h,
|
|
|
|
|
|
),
|
|
|
|
|
|
_buildBottomAgreement()
|
2023-07-10 17:50:31 +08:00
|
|
|
|
],
|
2023-07-29 10:58:26 +08:00
|
|
|
|
));
|
2023-07-10 17:50:31 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-01-23 17:29:18 +08:00
|
|
|
|
Widget topSelectCountryAndRegionWidget() {
|
2023-07-10 17:50:31 +08:00
|
|
|
|
return Column(
|
2024-06-03 13:50:07 +08:00
|
|
|
|
children: <Widget>[
|
2023-07-29 10:58:26 +08:00
|
|
|
|
SizedBox(height: 50.h),
|
2023-07-10 17:50:31 +08:00
|
|
|
|
Row(
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
2024-06-03 13:50:07 +08:00
|
|
|
|
children: <Widget>[
|
2023-07-10 17:50:31 +08:00
|
|
|
|
Container(
|
2023-07-29 10:58:26 +08:00
|
|
|
|
width: 340.w,
|
2023-07-10 17:50:31 +08:00
|
|
|
|
height: 60.h,
|
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
|
borderRadius: BorderRadius.all(Radius.circular(30.h)),
|
2024-04-30 16:31:40 +08:00
|
|
|
|
border:
|
|
|
|
|
|
Border.all(width: 1.0, color: AppColors.greyLineColor)),
|
2023-07-10 17:50:31 +08:00
|
|
|
|
child: Row(
|
2024-06-03 13:50:07 +08:00
|
|
|
|
children: <Widget>[
|
2023-07-10 17:50:31 +08:00
|
|
|
|
GestureDetector(
|
2023-08-02 09:22:39 +08:00
|
|
|
|
onTap: () {
|
|
|
|
|
|
state.isIphoneType.value = true;
|
|
|
|
|
|
},
|
2025-03-13 15:07:26 +08:00
|
|
|
|
child: Obx(
|
|
|
|
|
|
() => Container(
|
2023-07-29 10:58:26 +08:00
|
|
|
|
width: 170.w,
|
2023-07-10 17:50:31 +08:00
|
|
|
|
height: 60.h,
|
2023-08-23 14:27:50 +08:00
|
|
|
|
decoration: state.isIphoneType.value
|
|
|
|
|
|
? BoxDecoration(
|
|
|
|
|
|
color: AppColors.mainColor,
|
|
|
|
|
|
borderRadius:
|
|
|
|
|
|
BorderRadius.all(Radius.circular(30.h)),
|
|
|
|
|
|
border: Border.all(
|
|
|
|
|
|
width: 1.0, color: AppColors.greyLineColor))
|
|
|
|
|
|
: null,
|
2023-07-29 10:58:26 +08:00
|
|
|
|
child: Center(
|
2025-03-13 15:07:26 +08:00
|
|
|
|
child: Text(
|
|
|
|
|
|
'手机'.tr,
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
color: state.isIphoneType.value
|
|
|
|
|
|
? Colors.white
|
|
|
|
|
|
: Colors.black),
|
|
|
|
|
|
),
|
|
|
|
|
|
),
|
|
|
|
|
|
),
|
|
|
|
|
|
),
|
2023-07-10 17:50:31 +08:00
|
|
|
|
),
|
|
|
|
|
|
Expanded(
|
|
|
|
|
|
child: GestureDetector(
|
2023-08-02 09:22:39 +08:00
|
|
|
|
onTap: () {
|
|
|
|
|
|
state.isIphoneType.value = false;
|
|
|
|
|
|
},
|
2025-03-13 15:07:26 +08:00
|
|
|
|
child: Obx(
|
|
|
|
|
|
() => Container(
|
2023-07-10 17:50:31 +08:00
|
|
|
|
height: 60.h,
|
2025-05-07 18:30:19 +08:00
|
|
|
|
decoration: !state.isIphoneType.value
|
|
|
|
|
|
? BoxDecoration(
|
2023-08-23 14:27:50 +08:00
|
|
|
|
color: AppColors.mainColor,
|
2025-05-07 18:30:19 +08:00
|
|
|
|
borderRadius:
|
|
|
|
|
|
BorderRadius.all(Radius.circular(30.h)),
|
2023-08-23 14:27:50 +08:00
|
|
|
|
border: Border.all(
|
2025-05-07 18:30:19 +08:00
|
|
|
|
width: 1.0,
|
|
|
|
|
|
color: AppColors.greyLineColor))
|
|
|
|
|
|
: null,
|
2023-07-29 10:58:26 +08:00
|
|
|
|
child: Center(
|
2025-03-13 15:07:26 +08:00
|
|
|
|
child: Text(
|
|
|
|
|
|
'邮箱'.tr,
|
|
|
|
|
|
style: TextStyle(
|
2025-05-07 18:30:19 +08:00
|
|
|
|
color: !state.isIphoneType.value
|
|
|
|
|
|
? Colors.white
|
|
|
|
|
|
: Colors.black,
|
2025-03-13 15:07:26 +08:00
|
|
|
|
),
|
|
|
|
|
|
),
|
|
|
|
|
|
),
|
|
|
|
|
|
),
|
|
|
|
|
|
),
|
2023-07-10 17:50:31 +08:00
|
|
|
|
),
|
|
|
|
|
|
),
|
|
|
|
|
|
],
|
|
|
|
|
|
),
|
|
|
|
|
|
),
|
|
|
|
|
|
],
|
|
|
|
|
|
),
|
2023-07-29 10:58:26 +08:00
|
|
|
|
SizedBox(height: 60.h),
|
2023-07-10 17:50:31 +08:00
|
|
|
|
GestureDetector(
|
2023-07-29 09:25:21 +08:00
|
|
|
|
onTap: () async {
|
2024-06-03 13:50:07 +08:00
|
|
|
|
final result = await Get.toNamed(Routers.selectCountryRegionPage);
|
2023-09-28 18:22:35 +08:00
|
|
|
|
if (result != null) {
|
|
|
|
|
|
result as Map<String, dynamic>;
|
2024-02-01 11:22:44 +08:00
|
|
|
|
state.countryCode.value = result['code'];
|
|
|
|
|
|
state.countryName.value = result['countryName'];
|
2024-06-07 10:53:24 +08:00
|
|
|
|
logic.checkIpAction();
|
2023-09-28 18:22:35 +08:00
|
|
|
|
}
|
2024-08-21 18:31:19 +08:00
|
|
|
|
// AppLog.log('路由返回值: $result, countryCode:${logic.state.countryCode}');
|
2023-07-10 17:50:31 +08:00
|
|
|
|
},
|
2024-04-12 18:03:40 +08:00
|
|
|
|
child: Obx(() => SizedBox(
|
2024-04-30 16:31:40 +08:00
|
|
|
|
height: 70.h,
|
|
|
|
|
|
child: Row(
|
2024-06-03 13:50:07 +08:00
|
|
|
|
children: <Widget>[
|
2024-04-30 16:31:40 +08:00
|
|
|
|
SizedBox(width: 5.w),
|
|
|
|
|
|
Expanded(
|
2025-03-13 15:07:26 +08:00
|
|
|
|
child: Text('你所在的国家/地区'.tr,
|
2024-04-30 16:31:40 +08:00
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
fontSize: 26.sp, color: AppColors.blackColor))),
|
|
|
|
|
|
SizedBox(width: 20.w),
|
|
|
|
|
|
Row(
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
2024-06-03 13:50:07 +08:00
|
|
|
|
children: <Widget>[
|
2024-04-30 16:31:40 +08:00
|
|
|
|
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,
|
|
|
|
|
|
),
|
2023-07-10 17:50:31 +08:00
|
|
|
|
],
|
|
|
|
|
|
),
|
2024-04-30 16:31:40 +08:00
|
|
|
|
)),
|
2023-07-10 17:50:31 +08:00
|
|
|
|
),
|
2023-07-29 10:58:26 +08:00
|
|
|
|
Container(
|
|
|
|
|
|
height: 0.5.h,
|
|
|
|
|
|
color: Colors.grey,
|
|
|
|
|
|
)
|
2023-07-10 17:50:31 +08:00
|
|
|
|
],
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2023-07-29 10:58:26 +08:00
|
|
|
|
Widget middleTFWidget() {
|
2023-07-10 17:50:31 +08:00
|
|
|
|
return Column(
|
2024-06-03 13:50:07 +08:00
|
|
|
|
children: <Widget>[
|
2024-04-06 09:19:35 +08:00
|
|
|
|
Obx(() => LoginInput(
|
2024-04-30 16:31:40 +08:00
|
|
|
|
controller: state.phoneOrEmailController,
|
|
|
|
|
|
onchangeAction: (v) {
|
|
|
|
|
|
logic.checkNext(state.phoneOrEmailController);
|
|
|
|
|
|
},
|
|
|
|
|
|
leftWidget:
|
|
|
|
|
|
// Image.asset('images/icon_login_account.png', width: 30.w, height: 30.w,),
|
|
|
|
|
|
Padding(
|
2024-05-03 18:30:45 +08:00
|
|
|
|
padding: EdgeInsets.only(right: 5.w, left: 5.w),
|
2024-04-30 16:31:40 +08:00
|
|
|
|
child: Image.asset(
|
|
|
|
|
|
state.isIphoneType.value
|
|
|
|
|
|
? 'images/icon_login_account.png'
|
2024-06-03 13:50:07 +08:00
|
|
|
|
: 'images/icon_login_email.png',
|
2024-04-30 16:31:40 +08:00
|
|
|
|
width: 30.w,
|
|
|
|
|
|
height: 30.w,
|
|
|
|
|
|
),
|
|
|
|
|
|
),
|
2025-03-13 15:07:26 +08:00
|
|
|
|
hintText: state.isIphoneType.value ? '请输入手机号'.tr : '请输入邮箱'.tr,
|
2024-04-30 16:31:40 +08:00
|
|
|
|
keyboardType: TextInputType.number,
|
2024-06-03 13:50:07 +08:00
|
|
|
|
inputFormatters: <TextInputFormatter>[
|
2024-04-30 16:31:40 +08:00
|
|
|
|
// FilteringTextInputFormatter.allow(RegExp('[0-9]')),
|
|
|
|
|
|
LengthLimitingTextInputFormatter(30),
|
|
|
|
|
|
])),
|
2023-07-10 17:50:31 +08:00
|
|
|
|
SizedBox(height: 10.w),
|
2024-03-20 15:12:35 +08:00
|
|
|
|
LoginInput(
|
2023-07-29 09:25:21 +08:00
|
|
|
|
controller: state.pwdController,
|
|
|
|
|
|
onchangeAction: (v) {
|
|
|
|
|
|
logic.checkNext(state.pwdController);
|
|
|
|
|
|
},
|
2023-07-18 18:10:57 +08:00
|
|
|
|
isPwd: true,
|
2024-05-04 18:14:23 +08:00
|
|
|
|
// isSuffixIcon: 2,
|
2023-07-29 10:58:26 +08:00
|
|
|
|
leftWidget: Padding(
|
2024-05-03 18:30:45 +08:00
|
|
|
|
padding: EdgeInsets.only(right: 5.w, left: 5.w),
|
2023-08-23 14:27:50 +08:00
|
|
|
|
child: Image.asset(
|
|
|
|
|
|
'images/icon_login_password.png',
|
|
|
|
|
|
width: 30.w,
|
|
|
|
|
|
height: 30.w,
|
|
|
|
|
|
),
|
2023-07-18 18:10:57 +08:00
|
|
|
|
),
|
2025-03-13 15:07:26 +08:00
|
|
|
|
hintText: '请输入密码'.tr,
|
2024-06-03 13:50:07 +08:00
|
|
|
|
inputFormatters: <TextInputFormatter>[
|
2023-07-18 18:10:57 +08:00
|
|
|
|
LengthLimitingTextInputFormatter(20),
|
2023-07-29 10:58:26 +08:00
|
|
|
|
]),
|
2023-07-10 17:50:31 +08:00
|
|
|
|
SizedBox(height: 15.w),
|
2023-07-29 10:58:26 +08:00
|
|
|
|
Text(
|
2024-08-01 18:54:32 +08:00
|
|
|
|
'密码必须是8-20位,至少包括数字/字母/符号中的2种'.tr,
|
2023-07-29 10:58:26 +08:00
|
|
|
|
style:
|
|
|
|
|
|
TextStyle(color: AppColors.placeholderTextColor, fontSize: 20.sp),
|
|
|
|
|
|
),
|
2023-07-10 17:50:31 +08:00
|
|
|
|
SizedBox(height: 10.w),
|
2024-03-20 15:12:35 +08:00
|
|
|
|
LoginInput(
|
2023-07-29 09:25:21 +08:00
|
|
|
|
controller: state.sureController,
|
|
|
|
|
|
onchangeAction: (v) {
|
|
|
|
|
|
logic.checkNext(state.sureController);
|
|
|
|
|
|
},
|
2023-07-18 18:10:57 +08:00
|
|
|
|
isPwd: true,
|
2024-05-04 18:14:23 +08:00
|
|
|
|
// isSuffixIcon: 2,
|
2023-07-29 10:58:26 +08:00
|
|
|
|
leftWidget: Padding(
|
2023-07-29 18:33:48 +08:00
|
|
|
|
padding: EdgeInsets.only(right: 10.w, left: 5.w),
|
2023-08-23 14:27:50 +08:00
|
|
|
|
child: Image.asset(
|
|
|
|
|
|
'images/icon_login_password.png',
|
|
|
|
|
|
width: 30.w,
|
|
|
|
|
|
height: 30.w,
|
|
|
|
|
|
),
|
2023-07-18 18:10:57 +08:00
|
|
|
|
),
|
2024-07-25 14:40:02 +08:00
|
|
|
|
hintText: '确认密码'.tr,
|
2024-06-03 13:50:07 +08:00
|
|
|
|
inputFormatters: <TextInputFormatter>[
|
2023-07-18 18:10:57 +08:00
|
|
|
|
LengthLimitingTextInputFormatter(20),
|
2023-07-29 10:58:26 +08:00
|
|
|
|
]),
|
2023-07-10 17:50:31 +08:00
|
|
|
|
SizedBox(height: 10.w),
|
2023-07-18 18:10:57 +08:00
|
|
|
|
Row(
|
2024-06-03 13:50:07 +08:00
|
|
|
|
children: <Widget>[
|
2023-07-18 18:10:57 +08:00
|
|
|
|
Expanded(
|
2024-03-20 15:12:35 +08:00
|
|
|
|
child: LoginInput(
|
2023-07-29 09:25:21 +08:00
|
|
|
|
controller: state.codeController,
|
|
|
|
|
|
onchangeAction: (v) {
|
|
|
|
|
|
logic.checkNext(state.codeController);
|
|
|
|
|
|
},
|
2023-07-29 10:58:26 +08:00
|
|
|
|
leftWidget: Padding(
|
2023-07-29 18:33:48 +08:00
|
|
|
|
padding: EdgeInsets.only(right: 10.w, left: 5.w),
|
2023-07-29 10:58:26 +08:00
|
|
|
|
child: SizedBox(
|
2023-07-29 18:33:48 +08:00
|
|
|
|
width: 30.w,
|
|
|
|
|
|
height: 30.w,
|
2023-07-29 10:58:26 +08:00
|
|
|
|
),
|
2023-07-18 18:10:57 +08:00
|
|
|
|
),
|
2025-03-13 15:07:26 +08:00
|
|
|
|
hintText: '请输入验证码'.tr,
|
2024-06-03 13:50:07 +08:00
|
|
|
|
inputFormatters: <TextInputFormatter>[
|
2023-07-18 18:10:57 +08:00
|
|
|
|
LengthLimitingTextInputFormatter(20),
|
2023-07-29 10:58:26 +08:00
|
|
|
|
]),
|
|
|
|
|
|
),
|
|
|
|
|
|
SizedBox(
|
|
|
|
|
|
width: 20.w,
|
2023-07-18 18:10:57 +08:00
|
|
|
|
),
|
2023-08-02 09:22:39 +08:00
|
|
|
|
Obx(() => GestureDetector(
|
2025-03-13 15:07:26 +08:00
|
|
|
|
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: <String, Object>{
|
|
|
|
|
|
'countryCode': state.countryCode,
|
|
|
|
|
|
'account': state.phoneOrEmailStr.value
|
|
|
|
|
|
});
|
|
|
|
|
|
state.xWidth.value =
|
|
|
|
|
|
(result! as Map<String, dynamic>)['xWidth'];
|
|
|
|
|
|
logic.sendValidationCode();
|
|
|
|
|
|
}
|
|
|
|
|
|
: null,
|
2023-08-23 14:27:50 +08:00
|
|
|
|
child: Container(
|
|
|
|
|
|
width: 180.w,
|
2024-04-07 14:03:59 +08:00
|
|
|
|
// height: 60.h,
|
|
|
|
|
|
padding: EdgeInsets.all(10.h),
|
2023-08-23 14:27:50 +08:00
|
|
|
|
decoration: BoxDecoration(
|
2025-03-13 15:07:26 +08:00
|
|
|
|
color:
|
|
|
|
|
|
(state.canSendCode.value && state.canResend.value)
|
|
|
|
|
|
? AppColors.mainColor
|
|
|
|
|
|
: Colors.grey,
|
2023-08-23 14:27:50 +08:00
|
|
|
|
borderRadius: BorderRadius.circular(5)),
|
|
|
|
|
|
child: Center(
|
|
|
|
|
|
child: Text(state.btnText.value,
|
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
|
fontSize: 26.sp,
|
|
|
|
|
|
)),
|
|
|
|
|
|
),
|
|
|
|
|
|
),
|
|
|
|
|
|
))
|
2023-07-18 18:10:57 +08:00
|
|
|
|
],
|
|
|
|
|
|
),
|
2023-07-10 17:50:31 +08:00
|
|
|
|
SizedBox(height: 50.w),
|
|
|
|
|
|
],
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
2023-07-29 10:58:26 +08:00
|
|
|
|
|
|
|
|
|
|
Widget _buildBottomAgreement() {
|
|
|
|
|
|
return Row(
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.start,
|
2024-06-03 13:50:07 +08:00
|
|
|
|
children: <Widget>[
|
2024-03-08 13:55:47 +08:00
|
|
|
|
Obx(() => GestureDetector(
|
|
|
|
|
|
onTap: () {
|
|
|
|
|
|
state.agree.value = !state.agree.value;
|
|
|
|
|
|
logic.changeAgreeState();
|
|
|
|
|
|
},
|
|
|
|
|
|
child: Image.asset(
|
|
|
|
|
|
state.agree.value
|
|
|
|
|
|
? 'images/icon_round_select.png'
|
|
|
|
|
|
: 'images/icon_round_unSelect.png',
|
|
|
|
|
|
width: 30.w,
|
|
|
|
|
|
height: 30.w,
|
|
|
|
|
|
))),
|
2023-07-29 10:58:26 +08:00
|
|
|
|
SizedBox(
|
|
|
|
|
|
width: 15.w,
|
|
|
|
|
|
),
|
|
|
|
|
|
Flexible(
|
|
|
|
|
|
child: RichText(
|
|
|
|
|
|
text: TextSpan(
|
2024-08-01 18:54:32 +08:00
|
|
|
|
text: '我已阅读并同意'.tr,
|
2023-07-29 10:58:26 +08:00
|
|
|
|
style: TextStyle(color: const Color(0xff333333), fontSize: 20.sp),
|
2024-06-03 13:50:07 +08:00
|
|
|
|
children: <InlineSpan>[
|
2023-07-29 10:58:26 +08:00
|
|
|
|
WidgetSpan(
|
|
|
|
|
|
alignment: PlaceholderAlignment.middle,
|
|
|
|
|
|
child: GestureDetector(
|
2025-03-13 15:07:26 +08:00
|
|
|
|
child: Text('《${'用户协议'.tr}》',
|
2023-07-29 10:58:26 +08:00
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
color: AppColors.mainColor, fontSize: 20.sp)),
|
2023-11-03 13:58:41 +08:00
|
|
|
|
onTap: () {
|
2025-03-13 15:07:26 +08:00
|
|
|
|
Get.toNamed(Routers.webviewShowPage,
|
|
|
|
|
|
arguments: <String, String>{
|
|
|
|
|
|
'url': XSConstantMacro.userAgreementURL,
|
|
|
|
|
|
'title': '用户协议'.tr
|
|
|
|
|
|
});
|
2023-11-03 13:58:41 +08:00
|
|
|
|
},
|
2023-07-29 10:58:26 +08:00
|
|
|
|
)),
|
|
|
|
|
|
WidgetSpan(
|
|
|
|
|
|
alignment: PlaceholderAlignment.middle,
|
|
|
|
|
|
child: GestureDetector(
|
2025-03-13 15:07:26 +08:00
|
|
|
|
child: Text('《${'隐私政策'.tr}》',
|
2023-07-29 10:58:26 +08:00
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
color: AppColors.mainColor, fontSize: 20.sp)),
|
2023-11-03 13:58:41 +08:00
|
|
|
|
onTap: () {
|
2025-03-13 15:07:26 +08:00
|
|
|
|
Get.toNamed(Routers.webviewShowPage,
|
|
|
|
|
|
arguments: <String, String>{
|
|
|
|
|
|
'url': XSConstantMacro.privacyPolicyURL,
|
|
|
|
|
|
'title': '隐私政策'.tr
|
|
|
|
|
|
});
|
2023-11-03 13:58:41 +08:00
|
|
|
|
},
|
2023-07-29 10:58:26 +08:00
|
|
|
|
)),
|
|
|
|
|
|
],
|
|
|
|
|
|
)),
|
|
|
|
|
|
)
|
|
|
|
|
|
],
|
|
|
|
|
|
);
|
|
|
|
|
|
}
|
2023-07-10 17:50:31 +08:00
|
|
|
|
}
|