深色模式、首页设置页面和功能优化

This commit is contained in:
Developer
2026-04-02 07:06:55 +08:00
parent f0a62ed68b
commit 954d173329
88 changed files with 12157 additions and 7578 deletions

View File

@@ -1,7 +1,9 @@
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:get/get.dart';
import '../../../config/app_config.dart';
import '../../../constants/app_constants.dart';
import '../../../services/get/theme_controller.dart';
/// 时间: 2026-03-26
/// 功能: 了解我们页面
@@ -13,51 +15,58 @@ class LearnUsPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xFFF5F5F5),
appBar: AppBar(
title: Text(
'了解我们',
style: TextStyle(
color: AppConstants.primaryColor,
fontWeight: FontWeight.bold,
final themeController = Get.find<ThemeController>();
return Obx(() {
final isDark = themeController.isDarkMode;
return Scaffold(
backgroundColor: isDark
? const Color(0xFF1A1A1A)
: const Color(0xFFF5F5F5),
appBar: AppBar(
title: Text(
'了解我们',
style: TextStyle(
color: AppConstants.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),
onPressed: () => Navigator.of(context).pop(),
),
),
backgroundColor: Colors.white,
elevation: 0,
centerTitle: true,
leading: IconButton(
icon: Icon(Icons.arrow_back, color: AppConstants.primaryColor),
onPressed: () => Navigator.of(context).pop(),
body: ListView(
padding: const EdgeInsets.all(16),
children: [
_buildHeaderCard(),
const SizedBox(height: 16),
_buildOfficialSiteCard(isDark),
const SizedBox(height: 16),
_buildQQGroupCard(context, isDark),
const SizedBox(height: 16),
_buildDeveloperCard(context, isDark),
const SizedBox(height: 16),
_buildTeamCard(isDark),
const SizedBox(height: 16),
_buildIcpCard(context, isDark),
const SizedBox(height: 24),
_buildBottomIndicator(isDark),
],
),
),
body: ListView(
padding: const EdgeInsets.all(16),
children: [
_buildHeaderCard(),
const SizedBox(height: 16),
_buildOfficialSiteCard(),
const SizedBox(height: 16),
_buildQQGroupCard(context),
const SizedBox(height: 16),
_buildDeveloperCard(context),
const SizedBox(height: 16),
_buildTeamCard(),
const SizedBox(height: 16),
_buildIcpCard(context),
const SizedBox(height: 24),
_buildBottomIndicator(),
],
),
);
);
});
}
Widget _buildHeaderCard() {
return Container(
padding: const EdgeInsets.all(24),
decoration: BoxDecoration(
gradient: LinearGradient(
colors: const [
gradient: const LinearGradient(
colors: [
Color.fromARGB(255, 143, 73, 228),
Color(0xFF6200EE),
Color(0xFF3700B3),
@@ -145,14 +154,16 @@ class LearnUsPage extends StatelessWidget {
);
}
Widget _buildOfficialSiteCard() {
Widget _buildOfficialSiteCard(bool isDark) {
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.3)
: Colors.black.withValues(alpha: 0.05),
blurRadius: 10,
offset: const Offset(0, 2),
),
@@ -178,32 +189,41 @@ class LearnUsPage extends StatelessWidget {
),
),
const SizedBox(width: 12),
const Text(
Text(
'官方网站',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: isDark ? Colors.white : Colors.black,
),
),
],
),
),
const Divider(height: 1),
Divider(height: 1, color: isDark ? Colors.grey[800] : null),
Padding(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
Text(
'访问我们的官方网站了解更多信息',
style: TextStyle(fontSize: 13, color: Colors.grey),
style: TextStyle(
fontSize: 13,
color: isDark ? Colors.grey[400] : Colors.grey,
),
),
const SizedBox(height: 12),
Container(
width: double.infinity,
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: Colors.grey[50],
color: isDark ? const Color(0xFF3A3A3A) : Colors.grey[50],
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: Colors.grey.withValues(alpha: 0.2),
color: isDark
? Colors.grey[700]!.withValues(alpha: 0.2)
: Colors.grey.withValues(alpha: 0.2),
),
),
child: Row(
@@ -234,14 +254,16 @@ class LearnUsPage extends StatelessWidget {
);
}
Widget _buildQQGroupCard(BuildContext context) {
Widget _buildQQGroupCard(BuildContext context, bool isDark) {
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.3)
: Colors.black.withValues(alpha: 0.05),
blurRadius: 10,
offset: const Offset(0, 2),
),
@@ -263,22 +285,29 @@ class LearnUsPage extends StatelessWidget {
child: Icon(Icons.group, color: Colors.blue[700], size: 20),
),
const SizedBox(width: 12),
const Text(
Text(
'QQ交流群',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: isDark ? Colors.white : Colors.black,
),
),
],
),
),
const Divider(height: 1),
Divider(height: 1, color: isDark ? Colors.grey[800] : null),
Padding(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
Text(
'加入我们的QQ交流群与其他诗词爱好者一起交流',
style: TextStyle(fontSize: 13, color: Colors.grey),
style: TextStyle(
fontSize: 13,
color: isDark ? Colors.grey[400] : Colors.grey,
),
),
const SizedBox(height: 12),
InkWell(
@@ -288,7 +317,7 @@ class LearnUsPage extends StatelessWidget {
width: double.infinity,
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: Colors.grey[50],
color: isDark ? const Color(0xFF3A3A3A) : Colors.grey[50],
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: AppConstants.primaryColor.withValues(alpha: 0.3),
@@ -318,7 +347,10 @@ class LearnUsPage extends StatelessWidget {
const SizedBox(height: 8),
Text(
'💡 点击群号可复制',
style: TextStyle(fontSize: 12, color: Colors.grey[500]),
style: TextStyle(
fontSize: 12,
color: isDark ? Colors.grey[500] : Colors.grey[500],
),
),
],
),
@@ -348,14 +380,16 @@ class LearnUsPage extends StatelessWidget {
);
}
Widget _buildDeveloperCard(BuildContext context) {
Widget _buildDeveloperCard(BuildContext context, bool isDark) {
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.3)
: Colors.black.withValues(alpha: 0.05),
blurRadius: 10,
offset: const Offset(0, 2),
),
@@ -381,14 +415,18 @@ class LearnUsPage extends StatelessWidget {
),
),
const SizedBox(width: 12),
const Text(
Text(
'开发者',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: isDark ? Colors.white : Colors.black,
),
),
],
),
),
const Divider(height: 1),
Divider(height: 1, color: isDark ? Colors.grey[800] : null),
Padding(
padding: const EdgeInsets.all(16),
child: Row(
@@ -414,17 +452,21 @@ class LearnUsPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
Text(
'微风暴工作室',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: isDark ? Colors.white : Colors.black,
),
),
const SizedBox(height: 4),
Text(
'专注文字文化领域',
style: TextStyle(fontSize: 13, color: Colors.grey[600]),
style: TextStyle(
fontSize: 13,
color: isDark ? Colors.grey[400] : Colors.grey[600],
),
),
],
),
@@ -457,11 +499,12 @@ class LearnUsPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
Text(
'商务合作&侵权申诉&联系我们',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w500,
color: isDark ? Colors.white : Colors.black,
),
),
const SizedBox(height: 2),
@@ -504,11 +547,12 @@ class LearnUsPage extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
Text(
'微信公众号',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: isDark ? Colors.white : Colors.black,
),
),
const SizedBox(height: 4),
@@ -573,14 +617,16 @@ class LearnUsPage extends StatelessWidget {
);
}
Widget _buildTeamCard() {
Widget _buildTeamCard(bool isDark) {
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.3)
: Colors.black.withValues(alpha: 0.05),
blurRadius: 10,
offset: const Offset(0, 2),
),
@@ -602,17 +648,27 @@ class LearnUsPage extends StatelessWidget {
child: Icon(Icons.group, color: Colors.purple[700], size: 20),
),
const SizedBox(width: 12),
const Text(
Text(
'团队信息(Team)',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: isDark ? Colors.white : Colors.black,
),
),
],
),
),
_buildTeamMember('💻', '程序设计', '无书的书🤡', '尽毕生所学,取天下之诗集,只为逗她一笑'),
_buildTeamMember('🎨', 'UI/UX/Testing', 'Ayk', '....'),
_buildTeamMember('⚙️', '后端', '伯乐不相马', '真的吗,还是做不到吗?'),
_buildTeamMember('🔧', '技术支持', '闲言app', '闲言app原班人马打造'),
_buildTeamMember(
'💻',
'程序设计',
'无书的书🤡',
'尽毕生所学,取天下之诗集,只为逗她一笑',
isDark,
),
_buildTeamMember('🎨', 'UI/UX/Testing', 'Ayk', '....', isDark),
_buildTeamMember('⚙️', '后端', '伯乐不相马', '真的吗,还是做不到吗?', isDark),
_buildTeamMember('🔧', '技术支持', '闲言app', '闲言app原班人马打造', isDark),
],
),
);
@@ -623,6 +679,7 @@ class LearnUsPage extends StatelessWidget {
String role,
String name,
String signature,
bool isDark,
) {
return Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
@@ -632,7 +689,7 @@ class LearnUsPage extends StatelessWidget {
width: 44,
height: 44,
decoration: BoxDecoration(
color: Colors.grey[100],
color: isDark ? const Color(0xFF3A3A3A) : Colors.grey[100],
borderRadius: BorderRadius.circular(10),
),
child: Center(
@@ -648,9 +705,10 @@ class LearnUsPage extends StatelessWidget {
children: [
Text(
role,
style: const TextStyle(
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: isDark ? Colors.white : Colors.black,
),
),
const SizedBox(width: 8),
@@ -676,7 +734,10 @@ class LearnUsPage extends StatelessWidget {
const SizedBox(height: 4),
Text(
signature,
style: TextStyle(fontSize: 12, color: Colors.grey[600]),
style: TextStyle(
fontSize: 12,
color: isDark ? Colors.grey[400] : Colors.grey[600],
),
),
],
),
@@ -686,14 +747,16 @@ class LearnUsPage extends StatelessWidget {
);
}
Widget _buildIcpCard(BuildContext context) {
Widget _buildIcpCard(BuildContext context, bool isDark) {
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.3)
: Colors.black.withValues(alpha: 0.05),
blurRadius: 10,
offset: const Offset(0, 2),
),
@@ -713,68 +776,43 @@ class LearnUsPage extends StatelessWidget {
borderRadius: BorderRadius.circular(8),
),
child: Icon(
Icons.verified_user,
Icons.verified,
color: Colors.orange[700],
size: 20,
),
),
const SizedBox(width: 12),
const Text(
'ICP备案信息',
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold),
Text(
'备案信息',
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: isDark ? Colors.white : Colors.black,
),
),
],
),
),
const Divider(height: 1),
Divider(height: 1, color: isDark ? Colors.grey[800] : null),
Padding(
padding: const EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'APP核准备案号',
style: TextStyle(fontSize: 13, color: Colors.grey),
),
const SizedBox(height: 12),
InkWell(
onTap: () => _copyIcpNumber(context),
borderRadius: BorderRadius.circular(8),
child: Container(
width: double.infinity,
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: Colors.grey[50],
borderRadius: BorderRadius.circular(8),
border: Border.all(
color: AppConstants.primaryColor.withValues(alpha: 0.3),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Icon(
Icons.content_copy,
size: 16,
color: AppConstants.primaryColor,
),
const SizedBox(width: 8),
Text(
'滇ICP备2022000863号-15A',
style: TextStyle(
fontSize: 14,
fontWeight: FontWeight.w600,
color: AppConstants.primaryColor,
),
),
],
),
Text(
'滇ICP备2025002147号-2A',
style: TextStyle(
fontSize: 14,
color: isDark ? Colors.grey[300] : Colors.grey[700],
),
),
const SizedBox(height: 8),
const SizedBox(height: 4),
Text(
'💡 点击备案号可复制',
style: TextStyle(fontSize: 12, color: Colors.grey[500]),
'弥勒市朋普镇微风暴网络科技工作室',
style: TextStyle(
fontSize: 13,
color: isDark ? Colors.grey[400] : Colors.grey[600],
),
),
],
),
@@ -784,41 +822,32 @@ class LearnUsPage extends StatelessWidget {
);
}
void _copyIcpNumber(BuildContext context) {
Clipboard.setData(const ClipboardData(text: '滇ICP备2022000863号-15A'));
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content: const Row(
children: [
Icon(Icons.check_circle, color: Colors.white, size: 20),
SizedBox(width: 8),
Text('备案号已复制到剪贴板'),
],
),
backgroundColor: AppConstants.primaryColor,
behavior: SnackBarBehavior.floating,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
duration: const Duration(seconds: 2),
),
);
}
Widget _buildBottomIndicator() {
Widget _buildBottomIndicator(bool isDark) {
return Container(
padding: const EdgeInsets.symmetric(vertical: 24),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Container(width: 40, height: 1, color: Colors.grey[300]),
Container(
width: 40,
height: 1,
color: isDark ? Colors.grey[700] : Colors.grey[300],
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16),
child: Text(
'到底了',
style: TextStyle(fontSize: 12, color: Colors.grey[400]),
style: TextStyle(
fontSize: 12,
color: isDark ? Colors.grey[500] : Colors.grey[400],
),
),
),
Container(width: 40, height: 1, color: Colors.grey[300]),
Container(
width: 40,
height: 1,
color: isDark ? Colors.grey[700] : Colors.grey[300],
),
],
),
);