|
|
|
@ -201,6 +201,9 @@ class LoginController extends GetxController { |
|
|
|
|
|
|
|
// 显示隐私政策弹窗 |
|
|
|
void _showPrivacyDialog() { |
|
|
|
// 获取当前主题模式 |
|
|
|
final bool isDarkMode = Get.theme.brightness == Brightness.dark; |
|
|
|
|
|
|
|
Get.dialog( |
|
|
|
WillPopScope( |
|
|
|
onWillPop: () async => false, // 禁止通过返回键关闭弹窗 |
|
|
|
@ -208,16 +211,20 @@ class LoginController extends GetxController { |
|
|
|
shape: RoundedRectangleBorder( |
|
|
|
borderRadius: BorderRadius.circular(16), |
|
|
|
), |
|
|
|
backgroundColor: |
|
|
|
isDarkMode ? Colors.grey[800] : Colors.white, // 暗黑模式使用深灰色背景 |
|
|
|
child: Container( |
|
|
|
padding: const EdgeInsets.all(20), |
|
|
|
child: Column( |
|
|
|
mainAxisSize: MainAxisSize.min, |
|
|
|
children: [ |
|
|
|
const Text( |
|
|
|
Text( |
|
|
|
'DeapSound 声明', |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 18, |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
color: |
|
|
|
isDarkMode ? Colors.white : Colors.black, // 暗黑模式使用白色文字 |
|
|
|
), |
|
|
|
), |
|
|
|
const SizedBox(height: 16), |
|
|
|
@ -226,9 +233,14 @@ class LoginController extends GetxController { |
|
|
|
child: Text.rich( |
|
|
|
TextSpan( |
|
|
|
children: [ |
|
|
|
const TextSpan( |
|
|
|
TextSpan( |
|
|
|
text: '欢迎使用DeapSound,请充分阅读', |
|
|
|
style: TextStyle(fontSize: 14), |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14, |
|
|
|
color: isDarkMode |
|
|
|
? Colors.white70 |
|
|
|
: Colors.black87, // 暗黑模式使用浅白色 |
|
|
|
), |
|
|
|
), |
|
|
|
WidgetSpan( |
|
|
|
alignment: PlaceholderAlignment.middle, |
|
|
|
@ -244,18 +256,21 @@ class LoginController extends GetxController { |
|
|
|
title: 'privacyPolicy'.tr, |
|
|
|
)); |
|
|
|
}, |
|
|
|
child: Text( |
|
|
|
child: const Text( |
|
|
|
'《隐私政策》', |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14, |
|
|
|
color: const Color(0xFF3B82F6), |
|
|
|
color: Color(0xFF3B82F6), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
const TextSpan( |
|
|
|
TextSpan( |
|
|
|
text: '和', |
|
|
|
style: TextStyle(fontSize: 14), |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14, |
|
|
|
color: isDarkMode ? Colors.white70 : Colors.black87, |
|
|
|
), |
|
|
|
), |
|
|
|
WidgetSpan( |
|
|
|
alignment: PlaceholderAlignment.middle, |
|
|
|
@ -271,18 +286,21 @@ class LoginController extends GetxController { |
|
|
|
title: 'userAgreement'.tr, |
|
|
|
)); |
|
|
|
}, |
|
|
|
child: Text( |
|
|
|
child: const Text( |
|
|
|
'《用户协议》', |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14, |
|
|
|
color: const Color(0xFF3B82F6), |
|
|
|
color: Color(0xFF3B82F6), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
const TextSpan( |
|
|
|
TextSpan( |
|
|
|
text: ',点击“同意并进入”表示您已充分阅读并同意上述协议。点击“不同意”将退出应用。', |
|
|
|
style: TextStyle(fontSize: 14), |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14, |
|
|
|
color: isDarkMode ? Colors.white70 : Colors.black87, |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
@ -299,9 +317,17 @@ class LoginController extends GetxController { |
|
|
|
exit(0); |
|
|
|
}, |
|
|
|
style: TextButton.styleFrom( |
|
|
|
foregroundColor: Colors.black54, |
|
|
|
foregroundColor: isDarkMode |
|
|
|
? Colors.grey[400] |
|
|
|
: Colors.black54, // 暗黑模式使用浅灰色 |
|
|
|
), |
|
|
|
child: Text( |
|
|
|
'不同意', |
|
|
|
style: TextStyle( |
|
|
|
color: isDarkMode ? Colors.grey[400] : Colors.black54, |
|
|
|
), |
|
|
|
), |
|
|
|
child: const Text('不同意'), |
|
|
|
//child: const Text('不同意'), |
|
|
|
), |
|
|
|
ElevatedButton( |
|
|
|
onPressed: () { |
|
|
|
@ -317,6 +343,9 @@ class LoginController extends GetxController { |
|
|
|
shape: RoundedRectangleBorder( |
|
|
|
borderRadius: BorderRadius.circular(8), |
|
|
|
), |
|
|
|
elevation: isDarkMode ? 4 : 2, // 暗黑模式下增加阴影效果提高辨识度 |
|
|
|
padding: const EdgeInsets.symmetric( |
|
|
|
horizontal: 16, vertical: 10), // 统一的内边距 |
|
|
|
), |
|
|
|
child: const Text('同意并进入'), |
|
|
|
), |
|
|
|
|