You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.4 KiB
73 lines
2.4 KiB
import 'package:dating_touchme_app/components/page_appbar.dart';
|
|
import 'package:dating_touchme_app/extension/ex_widget.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:pinput/pinput.dart';
|
|
|
|
class TeenagerModeOpenPage extends StatelessWidget {
|
|
const TeenagerModeOpenPage({super.key});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
appBar: PageAppbar(title: "开启未成年人模式"),
|
|
body: Container(
|
|
width: 375.w,
|
|
padding: EdgeInsets.only(top: 140.w),
|
|
child: Column(
|
|
children: [
|
|
Text(
|
|
"设置密码",
|
|
style: TextStyle(
|
|
fontSize: 21.w,
|
|
fontWeight: FontWeight.w500
|
|
),
|
|
),
|
|
SizedBox(height: 25.w,),
|
|
Pinput(
|
|
inputFormatters: [
|
|
// 只允许 0-9
|
|
FilteringTextInputFormatter.digitsOnly,
|
|
],
|
|
onCompleted: (pin) => print(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%
|
|
),
|
|
),
|
|
child: Center(
|
|
child: Text(
|
|
"下一步",
|
|
style: TextStyle(
|
|
fontSize: 18.w,
|
|
color: Colors.white,
|
|
fontWeight: FontWeight.w500
|
|
),
|
|
),
|
|
),
|
|
).onTap((){
|
|
Get.to(() => TeenagerModeOpenPage());
|
|
}),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|