74 lines
2.2 KiB
Dart
74 lines
2.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_verification_code/flutter_verification_code.dart';
|
|
import 'package:talk/tools/me/teenage_confirm_password_page.dart';
|
|
|
|
///青少年模式设置密码
|
|
class TeenagePasswordPage extends StatefulWidget {
|
|
const TeenagePasswordPage({super.key});
|
|
|
|
@override
|
|
State<TeenagePasswordPage> createState() => _TeenagePasswordPageState();
|
|
}
|
|
|
|
class _TeenagePasswordPageState extends State<TeenagePasswordPage> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: const Color(0xFF121213),
|
|
appBar: AppBar(
|
|
backgroundColor: const Color(0xFF121213),
|
|
scrolledUnderElevation: 0.0,
|
|
title: const Text(
|
|
'青少年模式',
|
|
style: TextStyle(fontSize: 16, color: Colors.white),
|
|
),
|
|
centerTitle: true,
|
|
leading: IconButton(
|
|
iconSize: 18,
|
|
icon: const Icon(Icons.arrow_back_ios_sharp),
|
|
color: Colors.white,
|
|
onPressed: () {
|
|
// 处理返回操作
|
|
Navigator.pop(context);
|
|
},
|
|
),
|
|
),
|
|
body: Column(
|
|
children: [
|
|
Container(
|
|
alignment: Alignment.center,
|
|
margin: EdgeInsets.only(top: 40),
|
|
child: Text(
|
|
'设置密码',
|
|
style: TextStyle(color: Color(0xFFF2F2F2), fontSize: 20),
|
|
),
|
|
),
|
|
Container(
|
|
alignment: Alignment.center,
|
|
child: Text(
|
|
'此密码为关闭青少年模式的密码',
|
|
style: TextStyle(color: Color(0xFFA8A8A8), fontSize: 14),
|
|
),
|
|
),
|
|
Container(
|
|
child: VerificationCode(
|
|
textStyle: TextStyle(color: Colors.lightBlue),
|
|
onCompleted: (String value) {
|
|
Navigator.pushReplacement(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (context) => TeenageConfirmPasswordPage(value: value),
|
|
),
|
|
);
|
|
},
|
|
onEditing: (bool value) {
|
|
print("objectvalue==$value");
|
|
},
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|