关怀模式

This commit is contained in:
Developer
2026-04-02 22:30:49 +08:00
parent 09fee0694c
commit 7872f2e78a
70 changed files with 4884 additions and 2752 deletions

View File

@@ -41,6 +41,7 @@ class _PermissionPageState extends State<PermissionPage> {
Widget build(BuildContext context) {
return Obx(() {
final isDark = _themeController.isDarkMode;
final primaryColor = _themeController.currentThemeColor;
return Scaffold(
backgroundColor: isDark
? const Color(0xFF1A1A1A)
@@ -49,7 +50,7 @@ class _PermissionPageState extends State<PermissionPage> {
title: Text(
'权限管理',
style: TextStyle(
color: isDark ? Colors.white : AppConstants.primaryColor,
color: isDark ? Colors.white : primaryColor,
fontWeight: FontWeight.bold,
),
),
@@ -59,7 +60,7 @@ class _PermissionPageState extends State<PermissionPage> {
leading: IconButton(
icon: Icon(
Icons.arrow_back,
color: isDark ? Colors.white : AppConstants.primaryColor,
color: isDark ? Colors.white : primaryColor,
),
onPressed: () => Navigator.pop(context),
),
@@ -67,7 +68,7 @@ class _PermissionPageState extends State<PermissionPage> {
IconButton(
icon: Icon(
Icons.info_outline,
color: isDark ? Colors.white : AppConstants.primaryColor,
color: isDark ? Colors.white : primaryColor,
),
onPressed: _showPermissionInfoDialog,
),
@@ -118,6 +119,14 @@ class _PermissionPageState extends State<PermissionPage> {
null,
isDark,
),
_buildPermissionItem(
'设备标识',
'获取设备唯一标识',
Icons.person,
_clipboardEnabled,
null,
isDark,
),
], isDark),
const SizedBox(height: 16),
_buildPermissionGroup('权限说明', [
@@ -126,6 +135,7 @@ class _PermissionPageState extends State<PermissionPage> {
_buildInfoItem('剪切板', '用于复制诗词内容,方便用户分享和记录。', isDark),
_buildInfoItem('播放声音', '用于主页点击提示音,提升用户体验。', isDark),
_buildInfoItem('分享能力', '用于分享诗词内容到社交媒体平台。', isDark),
_buildInfoItem('设备标识', '用于唯一标识设备,确保用户数据安全。', isDark),
], isDark),
const SizedBox(height: 16),
_buildSandboxInfoCard(isDark),
@@ -161,14 +171,14 @@ class _PermissionPageState extends State<PermissionPage> {
children: [
Icon(
Icons.security,
color: AppConstants.primaryColor,
color: _themeController.currentThemeColor,
size: 20,
),
const SizedBox(width: 8),
Text(
title,
style: TextStyle(
color: AppConstants.primaryColor,
color: _themeController.currentThemeColor,
fontSize: 16,
fontWeight: FontWeight.bold,
),
@@ -199,10 +209,14 @@ class _PermissionPageState extends State<PermissionPage> {
width: 40,
height: 40,
decoration: BoxDecoration(
color: AppConstants.primaryColor.withValues(alpha: 0.1),
color: _themeController.currentThemeColor.withAlpha(10),
borderRadius: BorderRadius.circular(12),
),
child: Icon(icon, color: AppConstants.primaryColor, size: 20),
child: Icon(
icon,
color: _themeController.currentThemeColor,
size: 20,
),
),
const SizedBox(width: 12),
Expanded(
@@ -271,7 +285,7 @@ class _PermissionPageState extends State<PermissionPage> {
height: 4,
margin: const EdgeInsets.only(top: 6),
decoration: BoxDecoration(
color: AppConstants.primaryColor,
color: _themeController.currentThemeColor,
borderRadius: BorderRadius.circular(2),
),
),
@@ -325,12 +339,16 @@ class _PermissionPageState extends State<PermissionPage> {
padding: const EdgeInsets.all(16),
child: Row(
children: [
Icon(Icons.build, color: AppConstants.primaryColor, size: 20),
Icon(
Icons.build,
color: _themeController.currentThemeColor,
size: 20,
),
const SizedBox(width: 8),
Text(
'项目补充完善',
style: TextStyle(
color: AppConstants.primaryColor,
color: _themeController.currentThemeColor,
fontSize: 16,
fontWeight: FontWeight.bold,
),
@@ -389,10 +407,14 @@ class _PermissionPageState extends State<PermissionPage> {
width: 40,
height: 40,
decoration: BoxDecoration(
color: AppConstants.primaryColor.withValues(alpha: 0.1),
color: _themeController.currentThemeColor.withAlpha(10),
borderRadius: BorderRadius.circular(12),
),
child: Icon(icon, color: AppConstants.primaryColor, size: 20),
child: Icon(
icon,
color: _themeController.currentThemeColor,
size: 20,
),
),
const SizedBox(width: 12),
Expanded(
@@ -435,7 +457,7 @@ class _PermissionPageState extends State<PermissionPage> {
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
title: Row(
children: [
Icon(Icons.feedback, color: AppConstants.primaryColor),
Icon(Icons.feedback, color: _themeController.currentThemeColor),
const SizedBox(width: 8),
const Text('用户反馈'),
],
@@ -456,7 +478,7 @@ class _PermissionPageState extends State<PermissionPage> {
TextSpan(
text: '情景诗词',
style: TextStyle(
color: AppConstants.primaryColor,
color: _themeController.currentThemeColor,
fontWeight: FontWeight.bold,
),
),
@@ -469,7 +491,7 @@ class _PermissionPageState extends State<PermissionPage> {
'记得五星好评 ⭐',
style: TextStyle(
fontSize: 14,
color: AppConstants.primaryColor,
color: _themeController.currentThemeColor,
fontWeight: FontWeight.w500,
),
),
@@ -480,7 +502,7 @@ class _PermissionPageState extends State<PermissionPage> {
onPressed: () => Navigator.pop(context),
child: Text(
'确定',
style: TextStyle(color: AppConstants.primaryColor),
style: TextStyle(color: _themeController.currentThemeColor),
),
),
],
@@ -495,7 +517,7 @@ class _PermissionPageState extends State<PermissionPage> {
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
title: Row(
children: [
Icon(Icons.lightbulb, color: AppConstants.primaryColor),
Icon(Icons.lightbulb, color: _themeController.currentThemeColor),
const SizedBox(width: 8),
const Text('功能建议'),
],
@@ -516,7 +538,7 @@ class _PermissionPageState extends State<PermissionPage> {
TextSpan(
text: '情景诗词',
style: TextStyle(
color: AppConstants.primaryColor,
color: _themeController.currentThemeColor,
fontWeight: FontWeight.bold,
),
),
@@ -529,7 +551,7 @@ class _PermissionPageState extends State<PermissionPage> {
'记得五星好评 ⭐',
style: TextStyle(
fontSize: 14,
color: AppConstants.primaryColor,
color: _themeController.currentThemeColor,
fontWeight: FontWeight.w500,
),
),
@@ -540,7 +562,7 @@ class _PermissionPageState extends State<PermissionPage> {
onPressed: () => Navigator.pop(context),
child: Text(
'确定',
style: TextStyle(color: AppConstants.primaryColor),
style: TextStyle(color: _themeController.currentThemeColor),
),
),
],
@@ -555,7 +577,7 @@ class _PermissionPageState extends State<PermissionPage> {
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
title: Row(
children: [
Icon(Icons.info, color: AppConstants.primaryColor),
Icon(Icons.info, color: _themeController.currentThemeColor),
const SizedBox(width: 8),
const Text('基础权限说明'),
],
@@ -569,7 +591,7 @@ class _PermissionPageState extends State<PermissionPage> {
onPressed: () => Navigator.pop(context),
child: Text(
'确定',
style: TextStyle(color: AppConstants.primaryColor),
style: TextStyle(color: _themeController.currentThemeColor),
),
),
],
@@ -599,12 +621,12 @@ class _PermissionPageState extends State<PermissionPage> {
Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: AppConstants.primaryColor.withValues(alpha: 0.1),
color: _themeController.currentThemeColor.withAlpha(10),
borderRadius: BorderRadius.circular(8),
),
child: Icon(
Icons.shield,
color: AppConstants.primaryColor,
color: _themeController.currentThemeColor,
size: 20,
),
),
@@ -612,7 +634,7 @@ class _PermissionPageState extends State<PermissionPage> {
Text(
'沙盒运行说明',
style: TextStyle(
color: AppConstants.primaryColor,
color: _themeController.currentThemeColor,
fontSize: 16,
fontWeight: FontWeight.bold,
),
@@ -652,14 +674,14 @@ class _PermissionPageState extends State<PermissionPage> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
width: 4,
height: 4,
margin: const EdgeInsets.only(top: 8),
decoration: BoxDecoration(
color: AppConstants.primaryColor,
borderRadius: BorderRadius.circular(2),
width: 4,
height: 4,
margin: const EdgeInsets.only(top: 8),
decoration: BoxDecoration(
color: _themeController.currentThemeColor,
borderRadius: BorderRadius.circular(2),
),
),
),
const SizedBox(width: 12),
Expanded(
child: Column(