关怀模式
This commit is contained in:
@@ -8,8 +8,7 @@ import '../../../services/get/tap_liquid_glass_controller.dart';
|
||||
import '../../../utils/audio_manager.dart';
|
||||
import './widgets.dart';
|
||||
import '../../home/set/home-load.dart';
|
||||
import '../../profile/theme/app-diy.dart';
|
||||
import '../../footprint/collect_notes.dart';
|
||||
import '../../../controllers/settings/suggestions.dart';
|
||||
import '../../../controllers/load/locally.dart';
|
||||
|
||||
/// 时间: 2026-03-26
|
||||
@@ -127,6 +126,7 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
|
||||
// 显示震动提示对话框
|
||||
void _showVibrationDialog() {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
@@ -146,10 +146,7 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
});
|
||||
}
|
||||
},
|
||||
child: Text(
|
||||
'确定',
|
||||
style: TextStyle(color: AppConstants.primaryColor),
|
||||
),
|
||||
child: Text('确定', style: TextStyle(color: primaryColor)),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -178,6 +175,7 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Obx(() {
|
||||
final isDark = _themeController.isDarkMode;
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return Scaffold(
|
||||
backgroundColor: isDark
|
||||
? const Color(0xFF1A1A1A)
|
||||
@@ -185,16 +183,13 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
'功能设置',
|
||||
style: TextStyle(
|
||||
color: AppConstants.primaryColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
style: TextStyle(color: primaryColor, fontWeight: FontWeight.bold),
|
||||
),
|
||||
backgroundColor: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back, color: AppConstants.primaryColor),
|
||||
icon: Icon(Icons.arrow_back, color: primaryColor),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
),
|
||||
@@ -310,13 +305,14 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
}
|
||||
|
||||
Widget _buildSettingsGroup(String title, List<Widget> items, bool isDark) {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: isDark ? 0.3 : 0.05),
|
||||
color: Colors.black.withAlpha(isDark ? 30 : 5),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
@@ -332,7 +328,7 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppConstants.primaryColor,
|
||||
color: primaryColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -350,14 +346,15 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
ValueChanged<bool> onChanged,
|
||||
bool isDark,
|
||||
) {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return ListTile(
|
||||
leading: Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: AppConstants.primaryColor.withValues(alpha: 0.1),
|
||||
color: primaryColor.withAlpha(10),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Icon(icon, color: AppConstants.primaryColor, size: 20),
|
||||
child: Icon(icon, color: primaryColor, size: 20),
|
||||
),
|
||||
title: Text(
|
||||
title,
|
||||
@@ -377,20 +374,21 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
trailing: Switch(
|
||||
value: value,
|
||||
onChanged: onChanged,
|
||||
activeThumbColor: AppConstants.primaryColor,
|
||||
activeThumbColor: primaryColor,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildFontSliderItem(bool isDark) {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return ListTile(
|
||||
leading: Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: AppConstants.primaryColor.withValues(alpha: 0.1),
|
||||
color: primaryColor.withAlpha(10),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Icon(Icons.widgets, color: AppConstants.primaryColor, size: 20),
|
||||
child: Icon(Icons.widgets, color: primaryColor, size: 20),
|
||||
),
|
||||
title: Text(
|
||||
'桌面卡片',
|
||||
@@ -419,7 +417,7 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
backgroundColor: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
title: Row(
|
||||
children: [
|
||||
Icon(Icons.info_outline, color: AppConstants.primaryColor),
|
||||
Icon(Icons.info_outline, color: primaryColor),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'桌面卡片设置',
|
||||
@@ -491,7 +489,7 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
);
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppConstants.primaryColor,
|
||||
backgroundColor: primaryColor,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('仍要进入'),
|
||||
@@ -505,6 +503,7 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
}
|
||||
|
||||
Widget _buildTransparencyLevelItem(bool isDark) {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return Obx(() {
|
||||
final currentIndex = _glassController.transparencyLevelIndex;
|
||||
return Column(
|
||||
@@ -517,14 +516,10 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: AppConstants.primaryColor.withValues(alpha: 0.1),
|
||||
color: primaryColor.withAlpha(10),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Icon(
|
||||
Icons.opacity,
|
||||
color: AppConstants.primaryColor,
|
||||
size: 20,
|
||||
),
|
||||
child: Icon(Icons.opacity, color: primaryColor, size: 20),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
@@ -575,6 +570,7 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
bool isSelected,
|
||||
bool isDark,
|
||||
) {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return Expanded(
|
||||
child: GestureDetector(
|
||||
onTap: () => _glassController.setTransparencyLevelByIndex(levelIndex),
|
||||
@@ -582,12 +578,12 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected
|
||||
? AppConstants.primaryColor
|
||||
? primaryColor
|
||||
: (isDark ? Colors.grey[800] : Colors.grey[200]),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(
|
||||
color: isSelected
|
||||
? AppConstants.primaryColor
|
||||
? primaryColor
|
||||
: (isDark ? Colors.grey[700]! : Colors.grey[300]!),
|
||||
width: 1.5,
|
||||
),
|
||||
@@ -615,14 +611,15 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
VoidCallback onTap,
|
||||
bool isDark,
|
||||
) {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return ListTile(
|
||||
leading: Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: AppConstants.primaryColor.withValues(alpha: 0.1),
|
||||
color: primaryColor.withAlpha(10),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Icon(icon, color: AppConstants.primaryColor, size: 20),
|
||||
child: Icon(icon, color: primaryColor, size: 20),
|
||||
),
|
||||
title: Text(
|
||||
title,
|
||||
@@ -648,70 +645,7 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
}
|
||||
|
||||
Widget _buildVersionInfo(bool isDark) {
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
color: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: isDark ? 0.3 : 0.05),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.settings_suggest,
|
||||
size: 40,
|
||||
color: AppConstants.primaryColor,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
'设置建议',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: isDark ? Colors.white : Colors.black,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
'是否在找,主题风格',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: isDark ? Colors.grey[400] : Colors.grey[600],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: _buildActionButton(
|
||||
'主题风格',
|
||||
'自定义应用主题',
|
||||
Icons.palette,
|
||||
Colors.blue,
|
||||
() => Get.to(() => const AppDiyPage()),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: _buildActionButton(
|
||||
'创建笔记',
|
||||
'快速创建新笔记',
|
||||
Icons.note_add,
|
||||
Colors.green,
|
||||
() => Get.to(() => const CollectNotesPage()),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
return const SuggestionsCard();
|
||||
}
|
||||
|
||||
Widget _buildActionButton(
|
||||
|
||||
@@ -19,6 +19,7 @@ class LearnUsPage extends StatelessWidget {
|
||||
|
||||
return Obx(() {
|
||||
final isDark = themeController.isDarkMode;
|
||||
final primaryColor = themeController.currentThemeColor;
|
||||
return Scaffold(
|
||||
backgroundColor: isDark
|
||||
? const Color(0xFF1A1A1A)
|
||||
@@ -26,16 +27,13 @@ class LearnUsPage extends StatelessWidget {
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
'了解我们',
|
||||
style: TextStyle(
|
||||
color: AppConstants.primaryColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
style: TextStyle(color: primaryColor, fontWeight: FontWeight.bold),
|
||||
),
|
||||
backgroundColor: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back, color: AppConstants.primaryColor),
|
||||
icon: Icon(Icons.arrow_back, color: primaryColor),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
),
|
||||
@@ -62,14 +60,16 @@ class LearnUsPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _buildHeaderCard() {
|
||||
final themeController = Get.find<ThemeController>();
|
||||
final primaryColor = themeController.currentThemeColor;
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(24),
|
||||
decoration: BoxDecoration(
|
||||
gradient: const LinearGradient(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Color.fromARGB(255, 143, 73, 228),
|
||||
Color(0xFF6200EE),
|
||||
Color(0xFF3700B3),
|
||||
primaryColor.withAlpha(200),
|
||||
primaryColor,
|
||||
primaryColor.withAlpha(150),
|
||||
],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
@@ -77,7 +77,7 @@ class LearnUsPage extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppConstants.primaryColor.withValues(alpha: 0.3),
|
||||
color: primaryColor.withAlpha(30),
|
||||
blurRadius: 12,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
@@ -155,6 +155,8 @@ class LearnUsPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _buildOfficialSiteCard(bool isDark) {
|
||||
final themeController = Get.find<ThemeController>();
|
||||
final primaryColor = themeController.currentThemeColor;
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
@@ -162,8 +164,8 @@ class LearnUsPage extends StatelessWidget {
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: isDark
|
||||
? Colors.black.withValues(alpha: 0.3)
|
||||
: Colors.black.withValues(alpha: 0.05),
|
||||
? Colors.black.withAlpha(30)
|
||||
: Colors.black.withAlpha(5),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
@@ -179,14 +181,10 @@ class LearnUsPage extends StatelessWidget {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.blue.withValues(alpha: 0.1),
|
||||
color: primaryColor.withAlpha(10),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Icon(
|
||||
Icons.language,
|
||||
color: Colors.blue[700],
|
||||
size: 20,
|
||||
),
|
||||
child: Icon(Icons.language, color: primaryColor, size: 20),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Text(
|
||||
@@ -222,25 +220,18 @@ class LearnUsPage extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(
|
||||
color: isDark
|
||||
? Colors.grey[700]!.withValues(alpha: 0.2)
|
||||
: Colors.grey.withValues(alpha: 0.2),
|
||||
? Colors.grey[700]!.withAlpha(20)
|
||||
: Colors.grey.withAlpha(20),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.link,
|
||||
size: 16,
|
||||
color: AppConstants.primaryColor,
|
||||
),
|
||||
Icon(Icons.link, size: 16, color: primaryColor),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
'https://poe.vogov.cn/app.html',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: AppConstants.primaryColor,
|
||||
),
|
||||
style: TextStyle(fontSize: 14, color: primaryColor),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -255,6 +246,8 @@ class LearnUsPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _buildQQGroupCard(BuildContext context, bool isDark) {
|
||||
final themeController = Get.find<ThemeController>();
|
||||
final primaryColor = themeController.currentThemeColor;
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
@@ -262,8 +255,8 @@ class LearnUsPage extends StatelessWidget {
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: isDark
|
||||
? Colors.black.withValues(alpha: 0.3)
|
||||
: Colors.black.withValues(alpha: 0.05),
|
||||
? Colors.black.withAlpha(30)
|
||||
: Colors.black.withAlpha(5),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
@@ -279,10 +272,10 @@ class LearnUsPage extends StatelessWidget {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.blue.withValues(alpha: 0.1),
|
||||
color: primaryColor.withAlpha(10),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Icon(Icons.group, color: Colors.blue[700], size: 20),
|
||||
child: Icon(Icons.group, color: primaryColor, size: 20),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Text(
|
||||
@@ -319,25 +312,19 @@ class LearnUsPage extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
color: isDark ? const Color(0xFF3A3A3A) : Colors.grey[50],
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(
|
||||
color: AppConstants.primaryColor.withValues(alpha: 0.3),
|
||||
),
|
||||
border: Border.all(color: primaryColor.withAlpha(30)),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(
|
||||
Icons.content_copy,
|
||||
size: 16,
|
||||
color: AppConstants.primaryColor,
|
||||
),
|
||||
Icon(Icons.content_copy, size: 16, color: primaryColor),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'271129018',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppConstants.primaryColor,
|
||||
color: primaryColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -361,6 +348,8 @@ class LearnUsPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
void _copyQQGroupNumber(BuildContext context) {
|
||||
final themeController = Get.find<ThemeController>();
|
||||
final primaryColor = themeController.currentThemeColor;
|
||||
Clipboard.setData(const ClipboardData(text: '271129018'));
|
||||
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
@@ -372,7 +361,7 @@ class LearnUsPage extends StatelessWidget {
|
||||
Text('QQ群号已复制到剪贴板'),
|
||||
],
|
||||
),
|
||||
backgroundColor: AppConstants.primaryColor,
|
||||
backgroundColor: primaryColor,
|
||||
behavior: SnackBarBehavior.floating,
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||
duration: const Duration(seconds: 2),
|
||||
@@ -381,6 +370,8 @@ class LearnUsPage extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _buildDeveloperCard(BuildContext context, bool isDark) {
|
||||
final themeController = Get.find<ThemeController>();
|
||||
final primaryColor = themeController.currentThemeColor;
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
@@ -388,8 +379,8 @@ class LearnUsPage extends StatelessWidget {
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: isDark
|
||||
? Colors.black.withValues(alpha: 0.3)
|
||||
: Colors.black.withValues(alpha: 0.05),
|
||||
? Colors.black.withAlpha(30)
|
||||
: Colors.black.withAlpha(5),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
@@ -405,14 +396,10 @@ class LearnUsPage extends StatelessWidget {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.green.withValues(alpha: 0.1),
|
||||
color: primaryColor.withAlpha(10),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Icon(
|
||||
Icons.business,
|
||||
color: Colors.green[700],
|
||||
size: 20,
|
||||
),
|
||||
child: Icon(Icons.business, color: primaryColor, size: 20),
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Text(
|
||||
@@ -437,8 +424,8 @@ class LearnUsPage extends StatelessWidget {
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
AppConstants.primaryColor.withValues(alpha: 0.1),
|
||||
AppConstants.primaryColor.withValues(alpha: 0.05),
|
||||
primaryColor.withAlpha(10),
|
||||
primaryColor.withAlpha(5),
|
||||
],
|
||||
),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
@@ -666,7 +653,7 @@ class LearnUsPage extends StatelessWidget {
|
||||
'尽毕生所学,取天下之诗集,只为逗她一笑',
|
||||
isDark,
|
||||
),
|
||||
_buildTeamMember('🎨', 'UI/UX/Testing', 'Ayk', '....', isDark),
|
||||
_buildTeamMember('🎨', 'UI/UX/Testing', 'Ayk', '姥头乐也疯狂', isDark),
|
||||
_buildTeamMember('⚙️', '后端', '伯乐不相马', '真的吗,还是做不到吗?', isDark),
|
||||
_buildTeamMember('🔧', '技术支持', '闲言app', '闲言app原班人马打造', isDark),
|
||||
],
|
||||
@@ -681,6 +668,8 @@ class LearnUsPage extends StatelessWidget {
|
||||
String signature,
|
||||
bool isDark,
|
||||
) {
|
||||
final themeController = Get.find<ThemeController>();
|
||||
final primaryColor = themeController.currentThemeColor;
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
child: Row(
|
||||
@@ -718,15 +707,12 @@ class LearnUsPage extends StatelessWidget {
|
||||
vertical: 2,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: AppConstants.primaryColor.withValues(alpha: 0.1),
|
||||
color: primaryColor.withAlpha(10),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Text(
|
||||
name,
|
||||
style: TextStyle(
|
||||
fontSize: 11,
|
||||
color: AppConstants.primaryColor,
|
||||
),
|
||||
style: TextStyle(fontSize: 11, color: primaryColor),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -814,7 +800,7 @@ class LearnUsPage extends StatelessWidget {
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
'滇ICP备2022000863号-13',
|
||||
'滇ICP备2022000863号-15A',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: isDark ? Colors.grey[300] : Colors.grey[700],
|
||||
|
||||
@@ -153,7 +153,7 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('已保存 $_downloadedCount 条数据'),
|
||||
backgroundColor: AppConstants.primaryColor,
|
||||
backgroundColor: _themeController.currentThemeColor,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -265,7 +265,7 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
content: Text(
|
||||
'成功缓存 ${_selectedType == DownloadType.poetry ? '诗词' : '答题'} $_cachedCount 条数据',
|
||||
),
|
||||
backgroundColor: AppConstants.primaryColor,
|
||||
backgroundColor: _themeController.currentThemeColor,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -371,7 +371,7 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('已清空$typeName离线数据'),
|
||||
backgroundColor: AppConstants.primaryColor,
|
||||
backgroundColor: _themeController.currentThemeColor,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -401,9 +401,9 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
|
||||
if (mounted) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
const SnackBar(
|
||||
content: Text('已清空所有离线数据'),
|
||||
backgroundColor: AppConstants.primaryColor,
|
||||
SnackBar(
|
||||
content: const Text('已清空所有离线数据'),
|
||||
backgroundColor: _themeController.currentThemeColor,
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -515,6 +515,7 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Obx(() {
|
||||
final isDark = _themeController.isDarkMode;
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return Scaffold(
|
||||
backgroundColor: isDark
|
||||
? const Color(0xFF1A1A1A)
|
||||
@@ -522,24 +523,18 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
'离线使用',
|
||||
style: TextStyle(
|
||||
color: AppConstants.primaryColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
style: TextStyle(color: primaryColor, fontWeight: FontWeight.bold),
|
||||
),
|
||||
backgroundColor: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back, color: AppConstants.primaryColor),
|
||||
icon: Icon(Icons.arrow_back, color: primaryColor),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Icon(
|
||||
Icons.cloud_outlined,
|
||||
color: AppConstants.primaryColor,
|
||||
),
|
||||
icon: Icon(Icons.cloud_outlined, color: primaryColor),
|
||||
onPressed: _showServerInfo,
|
||||
tooltip: '服务器信息',
|
||||
),
|
||||
@@ -555,7 +550,7 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: isDark ? 0.3 : 0.05),
|
||||
color: Colors.black.withAlpha(isDark ? 30 : 5),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
@@ -565,11 +560,7 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.download_done,
|
||||
color: AppConstants.primaryColor,
|
||||
size: 24,
|
||||
),
|
||||
Icon(Icons.download_done, color: primaryColor, size: 24),
|
||||
const SizedBox(width: 12),
|
||||
Text(
|
||||
'缓存状态',
|
||||
@@ -615,7 +606,7 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: isDark ? 0.3 : 0.05),
|
||||
color: Colors.black.withAlpha(isDark ? 30 : 5),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
@@ -626,11 +617,7 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.category,
|
||||
color: AppConstants.primaryColor,
|
||||
size: 20,
|
||||
),
|
||||
Icon(Icons.category, color: primaryColor, size: 20),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'下载类型',
|
||||
@@ -663,7 +650,7 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: isDark ? 0.3 : 0.05),
|
||||
color: Colors.black.withAlpha(isDark ? 30 : 5),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
@@ -674,11 +661,7 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.settings,
|
||||
color: AppConstants.primaryColor,
|
||||
size: 20,
|
||||
),
|
||||
Icon(Icons.settings, color: primaryColor, size: 20),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'下载数量',
|
||||
@@ -720,9 +703,7 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
? (_isCancelling ? null : _cancelDownload)
|
||||
: _downloadOfflineData,
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: _isCancelling
|
||||
? Colors.red
|
||||
: AppConstants.primaryColor,
|
||||
backgroundColor: _isCancelling ? Colors.red : primaryColor,
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
@@ -804,9 +785,7 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
backgroundColor: isDark
|
||||
? Colors.grey[700]
|
||||
: Colors.grey[200],
|
||||
valueColor: AlwaysStoppedAnimation<Color>(
|
||||
AppConstants.primaryColor,
|
||||
),
|
||||
valueColor: AlwaysStoppedAnimation<Color>(primaryColor),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
@@ -942,6 +921,7 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
|
||||
Widget _buildTypeOption(DownloadType type, String label, bool isDark) {
|
||||
final isSelected = _selectedType == type;
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
setState(() {
|
||||
@@ -954,12 +934,12 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected
|
||||
? AppConstants.primaryColor
|
||||
? primaryColor
|
||||
: (isDark ? Colors.grey[800] : Colors.grey[100]),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(
|
||||
color: isSelected
|
||||
? AppConstants.primaryColor
|
||||
? primaryColor
|
||||
: (isDark ? Colors.grey[700]! : Colors.grey[300]!),
|
||||
),
|
||||
),
|
||||
@@ -979,6 +959,7 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
|
||||
Widget _buildCountOption(int count, bool isDark) {
|
||||
final isSelected = _selectedCount == count;
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return Stack(
|
||||
children: [
|
||||
GestureDetector(
|
||||
@@ -991,12 +972,12 @@ class _OfflineDataPageState extends State<OfflineDataPage> {
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: isSelected
|
||||
? AppConstants.primaryColor
|
||||
? primaryColor
|
||||
: (isDark ? Colors.grey[800] : Colors.grey[100]),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(
|
||||
color: isSelected
|
||||
? AppConstants.primaryColor
|
||||
? primaryColor
|
||||
: (isDark ? Colors.grey[700]! : Colors.grey[300]!),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -52,6 +52,7 @@ class PrivacyPolicyContent extends StatelessWidget {
|
||||
_buildPermissionItem('网络权限', '用于获取诗词内容和更新应用信息'),
|
||||
_buildPermissionItem('震动权限', '用于在执行操作时提供反馈提示'),
|
||||
_buildPermissionItem('分享能力', '调用系统分享功能,分享您的笔记、收藏等本地数据'),
|
||||
_buildPermissionItem('设备标识', '获取唯一标识设备的设备ID,确保用户数据安全。'),
|
||||
const SizedBox(height: 24),
|
||||
_buildSectionTitle('3. 管理您的个人信息'),
|
||||
const SizedBox(height: 16),
|
||||
@@ -125,6 +126,8 @@ class PrivacyPolicyContent extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _buildBulletPoint(String text) {
|
||||
final themeController = Get.find<ThemeController>();
|
||||
final primaryColor = themeController.currentThemeColor;
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
||||
child: Row(
|
||||
@@ -135,7 +138,7 @@ class PrivacyPolicyContent extends StatelessWidget {
|
||||
height: 6,
|
||||
margin: const EdgeInsets.only(top: 6, left: 8, right: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: AppConstants.primaryColor,
|
||||
color: primaryColor,
|
||||
shape: BoxShape.circle,
|
||||
),
|
||||
),
|
||||
@@ -487,6 +490,7 @@ class _PrivacyPageState extends State<PrivacyPage>
|
||||
Widget build(BuildContext context) {
|
||||
return Obx(() {
|
||||
final isDark = _themeController.isDarkMode;
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return Scaffold(
|
||||
backgroundColor: isDark
|
||||
? const Color(0xFF1A1A1A)
|
||||
@@ -494,19 +498,16 @@ class _PrivacyPageState extends State<PrivacyPage>
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
'隐私与协议',
|
||||
style: TextStyle(
|
||||
color: AppConstants.primaryColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
style: TextStyle(color: primaryColor, fontWeight: FontWeight.bold),
|
||||
),
|
||||
backgroundColor: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
bottom: TabBar(
|
||||
controller: _tabController,
|
||||
labelColor: AppConstants.primaryColor,
|
||||
labelColor: primaryColor,
|
||||
unselectedLabelColor: isDark ? Colors.grey[400] : Colors.grey[600],
|
||||
indicatorColor: AppConstants.primaryColor,
|
||||
indicatorColor: primaryColor,
|
||||
indicatorWeight: 2,
|
||||
tabs: const [
|
||||
Tab(text: '隐私政策'),
|
||||
@@ -514,12 +515,12 @@ class _PrivacyPageState extends State<PrivacyPage>
|
||||
],
|
||||
),
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back, color: AppConstants.primaryColor),
|
||||
icon: Icon(Icons.arrow_back, color: primaryColor),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: Icon(Icons.link, color: AppConstants.primaryColor),
|
||||
icon: Icon(Icons.link, color: primaryColor),
|
||||
onPressed: () => _showOnlineLinkDialog(isDark),
|
||||
tooltip: '在线版本',
|
||||
),
|
||||
@@ -537,6 +538,7 @@ class _PrivacyPageState extends State<PrivacyPage>
|
||||
}
|
||||
|
||||
void _showOnlineLinkDialog(bool isDark) {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
@@ -544,7 +546,7 @@ class _PrivacyPageState extends State<PrivacyPage>
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
||||
title: Row(
|
||||
children: [
|
||||
Icon(Icons.public, color: AppConstants.primaryColor),
|
||||
Icon(Icons.public, color: primaryColor),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'在线版本',
|
||||
@@ -577,7 +579,7 @@ class _PrivacyPageState extends State<PrivacyPage>
|
||||
'https://poe.vogov.cn/privacy.html',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: AppConstants.primaryColor,
|
||||
color: primaryColor,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
@@ -609,7 +611,7 @@ class _PrivacyPageState extends State<PrivacyPage>
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: const Text('链接已复制到剪贴板'),
|
||||
backgroundColor: AppConstants.primaryColor,
|
||||
backgroundColor: primaryColor,
|
||||
behavior: SnackBarBehavior.floating,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
@@ -620,7 +622,7 @@ class _PrivacyPageState extends State<PrivacyPage>
|
||||
icon: const Icon(Icons.copy, size: 18),
|
||||
label: const Text('复制链接'),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppConstants.primaryColor,
|
||||
backgroundColor: primaryColor,
|
||||
foregroundColor: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
|
||||
@@ -46,20 +46,23 @@ class _UserPlanPageState extends State<UserPlanPage> {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(value ? '已加入用户体验计划' : '已退出用户体验计划'),
|
||||
backgroundColor: value ? AppConstants.primaryColor : Colors.grey[600],
|
||||
backgroundColor: value
|
||||
? _themeController.currentThemeColor
|
||||
: Colors.grey[600],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void _showJoinDialog() {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
||||
title: Row(
|
||||
children: [
|
||||
Icon(Icons.volunteer_activism, color: AppConstants.primaryColor),
|
||||
Icon(Icons.volunteer_activism, color: primaryColor),
|
||||
const SizedBox(width: 8),
|
||||
const Text('加入用户体验计划'),
|
||||
],
|
||||
@@ -96,7 +99,7 @@ class _UserPlanPageState extends State<UserPlanPage> {
|
||||
_toggleUserPlan(true);
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppConstants.primaryColor,
|
||||
backgroundColor: primaryColor,
|
||||
foregroundColor: Colors.white,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
@@ -110,13 +113,14 @@ class _UserPlanPageState extends State<UserPlanPage> {
|
||||
}
|
||||
|
||||
void _showInfoPopup(BuildContext context) {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (context) => AlertDialog(
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
|
||||
title: Row(
|
||||
children: [
|
||||
Icon(Icons.info, color: AppConstants.primaryColor),
|
||||
Icon(Icons.info, color: primaryColor),
|
||||
const SizedBox(width: 8),
|
||||
const Text('温馨提示'),
|
||||
],
|
||||
@@ -192,6 +196,7 @@ class _UserPlanPageState extends State<UserPlanPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Obx(() {
|
||||
final isDark = _themeController.isDarkMode;
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return Scaffold(
|
||||
backgroundColor: isDark
|
||||
? const Color(0xFF1A1A1A)
|
||||
@@ -199,16 +204,13 @@ class _UserPlanPageState extends State<UserPlanPage> {
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
'用户体验计划',
|
||||
style: TextStyle(
|
||||
color: AppConstants.primaryColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
style: TextStyle(color: primaryColor, fontWeight: FontWeight.bold),
|
||||
),
|
||||
backgroundColor: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back, color: AppConstants.primaryColor),
|
||||
icon: Icon(Icons.arrow_back, color: primaryColor),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
),
|
||||
@@ -235,21 +237,19 @@ class _UserPlanPageState extends State<UserPlanPage> {
|
||||
}
|
||||
|
||||
Widget _buildStatusCard(bool isDark) {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(20),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
AppConstants.primaryColor,
|
||||
AppConstants.primaryColor.withBlue(180),
|
||||
],
|
||||
colors: [primaryColor, primaryColor.withBlue(180)],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppConstants.primaryColor.withValues(alpha: 0.3),
|
||||
color: primaryColor.withAlpha(30),
|
||||
blurRadius: 12,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
@@ -531,6 +531,7 @@ class _UserPlanPageState extends State<UserPlanPage> {
|
||||
itemCount: benefits.length,
|
||||
itemBuilder: (context, index) {
|
||||
final benefit = benefits[index];
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
@@ -539,7 +540,7 @@ class _UserPlanPageState extends State<UserPlanPage> {
|
||||
border: Border.all(
|
||||
color: isDark
|
||||
? Colors.grey[700]!
|
||||
: Colors.grey.withValues(alpha: 0.2),
|
||||
: Colors.grey.withAlpha(20),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
@@ -547,7 +548,7 @@ class _UserPlanPageState extends State<UserPlanPage> {
|
||||
Icon(
|
||||
benefit['icon'] as IconData,
|
||||
size: 18,
|
||||
color: AppConstants.primaryColor,
|
||||
color: primaryColor,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
@@ -660,6 +661,7 @@ class _UserPlanPageState extends State<UserPlanPage> {
|
||||
}
|
||||
|
||||
Widget _buildActionButton(bool isDark) {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
height: 50,
|
||||
@@ -667,10 +669,7 @@ class _UserPlanPageState extends State<UserPlanPage> {
|
||||
gradient: _isJoined
|
||||
? null
|
||||
: LinearGradient(
|
||||
colors: [
|
||||
AppConstants.primaryColor,
|
||||
AppConstants.primaryColor.withBlue(180),
|
||||
],
|
||||
colors: [primaryColor, primaryColor.withBlue(180)],
|
||||
),
|
||||
color: _isJoined
|
||||
? (isDark ? Colors.grey[700] : Colors.grey[300])
|
||||
@@ -680,7 +679,7 @@ class _UserPlanPageState extends State<UserPlanPage> {
|
||||
? null
|
||||
: [
|
||||
BoxShadow(
|
||||
color: AppConstants.primaryColor.withValues(alpha: 0.3),
|
||||
color: primaryColor.withAlpha(30),
|
||||
blurRadius: 8,
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
|
||||
@@ -27,6 +27,7 @@ class _WidgetsPageState extends State<WidgetsPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Obx(() {
|
||||
final isDark = _themeController.isDarkMode;
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return Scaffold(
|
||||
backgroundColor: isDark
|
||||
? const Color(0xFF1A1A1A)
|
||||
@@ -34,16 +35,13 @@ class _WidgetsPageState extends State<WidgetsPage> {
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
'桌面卡片设置',
|
||||
style: TextStyle(
|
||||
color: AppConstants.primaryColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
style: TextStyle(color: primaryColor, fontWeight: FontWeight.bold),
|
||||
),
|
||||
backgroundColor: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back, color: AppConstants.primaryColor),
|
||||
icon: Icon(Icons.arrow_back, color: primaryColor),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
),
|
||||
@@ -100,6 +98,7 @@ class _WidgetsPageState extends State<WidgetsPage> {
|
||||
}
|
||||
|
||||
Widget _buildSettingsGroup(String title, List<Widget> items, bool isDark) {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
@@ -122,7 +121,7 @@ class _WidgetsPageState extends State<WidgetsPage> {
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: AppConstants.primaryColor,
|
||||
color: primaryColor,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -140,14 +139,15 @@ class _WidgetsPageState extends State<WidgetsPage> {
|
||||
ValueChanged<bool> onChanged,
|
||||
bool isDark,
|
||||
) {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return ListTile(
|
||||
leading: Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: AppConstants.primaryColor.withAlpha(10),
|
||||
color: primaryColor.withAlpha(10),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Icon(icon, color: AppConstants.primaryColor, size: 20),
|
||||
child: Icon(icon, color: primaryColor, size: 20),
|
||||
),
|
||||
title: Text(
|
||||
title,
|
||||
@@ -167,20 +167,21 @@ class _WidgetsPageState extends State<WidgetsPage> {
|
||||
trailing: Switch(
|
||||
value: value,
|
||||
onChanged: onChanged,
|
||||
activeThumbColor: AppConstants.primaryColor,
|
||||
activeThumbColor: primaryColor,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildIntervalItem(bool isDark) {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return ListTile(
|
||||
leading: Container(
|
||||
padding: const EdgeInsets.all(8),
|
||||
decoration: BoxDecoration(
|
||||
color: AppConstants.primaryColor.withAlpha(10),
|
||||
color: primaryColor.withAlpha(10),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Icon(Icons.refresh, color: AppConstants.primaryColor, size: 20),
|
||||
child: Icon(Icons.refresh, color: primaryColor, size: 20),
|
||||
),
|
||||
title: Text(
|
||||
'更新间隔',
|
||||
@@ -213,7 +214,7 @@ class _WidgetsPageState extends State<WidgetsPage> {
|
||||
visualDensity: VisualDensity.compact,
|
||||
backgroundColor: WidgetStateProperty.resolveWith((states) {
|
||||
if (states.contains(WidgetState.selected)) {
|
||||
return AppConstants.primaryColor;
|
||||
return primaryColor;
|
||||
}
|
||||
return isDark ? Colors.grey[700] : Colors.grey[200];
|
||||
}),
|
||||
@@ -230,11 +231,12 @@ class _WidgetsPageState extends State<WidgetsPage> {
|
||||
}
|
||||
|
||||
Widget _buildPreviewCard(bool isDark) {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return Container(
|
||||
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 8),
|
||||
padding: const EdgeInsets.all(16),
|
||||
decoration: BoxDecoration(
|
||||
color: AppConstants.primaryColor.withAlpha(90),
|
||||
color: primaryColor.withAlpha(90),
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
@@ -303,19 +305,17 @@ class _WidgetsPageState extends State<WidgetsPage> {
|
||||
}
|
||||
|
||||
Widget _buildActionButton(bool isDark) {
|
||||
final primaryColor = _themeController.currentThemeColor;
|
||||
return SizedBox(
|
||||
width: double.infinity,
|
||||
child: ElevatedButton(
|
||||
onPressed: () {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text('桌面卡片设置已保存'),
|
||||
backgroundColor: AppConstants.primaryColor,
|
||||
),
|
||||
SnackBar(content: Text('桌面卡片设置已保存'), backgroundColor: primaryColor),
|
||||
);
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppConstants.primaryColor,
|
||||
backgroundColor: primaryColor,
|
||||
padding: const EdgeInsets.symmetric(vertical: 16),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
|
||||
Reference in New Issue
Block a user