first_page.dart
11.7 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:one_key/app.dart';
import 'package:one_key/res/colors.dart';
import 'package:one_key/route/navigator_util.dart';
import 'package:one_key/utils/dialog_util.dart';
import 'package:one_key/utils/utils.dart';
import 'package:one_key/widgets/MyDivider.dart';
import 'package:one_key/widgets/round_button.dart';
import 'package:one_key/widgets/v_empty_view.dart';
class FirstPage extends StatefulWidget {
FirstPage({Key key}) : super(key: key);
@override
_FirstPageState createState() => _FirstPageState();
}
class _FirstPageState extends State<FirstPage> {
@override
void initState() {
// TODO: implement initState
super.initState();
Utils.changeStatusColor(color: MyColours.color_199095);
}
@override
Widget build(BuildContext context) {
ScreenUtil.init(context, width: 750, height: 1334);
return Scaffold(
body: Container(
color: MyColours.color_199095,
height: double.infinity,
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(40),
vertical: ScreenUtil().setWidth(80)),
child: Center(
child: Container(
height: ScreenUtil().setWidth(690),
decoration: BoxDecoration(
color: MyColours.color_ffffff,
borderRadius: BorderRadius.circular(ScreenUtil().setWidth(20)),
),
child: Column(
children: [
VEmptyView(40),
Text(
'温馨提示',
style: TextStyle(
color: MyColours.color_333333,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(34)),
),
VEmptyView(40),
MyDivider(double.infinity, ScreenUtil().setWidth(1)),
Expanded(
child: SingleChildScrollView(
child: Column(children: [
VEmptyView(50),
Padding(
padding: EdgeInsets.symmetric(
horizontal: ScreenUtil().setWidth(30)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
'亲爱的用户,感谢您信任并使用一键订!',
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(28),
),
strutStyle: StrutStyle(
forceStrutHeight: true,
height: 1,
leading: 0.3),
),
VEmptyView(16),
Wrap(
children: [
Text(
'我们制定了',
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(28),
),
strutStyle: StrutStyle(
forceStrutHeight: true,
height: 1,
leading: 0.3),
),
InkWell(
onTap: () {
NavigatorUtil.goWebPage(
context, '《隐私政策》', "zc",
need: true);
},
child: Text(
'《隐私政策》',
style: TextStyle(
color: MyColours.color_2bb5b7,
fontSize: ScreenUtil().setSp(28),
),
strutStyle: StrutStyle(
forceStrutHeight: true,
height: 1,
leading: 0.3),
),
),
Text(
'和',
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(28),
),
strutStyle: StrutStyle(
forceStrutHeight: true,
height: 1,
leading: 0.3),
),
InkWell(
onTap: () {
NavigatorUtil.goWebPage(
context, '软件服务协议', "xy",
need: true);
},
child: Text(
'《软件服务协议》',
style: TextStyle(
color: MyColours.color_2bb5b7,
fontSize: ScreenUtil().setSp(28),
),
strutStyle: StrutStyle(
forceStrutHeight: true,
height: 1,
leading: 0.3),
),
),
Text(
'请您点击同意之前仔细阅读并充分理解相关条款,其中的重点条款已为您标注,方便您了解自己的权利。',
style: TextStyle(
color: MyColours.color_333333,
fontSize: ScreenUtil().setSp(28),
),
strutStyle: StrutStyle(
forceStrutHeight: true,
height: 1,
leading: 0.3),
),
],
),
VEmptyView(16),
Text(
'''为了向您提供更好的服务,我们需要获取以下权限和信息,系统将以弹窗提示征求您的授权。
\n1.地理位置:经授权,为了让您的客户快速地找到您的店铺,我们会收集您店铺的名称、所在位置相关信息(您授权的GPS位置信息,我们仅收集您当时所处的地理位置,但不会将您各时段的位置信息进行结合以判断您的行踪轨迹)来判断您所处的地点。
\n2.通讯录:经授权,为了方便您快速录入客户的姓名、联系电话,在您同意开启通讯录权限后您在录入预订订单时不需再手动输入您通讯录中联系人的信息,用于订单快速生成。
\n3.相册:经授权,当您设置您的通知信息时,“一键订”需要调用基于图片/视频上传的扩展功能:我们会使用您所上传的图片,作为您的形象照片和微信二维码展示,方便客户添加您的微信。
\n4.相机:经授权,当您传送订单水单给客户时,“一键订”需要调用基于摄像头(相机)的扩展功能:您可以使用这项扩展功能完成拍照上传水单传送给客户。
\n5.设备信息:经授权,我们会收集您的设备信息以保障系统运行和您的账号、交易安全。''',
style: TextStyle(
color: MyColours.color_333333,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(28),
),
strutStyle: StrutStyle(
forceStrutHeight: true,
height: 1,
leading: 0.3),
),
VEmptyView(16),
Text(
'我们将通过《隐私政策》向您说明:\n我们在您使用我们的产品与/或服务时如何收集、使用、保存、共享和转让这些信息,以及我们为您提供的访问、更新、控制和保护这些信息的方式。',
style: TextStyle(
color: MyColours.color_333333,
fontWeight: FontWeight.bold,
fontSize: ScreenUtil().setSp(28),
),
strutStyle: StrutStyle(
forceStrutHeight: true,
height: 1,
leading: 0.3),
),
],
),
)
]),
)),
VEmptyView(40),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
RoundButton(
width: ScreenUtil().setWidth(100 * 2),
height: ScreenUtil().setWidth(70),
radius: ScreenUtil().setWidth(10),
text: '拒绝',
fontSize: 28,
isBold: false,
textColor: MyColours.color_199095,
gradientStart: MyColours.color_efefef,
gradientEnd: MyColours.color_efefef,
onPressed: () {
//修改之前有内容,则弹框
DialogUtil.cupertinoAlertDialog(context,
title: "",
content: "您需要同意《一键订隐私政策》,才能继续使用我们的服务哦。",
lTitle: "暂不",
rTitle: "去同意", lCallback: () {
print("取消");
//退出应用
exit(0);
}, rCallback: () {
print("确定");
});
}),
RoundButton(
width: ScreenUtil().setWidth(100 * 2),
height: ScreenUtil().setWidth(70),
radius: ScreenUtil().setWidth(10),
text: '同意',
fontSize: 28,
isBold: false,
textColor: MyColours.color_ffffff,
gradientStart: MyColours.color_199095,
gradientEnd: MyColours.color_199095,
onPressed: () {
App.sp.setBool("isFirst", false);
//进入应用
NavigatorUtil.goLoginPage(context);
}),
],
),
VEmptyView(40),
],
),
))),
);
}
}