privacy_settings_view.dart
2.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
import 'package:doublefeel_flutter/core/theme/app_colors.dart';
import 'package:doublefeel_flutter/core/util/size_extensions.dart';
import 'package:doublefeel_flutter/r.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import '../controllers/privacy_settings_controller.dart';
class PrivacySettingsView extends GetView<PrivacySettingsController> {
const PrivacySettingsView({super.key});
static const _background = Color(0xFFF5F2FF);
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: _background,
appBar: AppBar(
backgroundColor: Colors.transparent,
toolbarHeight: 44.dp,
centerTitle: true,
title: Text(
"隐私设置",
style: TextStyle(
fontSize: 16,
color: Color(0xFF000000),
fontWeight: FontWeight.w500,
),
),
leading: IconButton(
highlightColor: Colors.transparent,
padding: EdgeInsets.zero,
onPressed: () {
controller.executeBackLogic();
},
icon: Image(
width: 24.w,
height: 24.w,
alignment: Alignment.centerLeft,
image: AssetImage(R.assetsImagesNavBackIcon),
),
),
),
body: PopScope(canPop: false, child: _buildContentView(context)),
);
}
Widget _buildContentView(BuildContext context) {
return SizedBox(
width: double.infinity,
height: double.infinity,
child: Column(
children: [
SizedBox(height: 16.dp),
noAddByIdView(),
],
),
);
}
Widget noAddByIdView() {
return Container(
width: double.infinity,
height: 48.dp,
margin: EdgeInsets.symmetric(horizontal: 16.dp),
padding: EdgeInsets.symmetric(horizontal: 20.dp),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16.dp),
),
child: Row(
children: [
Text(
"不允许通过ID添加我",
style: TextStyle(
fontSize: 14,
color: AppColors.textPrimary,
),
),
Spacer(),
Switch(
value: true,
inactiveTrackColor: Color(0xFF845EEE),
onChanged: (value) {},
)
],
),
);
}
}