icon优化
This commit is contained in:
@@ -958,26 +958,26 @@ class _AppInfoPageState extends State<AppInfoPage> {
|
||||
],
|
||||
),
|
||||
),
|
||||
Divider(height: 1, color: isDark ? Colors.grey[800] : null),
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
_buildUpdateItem('版本 1.2.40', '2026-03-27', [
|
||||
'新增:主题个性化页面',
|
||||
'新增:设计风格卡片',
|
||||
'优化:界面布局和响应式设计',
|
||||
], isDark),
|
||||
const SizedBox(height: 16),
|
||||
_buildUpdateItem('版本 1.2.39', '2026-03-27', [
|
||||
'修复:引导页滑动问题',
|
||||
'优化:左侧进度条位置',
|
||||
'新增:协议内容焦点功能',
|
||||
], isDark),
|
||||
],
|
||||
),
|
||||
),
|
||||
// Divider(height: 1, color: isDark ? Colors.grey[800] : null),
|
||||
// Padding(
|
||||
// padding: const EdgeInsets.all(16),
|
||||
// child: Column(
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// _buildUpdateItem('版本 1.2.40', '2026-03-27', [
|
||||
// '新增:主题个性化页面',
|
||||
// '新增:设计风格卡片',
|
||||
// '优化:界面布局和响应式设计',
|
||||
// ], isDark),
|
||||
// const SizedBox(height: 16),
|
||||
// _buildUpdateItem('版本 1.2.39', '2026-03-27', [
|
||||
// '修复:引导页滑动问题',
|
||||
// '优化:左侧进度条位置',
|
||||
// '新增:协议内容焦点功能',
|
||||
// ], isDark),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -2,8 +2,10 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter/foundation.dart' show kIsWeb;
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../../constants/app_constants.dart';
|
||||
import '../../../services/isweb/wakelock_service.dart';
|
||||
import '../../../services/get/theme_controller.dart';
|
||||
import '../guide/beginner_page.dart';
|
||||
import 'dart:io' as io;
|
||||
|
||||
@@ -14,7 +16,7 @@ class PopMenu extends StatelessWidget {
|
||||
final VoidCallback? onDarkMode;
|
||||
final VoidCallback? onSettings;
|
||||
|
||||
const PopMenu({
|
||||
PopMenu({
|
||||
super.key,
|
||||
this.onRefresh,
|
||||
this.onEdit,
|
||||
@@ -23,6 +25,8 @@ class PopMenu extends StatelessWidget {
|
||||
this.onSettings,
|
||||
});
|
||||
|
||||
final ThemeController _themeController = Get.find<ThemeController>();
|
||||
|
||||
static Future<void> shareApp(BuildContext context) async {
|
||||
try {
|
||||
const String shareText = '情景诗词App - 一款优雅的诗词学习应用,包含丰富的诗词内容和答题功能';
|
||||
@@ -124,42 +128,78 @@ class PopMenu extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
decoration: const BoxDecoration(
|
||||
color: Colors.white,
|
||||
borderRadius: BorderRadius.vertical(top: Radius.circular(20)),
|
||||
),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// 顶部拖拽条
|
||||
Container(
|
||||
width: 40,
|
||||
height: 4,
|
||||
margin: const EdgeInsets.only(top: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.grey[300]!,
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
return Obx(() {
|
||||
final isDark = _themeController.isDarkMode;
|
||||
|
||||
return Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
color: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
borderRadius: const BorderRadius.vertical(top: Radius.circular(20)),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withAlpha(isDark ? 76 : 26),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, -2),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Material(
|
||||
color: Colors.transparent,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
SystemNavigator.pop();
|
||||
},
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(vertical: 20),
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
// 顶部拖拽条
|
||||
Container(
|
||||
width: 40,
|
||||
height: 4,
|
||||
margin: const EdgeInsets.only(top: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: isDark ? Colors.grey[600]! : Colors.grey[300]!,
|
||||
borderRadius: BorderRadius.circular(2),
|
||||
),
|
||||
),
|
||||
// 选项列表
|
||||
_buildBottomSheetItem(
|
||||
context,
|
||||
'刷新数据',
|
||||
Icons.refresh,
|
||||
onRefresh,
|
||||
),
|
||||
_buildBottomSheetItem(context, '分享软件', Icons.share, () {
|
||||
shareApp(context);
|
||||
}),
|
||||
_buildBottomSheetItem(context, '使用教程', Icons.menu_book, () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute<void>(
|
||||
builder: (_) => const BeginnerPage(),
|
||||
),
|
||||
);
|
||||
}),
|
||||
_buildBottomSheetItem(
|
||||
context,
|
||||
'取消',
|
||||
Icons.settings,
|
||||
onSettings,
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
_buildBottomSheetItem(context, '返回桌面', Icons.exit_to_app, () {
|
||||
SystemNavigator.pop();
|
||||
}),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
// 选项列表
|
||||
_buildBottomSheetItem(context, '刷新数据', Icons.refresh, onRefresh),
|
||||
_buildBottomSheetItem(context, '分享软件', Icons.share, () {
|
||||
shareApp(context);
|
||||
}),
|
||||
_buildBottomSheetItem(context, '使用教程', Icons.menu_book, () {
|
||||
Navigator.of(context).push(
|
||||
MaterialPageRoute<void>(builder: (_) => const BeginnerPage()),
|
||||
);
|
||||
}),
|
||||
_buildBottomSheetItem(context, '取消', Icons.settings, onSettings),
|
||||
const SizedBox(height: 20),
|
||||
_buildBottomSheetItem(context, '返回桌面', Icons.exit_to_app, () {
|
||||
SystemNavigator.pop();
|
||||
}),
|
||||
],
|
||||
),
|
||||
);
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Widget _buildBottomSheetItem(
|
||||
@@ -168,9 +208,17 @@ class PopMenu extends StatelessWidget {
|
||||
IconData icon,
|
||||
VoidCallback? onTap,
|
||||
) {
|
||||
final isDark = _themeController.isDarkMode;
|
||||
|
||||
return ListTile(
|
||||
leading: Icon(icon, color: AppConstants.primaryColor),
|
||||
title: Text(title),
|
||||
leading: Icon(
|
||||
icon,
|
||||
color: isDark ? Colors.white70 : AppConstants.primaryColor,
|
||||
),
|
||||
title: Text(
|
||||
title,
|
||||
style: TextStyle(color: isDark ? Colors.white70 : Colors.black87),
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.pop(context);
|
||||
HapticFeedback.lightImpact();
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
import 'dart:io';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import '../../../constants/app_constants.dart';
|
||||
import '../../../services/get/theme_controller.dart';
|
||||
|
||||
/// 时间: 2026-03-27
|
||||
/// 功能: 应用数据管理页面
|
||||
@@ -28,6 +30,8 @@ class _AppDataPageState extends State<AppDataPage> {
|
||||
int _cacheBytes = 0;
|
||||
int _dataBytes = 0;
|
||||
|
||||
final ThemeController _themeController = Get.find<ThemeController>();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
@@ -492,41 +496,41 @@ class _AppDataPageState extends State<AppDataPage> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFFF5F5F5),
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
'应用数据',
|
||||
style: TextStyle(
|
||||
color: AppConstants.primaryColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
return Obx(() {
|
||||
final isDark = _themeController.isDarkMode;
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: isDark
|
||||
? const Color(0xFF1A1A1A)
|
||||
: const Color(0xFFF5F5F5),
|
||||
appBar: AppBar(
|
||||
title: const Text(
|
||||
'应用数据',
|
||||
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
|
||||
),
|
||||
backgroundColor: isDark
|
||||
? const Color(0xFF2A2A2A)
|
||||
: AppConstants.primaryColor,
|
||||
iconTheme: IconThemeData(color: Colors.white),
|
||||
),
|
||||
backgroundColor: Colors.white,
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
leading: IconButton(
|
||||
icon: Icon(Icons.arrow_back, color: AppConstants.primaryColor),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
),
|
||||
body: _isLoading
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
: ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
children: [
|
||||
_buildDataOverviewCard(),
|
||||
const SizedBox(height: 16),
|
||||
_buildDataManagementCard(),
|
||||
const SizedBox(height: 16),
|
||||
_buildDataBackupCard(),
|
||||
const SizedBox(height: 16),
|
||||
_buildDangerZoneCard(),
|
||||
const SizedBox(height: 24),
|
||||
_buildBottomInfo(),
|
||||
],
|
||||
),
|
||||
);
|
||||
body: _isLoading
|
||||
? const Center(child: CircularProgressIndicator())
|
||||
: ListView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
children: [
|
||||
_buildDataOverviewCard(),
|
||||
const SizedBox(height: 16),
|
||||
_buildDataManagementCard(),
|
||||
const SizedBox(height: 16),
|
||||
_buildDataBackupCard(),
|
||||
const SizedBox(height: 16),
|
||||
_buildDangerZoneCard(),
|
||||
const SizedBox(height: 24),
|
||||
_buildBottomInfo(),
|
||||
],
|
||||
),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Widget _buildDataOverviewCard() {
|
||||
@@ -578,35 +582,55 @@ class _AppDataPageState extends State<AppDataPage> {
|
||||
}
|
||||
|
||||
Widget _buildDataItem(String label, String value) {
|
||||
final isDark = _themeController.isDarkMode;
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(label, style: const TextStyle(fontSize: 14)),
|
||||
Text(value, style: TextStyle(fontSize: 14, color: Colors.grey[600])),
|
||||
Text(
|
||||
label,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: isDark ? Colors.white70 : Colors.black87,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
value,
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: isDark ? Colors.grey[400] : Colors.grey[600],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildDivider() {
|
||||
final isDark = _themeController.isDarkMode;
|
||||
|
||||
return Divider(
|
||||
height: 1,
|
||||
indent: 16,
|
||||
endIndent: 16,
|
||||
color: Colors.grey[200],
|
||||
color: isDark ? Colors.grey[700] : Colors.grey[200],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildDataManagementCard() {
|
||||
final isDark = _themeController.isDarkMode;
|
||||
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: 0.05),
|
||||
color: isDark
|
||||
? Colors.black.withValues(alpha: 0.2)
|
||||
: Colors.black.withValues(alpha: 0.05),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
@@ -662,13 +686,17 @@ class _AppDataPageState extends State<AppDataPage> {
|
||||
}
|
||||
|
||||
Widget _buildDataBackupCard() {
|
||||
final isDark = _themeController.isDarkMode;
|
||||
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: 0.05),
|
||||
color: isDark
|
||||
? Colors.black.withValues(alpha: 0.2)
|
||||
: Colors.black.withValues(alpha: 0.05),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
@@ -724,13 +752,17 @@ class _AppDataPageState extends State<AppDataPage> {
|
||||
}
|
||||
|
||||
Widget _buildDangerZoneCard() {
|
||||
final isDark = _themeController.isDarkMode;
|
||||
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
color: isDark ? const Color(0xFF2A2A2A) : Colors.white,
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Colors.black.withValues(alpha: 0.05),
|
||||
color: isDark
|
||||
? Colors.black.withValues(alpha: 0.2)
|
||||
: Colors.black.withValues(alpha: 0.05),
|
||||
blurRadius: 10,
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
@@ -788,6 +820,8 @@ class _AppDataPageState extends State<AppDataPage> {
|
||||
Color color,
|
||||
VoidCallback onTap,
|
||||
) {
|
||||
final isDark = _themeController.isDarkMode;
|
||||
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
@@ -811,20 +845,28 @@ class _AppDataPageState extends State<AppDataPage> {
|
||||
children: [
|
||||
Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: isDark ? Colors.white : Colors.black87,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
Text(
|
||||
subtitle,
|
||||
style: TextStyle(fontSize: 12, color: Colors.grey[600]),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: isDark ? Colors.grey[400] : Colors.grey[600],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Icon(Icons.chevron_right, color: Colors.grey[400]),
|
||||
Icon(
|
||||
Icons.chevron_right,
|
||||
color: isDark ? Colors.grey[500] : Colors.grey[400],
|
||||
size: 20,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -832,23 +874,32 @@ class _AppDataPageState extends State<AppDataPage> {
|
||||
}
|
||||
|
||||
Widget _buildBottomInfo() {
|
||||
final isDark = _themeController.isDarkMode;
|
||||
|
||||
return Center(
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(Icons.info_outline, color: Colors.grey[400], size: 32),
|
||||
Icon(
|
||||
Icons.info_outline,
|
||||
color: isDark ? Colors.grey[500] : Colors.grey[400],
|
||||
size: 32,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(
|
||||
'数据安全提示',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: Colors.grey[600],
|
||||
color: isDark ? Colors.grey[300] : Colors.grey[600],
|
||||
fontWeight: FontWeight.w500,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
'清空数据前请先备份重要数据',
|
||||
style: TextStyle(fontSize: 12, color: Colors.grey[500]),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: isDark ? Colors.grey[400] : Colors.grey[500],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -3,6 +3,7 @@ import 'dart:ui';
|
||||
import 'dart:math';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:get/get.dart';
|
||||
import '../../constants/app_constants.dart';
|
||||
import '../../services/network_listener_service.dart';
|
||||
import 'guide/tongji.dart';
|
||||
@@ -41,6 +42,7 @@ class PersonalCardState extends State<PersonalCard> {
|
||||
bool _isEditingNickname = false;
|
||||
bool _isUserPlanJoined = false;
|
||||
late TextEditingController _nicknameController;
|
||||
int _currentAvatarIndex = 0;
|
||||
|
||||
// 累计数据
|
||||
int _totalViews = 0;
|
||||
@@ -229,6 +231,29 @@ class PersonalCardState extends State<PersonalCard> {
|
||||
"新的一年,愿你拥有🐲🐴精神,事业如🐲头腾飞,家庭和睦🏠,幸福美满❤️!",
|
||||
];
|
||||
|
||||
final List<String> _avatarEmojis = [
|
||||
'👤',
|
||||
'😊',
|
||||
'🎨',
|
||||
'🌟',
|
||||
'🦋',
|
||||
'🌺',
|
||||
'🍀',
|
||||
'🎯',
|
||||
'🚀',
|
||||
'💎',
|
||||
'🌈',
|
||||
'🎭',
|
||||
'🦊',
|
||||
'🐼',
|
||||
'🦁',
|
||||
'🐨',
|
||||
'🦄',
|
||||
'🐉',
|
||||
'🔥',
|
||||
'⚡',
|
||||
];
|
||||
|
||||
String _getRandomTip() {
|
||||
final random = Random();
|
||||
return _tips[random.nextInt(_tips.length)];
|
||||
@@ -240,6 +265,23 @@ class PersonalCardState extends State<PersonalCard> {
|
||||
});
|
||||
}
|
||||
|
||||
void _switchAvatar() {
|
||||
setState(() {
|
||||
_currentAvatarIndex = (_currentAvatarIndex + 1) % _avatarEmojis.length;
|
||||
widget.userData['avatar'] = _avatarEmojis[_currentAvatarIndex];
|
||||
});
|
||||
|
||||
// 添加触觉反馈
|
||||
HapticFeedback.lightImpact();
|
||||
|
||||
// 显示切换提示
|
||||
Get.snackbar(
|
||||
'头像切换',
|
||||
'头像已切换为 ${_avatarEmojis[_currentAvatarIndex]}',
|
||||
duration: const Duration(seconds: 1),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
@@ -301,7 +343,10 @@ class PersonalCardState extends State<PersonalCard> {
|
||||
children: [
|
||||
// 头像
|
||||
GestureDetector(
|
||||
onTap: widget.onAvatarTap,
|
||||
onTap: () {
|
||||
_switchAvatar();
|
||||
widget.onAvatarTap?.call();
|
||||
},
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
@@ -416,7 +461,10 @@ class PersonalCardState extends State<PersonalCard> {
|
||||
children: [
|
||||
// 头像
|
||||
GestureDetector(
|
||||
onTap: widget.onAvatarTap,
|
||||
onTap: () {
|
||||
_switchAvatar();
|
||||
widget.onAvatarTap?.call();
|
||||
},
|
||||
child: Stack(
|
||||
children: [
|
||||
Container(
|
||||
|
||||
@@ -241,7 +241,10 @@ class ProfilePage extends StatelessWidget {
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
),
|
||||
child: const Text('开始诗词答题', style: TextStyle(fontSize: 16)),
|
||||
child: const Text(
|
||||
'开始诗词答题',
|
||||
style: TextStyle(fontSize: 16, color: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -8,6 +8,8 @@ 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/load/locally.dart';
|
||||
|
||||
/// 时间: 2026-03-26
|
||||
@@ -668,7 +670,7 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
AppConstants.appName,
|
||||
'设置建议',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -677,17 +679,87 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
'版本 ${AppConstants.appVersion}',
|
||||
'是否在找,主题风格',
|
||||
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()),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildActionButton(
|
||||
String title,
|
||||
String subtitle,
|
||||
IconData icon,
|
||||
Color color,
|
||||
VoidCallback onTap,
|
||||
) {
|
||||
final isDark = _themeController.isDarkMode;
|
||||
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: color.withValues(alpha: 0.1),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(color: color.withValues(alpha: 0.2), width: 1),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Icon(icon, color: color, size: 24),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
title,
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: isDark ? Colors.white : Colors.black87,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 2),
|
||||
Text(
|
||||
subtitle,
|
||||
style: TextStyle(
|
||||
fontSize: 10,
|
||||
color: isDark ? Colors.grey[400] : Colors.grey[600],
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
void _showSnackBar(String message) {
|
||||
ScaffoldMessenger.of(
|
||||
context,
|
||||
|
||||
@@ -783,7 +783,7 @@ class LearnUsPage extends StatelessWidget {
|
||||
),
|
||||
const SizedBox(width: 12),
|
||||
Text(
|
||||
'备案信息',
|
||||
'ICP备案信息',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.bold,
|
||||
@@ -799,16 +799,43 @@ class LearnUsPage extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'滇ICP备2025002147号-2A',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: isDark ? Colors.grey[300] : Colors.grey[700],
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Clipboard.setData(
|
||||
const ClipboardData(text: '滇ICP备2022000863号-13'),
|
||||
);
|
||||
Get.snackbar(
|
||||
'复制成功',
|
||||
'备案号已复制到剪贴板',
|
||||
duration: const Duration(seconds: 1),
|
||||
);
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
'滇ICP备2022000863号-13',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: isDark ? Colors.grey[300] : Colors.grey[700],
|
||||
decoration: TextDecoration.underline,
|
||||
decorationColor: isDark
|
||||
? Colors.grey[400]
|
||||
: Colors.grey[600],
|
||||
),
|
||||
),
|
||||
),
|
||||
Icon(
|
||||
Icons.copy,
|
||||
size: 16,
|
||||
color: isDark ? Colors.grey[400] : Colors.grey[600],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
'弥勒市朋普镇微风暴网络科技工作室',
|
||||
'APP核准备案号',
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: isDark ? Colors.grey[400] : Colors.grey[600],
|
||||
|
||||
@@ -89,7 +89,8 @@ class _AppDiyPageState extends State<AppDiyPage> {
|
||||
style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Text('• 当前设置仅当前页面生效'),
|
||||
Text('• 当前仅支持设置深色模式'),
|
||||
Text('• 其他设置仅当前页面生效'),
|
||||
Text('• 后续版本将陆续支持'),
|
||||
Text('• 可提前预览主题风格设置'),
|
||||
SizedBox(height: 12),
|
||||
|
||||
Reference in New Issue
Block a user