关怀模式
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(
|
||||
|
||||
Reference in New Issue
Block a user