216 lines
7.0 KiB
Dart
216 lines
7.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'agreement_page.dart';
|
|
|
|
class SettingPage extends StatefulWidget {
|
|
const SettingPage({super.key});
|
|
|
|
@override
|
|
State<SettingPage> createState() => _SettingPageState();
|
|
}
|
|
|
|
class _SettingPageState extends State<SettingPage> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final size = MediaQuery.of(context).size;
|
|
final h50 = size.width / 7.2;
|
|
final s16 = size.width / 22.5;
|
|
final l14 = size.width / 25.71428571428571;
|
|
final w19 = size.width / 18.94736842105263;
|
|
final h26 = size.width / 13.84615384615385;
|
|
final h60 = size.width / 6;
|
|
final t18 = size.width / 20;
|
|
final l15 = size.width / 24;
|
|
final l23 = size.width / 15.65217391304348;
|
|
|
|
return Scaffold(
|
|
backgroundColor: const Color(0xFF17181A),
|
|
body: Column(
|
|
children: [
|
|
Container(
|
|
width: size.width,
|
|
height: h50,
|
|
margin: EdgeInsets.only(top: MediaQuery.of(context).padding.top),
|
|
child: Stack(
|
|
alignment: Alignment.center,
|
|
children: [
|
|
Text(
|
|
"设置",
|
|
style: TextStyle(fontSize: s16, color: const Color(0xFFD6D6D7)),
|
|
),
|
|
Positioned(
|
|
left: l14,
|
|
child: GestureDetector(
|
|
onTap: () {
|
|
Navigator.pop(context);
|
|
},
|
|
child: Image(
|
|
width: w19,
|
|
height: h26,
|
|
image: const AssetImage('assets/images/btn_fanhui.png'),
|
|
),
|
|
),
|
|
)
|
|
],
|
|
),
|
|
),
|
|
|
|
///用户协议
|
|
GestureDetector(
|
|
onTap: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (context) => const AgreementPage(
|
|
title: "用户协议",
|
|
url: "https://shhuanmeng.com/yonghuxieyi.html",
|
|
)),
|
|
);
|
|
},
|
|
child: Container(
|
|
height: h60,
|
|
margin: EdgeInsets.only(top: t18, left: l15, right: l15),
|
|
decoration: const BoxDecoration(
|
|
color: Color(0xFF202530),
|
|
borderRadius: BorderRadius.all(Radius.circular(11)),
|
|
),
|
|
child: Row(
|
|
children: [
|
|
Container(
|
|
margin: EdgeInsets.only(left: l14),
|
|
child: const Text(
|
|
"用户协议",
|
|
style: TextStyle(fontSize: 14, color: Color(0xFFD6D6D7)),
|
|
),
|
|
),
|
|
Expanded(child: Container()),
|
|
Container(
|
|
margin: EdgeInsets.only(right: l23),
|
|
child: const Image(
|
|
width: 4,
|
|
height: 8,
|
|
image: AssetImage('assets/images/ic_arrow.png'),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
|
|
///隐私政策
|
|
GestureDetector(
|
|
onTap: () {
|
|
Navigator.push(
|
|
context,
|
|
MaterialPageRoute(
|
|
builder: (context) => const AgreementPage(
|
|
title: "隐私政策",
|
|
url: "https://shhuanmeng.com/yinsixieyi.html",
|
|
)),
|
|
);
|
|
},
|
|
child: Container(
|
|
height: h60,
|
|
margin: EdgeInsets.only(top: t18, left: l15, right: l15),
|
|
decoration: const BoxDecoration(
|
|
color: Color(0xFF202530),
|
|
borderRadius: BorderRadius.all(Radius.circular(11)),
|
|
),
|
|
child: Row(
|
|
children: [
|
|
Container(
|
|
margin: EdgeInsets.only(left: l14),
|
|
child: const Text(
|
|
"隐私政策",
|
|
style: TextStyle(fontSize: 14, color: Color(0xFFD6D6D7)),
|
|
),
|
|
),
|
|
Expanded(child: Container()),
|
|
Container(
|
|
margin: EdgeInsets.only(right: l23),
|
|
child: const Image(
|
|
width: 4,
|
|
height: 8,
|
|
image: AssetImage('assets/images/ic_arrow.png'),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
|
|
///实名认证
|
|
GestureDetector(
|
|
onTap: () {
|
|
Navigator.pushNamed(context, "/RealNamePage");
|
|
},
|
|
child: Container(
|
|
height: h60,
|
|
margin: EdgeInsets.only(top: t18, left: l15, right: l15),
|
|
decoration: const BoxDecoration(
|
|
color: Color(0xFF202530),
|
|
borderRadius: BorderRadius.all(Radius.circular(11)),
|
|
),
|
|
child: Row(
|
|
children: [
|
|
Container(
|
|
margin: EdgeInsets.only(left: l14),
|
|
child: const Text(
|
|
"实名认证",
|
|
style: TextStyle(fontSize: 14, color: Color(0xFFD6D6D7)),
|
|
),
|
|
),
|
|
Expanded(child: Container()),
|
|
Container(
|
|
margin: EdgeInsets.only(right: l23),
|
|
child: const Image(
|
|
width: 4,
|
|
height: 8,
|
|
image: AssetImage('assets/images/ic_arrow.png'),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
|
|
///关于
|
|
GestureDetector(
|
|
onTap: () {
|
|
Navigator.pushNamed(context, "/AboutPage");
|
|
},
|
|
child: Container(
|
|
height: h60,
|
|
margin: EdgeInsets.only(top: t18, left: l15, right: l15),
|
|
decoration: const BoxDecoration(
|
|
color: Color(0xFF202530),
|
|
borderRadius: BorderRadius.all(Radius.circular(11)),
|
|
),
|
|
child: Row(
|
|
children: [
|
|
Container(
|
|
margin: EdgeInsets.only(left: l14),
|
|
child: const Text(
|
|
"关于",
|
|
style: TextStyle(fontSize: 14, color: Color(0xFFD6D6D7)),
|
|
),
|
|
),
|
|
Expanded(child: Container()),
|
|
Container(
|
|
margin: EdgeInsets.only(right: l23),
|
|
child: const Image(
|
|
width: 4,
|
|
height: 8,
|
|
image: AssetImage('assets/images/ic_arrow.png'),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|