123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199 |
- import 'dart:io';
- import 'package:flutter/gestures.dart';
- import 'package:flutter/material.dart';
- import 'package:liftmanager/custom_route.dart';
- import 'package:liftmanager/internal/home/splash_page.dart';
- import 'package:liftmanager/internal/work/work_router.dart';
- import 'package:liftmanager/routers/fluro_navigator.dart';
- import 'package:liftmanager/widgets/my_button.dart';
- // import 'package:mis_mobile/common/components/card.dart';
- // import 'package:mis_mobile/common/components/scaffold.dart';
- // import 'package:mis_mobile/common/components/webview_wrapper.dart';
- // import 'package:mis_mobile/common/global_config.dart';
- // import 'package:mis_mobile/common/utils/custom_route.dart';
- // import 'package:mis_mobile/common/utils/toast_helper.dart';
- // import 'package:mis_mobile/screens/splash.dart';
- import 'package:shared_preferences/shared_preferences.dart';
- class PrivacyPolicyPage extends StatefulWidget {
- @override
- _PrivacyPolicyPageState createState() => _PrivacyPolicyPageState();
- }
- class _PrivacyPolicyPageState extends State<PrivacyPolicyPage> {
- @override
- void initState() {
- // TODO: implement initState
- super.initState();
- initData();
- }
- var sharedPref;
- initData() async {
- sharedPref = await SharedPreferences.getInstance();
- bool isAree = sharedPref.getBool('isAreeYs') ?? false;
- if (isAree) {
- Navigator.pushReplacement(context, CustomRouteJianBian(SplashPage()));
- }
- }
- @override
- Widget build(BuildContext context) {
- // SystemChrome.setEnabledSystemUIOverlays([SystemUiOverlay.bottom]);
- return Scaffold(
- body: Column(children: [
- SingleChildScrollView(
- child: Container(
- child: Column(
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Padding(
- padding: const EdgeInsets.all(22.0),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- "感谢您使用电梯管家!",
- style: TextStyle(
- fontSize: 18.0, fontWeight: FontWeight.bold),
- ),
- SizedBox(
- height: 10,
- ),
- Container(
- color: Color(0xffF2F2F2),
- padding: EdgeInsets.all(20.0),
- child: RichText(
- text: TextSpan(
- text: "感谢您信任并选择电梯管家,我们非常重视保护您的个人信息与隐私!"
- "依据最新的监管要求,我们特向您说明如下:\n\n",
- style: TextStyle(color: Colors.black, fontSize: 16),
- children: [
- TextSpan(text: "1. 为向您提供良好的服务,我们将根据法律及"),
- TextSpan(
- text: "《服务协议和隐私政策》",
- style: TextStyle(
- color: Colors.blue,
- ),
- recognizer: TapGestureRecognizer()
- ..onTap = () {
- NavigatorUtils.push(
- context,
- "${WorkRouter.webview}?title=" +
- Uri.encodeComponent("电梯管家协议") +
- "&url=" +
- Uri.encodeComponent(
- "http://dl.edtyun.com/xieyi.html"));
- }),
- TextSpan(
- text: "收集,使用提供服务所必需的个人信息;\n\n",
- style: TextStyle(
- color: Colors.black,
- ),
- ),
- TextSpan(
- text: "2. 基于您的明示授权,我们可能会调取您的相机,相册,存储空间,定位等设备权限,"
- "用于出诊打卡等功能,您有权拒绝或取消授权。\n\n"
- "3. 当你使用电梯管家服务时,为保障你正常使用我们的服务,维护我们服务的正常运行,"
- "改进及优化我们的服务体验以及保障你的帐号安全,我们会收集你的设备型号、操作系统、"
- "唯一设备标识符(指由设备制造商编入到设备中的一串字符,可用于以独有方式标识相应设备)、"
- "登录IP地址、电梯管家软件版本号、接入网络的方式、类型和状态、"
- "操作日志、服务日志信息(如服务故障信息)等日志信息,"
- "这类信息是为提供服务必须收集的基础信息。\n"),
- ],
- ),
- ),
- ),
- ],
- ),
- ),
- ],
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsets.symmetric(horizontal: 22.0, vertical: 15.0),
- child: Row(
- children: [
- Expanded(
- child: MyButton(
- backColor: Color(0xffE8E8E8),
- onPressed: () {
- showConfirmDialog(
- context, '不同意将无法使用我们的产品和服务,并会退出app', () => exit(0));
- },
- )
- // MisCard(
- // isClip: true,
- // radius: 5,
- // child: InkWell(
- // onTap: () {
- // showConfirmDialog(
- // context, '不同意将无法使用我们的产品和服务,并会退出app', () => exit(0));
- // },
- // child: Container(
- // height: 50,
- // alignment: Alignment.center,
- // color: Color(0xffE8E8E8),
- // child: Text(
- // "不同意,暂不使用",
- // style: TextStyle(
- // fontSize: 16,
- // color: Color(0xff999999),
- // ),
- // ),
- // ),
- // ),
- // ),
- ),
- SizedBox(
- width: 10.0,
- ),
- Expanded(child: MyButton(
- onPressed: () {
- sharedPref.setBool('isAreeYs', true);
- Navigator.pushReplacement(
- context,
- CustomRouteJianBian(
- SplashPage(),
- ),
- );
- },
- )),
- ],
- ),
- )
- ]));
- }
- }
- void showConfirmDialog(
- BuildContext context, String content, Function confirmCallback,
- {Function cancelCallback, bool outTouchCancellable = true}) {
- showDialog(
- barrierDismissible: outTouchCancellable,
- context: context,
- builder: (context) {
- return new AlertDialog(
- title: new Text("提示"),
- content: new Text(content),
- actions: <Widget>[
- new FlatButton(
- onPressed: () {
- Navigator.of(context).pop();
- confirmCallback?.call();
- },
- child: new Text("确认"),
- ),
- new FlatButton(
- onPressed: () {
- Navigator.of(context).pop();
- cancelCallback?.call();
- },
- child: new Text("取消"),
- ),
- ],
- );
- });
- }
|