This commit is contained in:
魏少阳 2024-03-13 11:38:42 +08:00
commit ae2ee48b2b

View File

@ -54,68 +54,72 @@ class AppFirstEnterHandle {
showCupertinoDialog( showCupertinoDialog(
context: widgetContext, context: widgetContext,
builder: (context) { builder: (context) {
return CupertinoAlertDialog( return PopScope(
title: const Text('用户协议和隐私政策概要\n'), canPop: false,
content: Text.rich( child: CupertinoAlertDialog(
TextSpan( title: const Text('用户协议和隐私政策概要\n'),
text: '感谢您使用本应用。我们非常重视您的个人信息和隐私保护,在使用本产品之前,请认真阅读', content: Text.rich(
style: const TextStyle(fontSize: 16.0),
children: [
TextSpan( TextSpan(
text: '《用户协议》', text: '感谢您使用本应用。我们非常重视您的个人信息和隐私保护,在使用本产品之前,请认真阅读',
style: const TextStyle( style: const TextStyle(fontSize: 16.0),
color: Colors.blue, decoration: TextDecoration.underline), children: [
recognizer: TapGestureRecognizer() TextSpan(
..onTap = () { text: '《用户协议》',
// style: const TextStyle(
Get.toNamed(Routers.webviewShowPage, arguments: { color: Colors.blue,
"url": XSConstantMacro.userAgreementURL, decoration: TextDecoration.underline),
"title": '用户协议' recognizer: TapGestureRecognizer()
}); ..onTap = () {
}, //
Get.toNamed(Routers.webviewShowPage, arguments: {
"url": XSConstantMacro.userAgreementURL,
"title": '用户协议'
});
},
),
const TextSpan(text: ''),
TextSpan(
text: '《隐私政策》',
style: const TextStyle(
color: Colors.blue,
decoration: TextDecoration.underline),
recognizer: TapGestureRecognizer()
..onTap = () {
//
Get.toNamed(Routers.webviewShowPage, arguments: {
"url": XSConstantMacro.privacyPolicyURL,
"title": '隐私政策'
});
},
),
const TextSpan(
text:
'的全部内容。点击“同意”即表示您同意并接受全部条款。若选择不同意,将无法使用我们的产品和服务,并会退出应用。'),
],
), ),
const TextSpan(text: ''), ),
TextSpan( actions: [
text: '《隐私政策》', CupertinoDialogAction(
style: const TextStyle( child: const Text(
color: Colors.blue, decoration: TextDecoration.underline), '不同意',
recognizer: TapGestureRecognizer() style: TextStyle(color: Colors.black),
..onTap = () { ),
// onPressed: () {
Get.toNamed(Routers.webviewShowPage, arguments: { _exitApp();
"url": XSConstantMacro.privacyPolicyURL, },
"title": '隐私政策' ),
}); CupertinoDialogAction(
}, child: const Text(
'同意',
style: TextStyle(color: Colors.blue),
),
onPressed: () {
Storage.setString(isAgreePrivacy, isAgreePrivacy);
Navigator.of(context).pop();
},
), ),
const TextSpan(
text:
'的全部内容。点击“同意”即表示您同意并接受全部条款。若选择不同意,将无法使用我们的产品和服务,并会退出应用。'),
], ],
), ));
),
actions: [
CupertinoDialogAction(
child: const Text(
'不同意',
style: TextStyle(color: Colors.black),
),
onPressed: () {
_exitApp();
},
),
CupertinoDialogAction(
child: const Text(
'同意',
style: TextStyle(color: Colors.blue),
),
onPressed: () {
Storage.setString(isAgreePrivacy, isAgreePrivacy);
Navigator.of(context).pop();
},
),
],
);
}, },
); );
} }
@ -125,25 +129,27 @@ class AppFirstEnterHandle {
showCupertinoDialog( showCupertinoDialog(
context: widgetContext, context: widgetContext,
builder: (context) { builder: (context) {
return CupertinoAlertDialog( return PopScope(
title: const Text('位置权限'), canPop: false,
content: const Text('请开启位置权限,应用需要位置权限才可以完成智能锁和网关的蓝牙操作'), child: CupertinoAlertDialog(
actions: [ title: const Text('位置权限'),
CupertinoDialogAction( content: const Text('请开启位置权限,应用需要位置权限才可以完成智能锁和网关的蓝牙操作'),
child: const Text('取消'), actions: [
onPressed: () { CupertinoDialogAction(
Navigator.of(context).pop(); child: const Text('取消'),
}, onPressed: () {
), Navigator.of(context).pop();
CupertinoDialogAction( },
child: const Text('确定'), ),
onPressed: () { CupertinoDialogAction(
Storage.setString(isAgreePosition, isAgreePosition); child: const Text('确定'),
Navigator.of(context).pop(); onPressed: () {
}, Storage.setString(isAgreePosition, isAgreePosition);
), Navigator.of(context).pop();
], },
); ),
],
));
}, },
); );
} }
@ -153,25 +159,27 @@ class AppFirstEnterHandle {
showCupertinoDialog( showCupertinoDialog(
context: widgetContext, context: widgetContext,
builder: (context) { builder: (context) {
return CupertinoAlertDialog( return PopScope(
title: const Text('相机/相册权限'), canPop: false,
content: const Text('请开启本地存储权限,允许应用读写设备上的照片及文件'), child: CupertinoAlertDialog(
actions: [ title: const Text('相机/相册权限'),
CupertinoDialogAction( content: const Text('请开启本地存储权限,允许应用读写设备上的照片及文件'),
child: const Text('取消'), actions: [
onPressed: () { CupertinoDialogAction(
Navigator.of(context).pop(); child: const Text('取消'),
}, onPressed: () {
), Navigator.of(context).pop();
CupertinoDialogAction( },
child: const Text('确定'), ),
onPressed: () { CupertinoDialogAction(
Storage.setString(isAgreeCamera, isAgreeCamera); child: const Text('确定'),
Navigator.of(context).pop(); onPressed: () {
}, Storage.setString(isAgreeCamera, isAgreeCamera);
), Navigator.of(context).pop();
], },
); ),
],
));
}, },
); );
} }