Browse Source

完善青少年模式交互,完善注销账号交互

ios
王子贤 3 months ago
parent
commit
ad77e16085
1 changed files with 75 additions and 73 deletions
  1. 148
      lib/pages/setting/teenager_mode_open_page.dart

148
lib/pages/setting/teenager_mode_open_page.dart

@ -17,86 +17,88 @@ class TeenagerModeOpenPage extends StatelessWidget {
builder: (controller) {
return Scaffold(
appBar: PageAppbar(title: controller.teenageMode.value ? "关闭未成年人模式" : "开启未成年人模式"),
body: Container(
width: 375.w,
padding: EdgeInsets.only(top: 140.w),
child: Column(
children: [
if(controller.teenageMode.value) Text(
"输入当前密码",
style: TextStyle(
fontSize: 21.w,
fontWeight: FontWeight.w500
body: SingleChildScrollView(
child: Container(
width: 375.w,
padding: EdgeInsets.only(top: 140.w),
child: Column(
children: [
if(controller.teenageMode.value) Text(
"输入当前密码",
style: TextStyle(
fontSize: 21.w,
fontWeight: FontWeight.w500
),
),
),
if(!controller.teenageMode.value) Text(
controller.password.value == "" ? "设置密码" : "确认密码",
style: TextStyle(
fontSize: 21.w,
fontWeight: FontWeight.w500
if(!controller.teenageMode.value) Text(
controller.password.value == "" ? "设置密码" : "确认密码",
style: TextStyle(
fontSize: 21.w,
fontWeight: FontWeight.w500
),
),
),
SizedBox(height: 25.w,),
Pinput(
controller: controller.passwordController.value,
inputFormatters: [
// 0-9
FilteringTextInputFormatter.digitsOnly,
],
onCompleted: (pin) {
print(pin);
if(!controller.teenageMode.value){
if(controller.password.value == ""){
controller.password.value = pin;
controller.passwordController.value.value = TextEditingValue(
text: "",
selection: TextSelection.fromPosition(TextPosition(offset: 0)),
);
SizedBox(height: 25.w,),
Pinput(
controller: controller.passwordController.value,
inputFormatters: [
// 0-9
FilteringTextInputFormatter.digitsOnly,
],
onCompleted: (pin) {
print(pin);
if(!controller.teenageMode.value){
if(controller.password.value == ""){
controller.password.value = pin;
controller.passwordController.value.value = TextEditingValue(
text: "",
selection: TextSelection.fromPosition(TextPosition(offset: 0)),
);
} else {
controller.confirmPassword.value = pin;
}
} else {
controller.confirmPassword.value = pin;
controller.password.value = pin;
}
} else {
controller.password.value = pin;
}
},
),
Container(
margin: EdgeInsets.only(top: 60.w),
child: Container(
width: 350.w,
height: 45.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(45.w)),
gradient: LinearGradient(
begin: Alignment.centerLeft, // 90deg:
end: Alignment.centerRight,
colors: [
Color.fromRGBO(131, 89, 255, 1), //
Color.fromRGBO(77, 127, 231, 1), //
Color.fromRGBO(61, 138, 224, 1), //
],
stops: [0.0, 0.7753, 1.0], // 0%77.53%100%
},
),
Container(
margin: EdgeInsets.only(top: 60.w),
child: Container(
width: 350.w,
height: 45.w,
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(45.w)),
gradient: LinearGradient(
begin: Alignment.centerLeft, // 90deg:
end: Alignment.centerRight,
colors: [
Color.fromRGBO(131, 89, 255, 1), //
Color.fromRGBO(77, 127, 231, 1), //
Color.fromRGBO(61, 138, 224, 1), //
],
stops: [0.0, 0.7753, 1.0], // 0%77.53%100%
),
),
),
child: Center(
child: Text(
controller.teenageMode.value ? "立即验证" : "下一步",
style: TextStyle(
fontSize: 18.w,
color: Colors.white,
fontWeight: FontWeight.w500
child: Center(
child: Text(
controller.teenageMode.value ? "立即验证" : "下一步",
style: TextStyle(
fontSize: 18.w,
color: Colors.white,
fontWeight: FontWeight.w500
),
),
),
),
).onTap((){
if(!controller.teenageMode.value){
controller.openTeenagerMode();
} else {
controller.closeTeenagerMode();
}
}),
)
],
).onTap((){
if(!controller.teenageMode.value){
controller.openTeenagerMode();
} else {
controller.closeTeenagerMode();
}
}),
)
],
),
),
),
);

Loading…
Cancel
Save