鸿蒙 api23
This commit is contained in:
233
CHANGELOG.md
233
CHANGELOG.md
@@ -4,6 +4,51 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
---
|
||||
|
||||
## [1.6.0] - 2026-04-18
|
||||
|
||||
### 优化
|
||||
- 🧹 **代码质量全面清理**
|
||||
- 清理所有未使用的导入(app_constants.dart、theme_controller.dart等)
|
||||
- 清理所有未使用的字段(_readAloudEnabled、_firstLaunch、_showGuideOnStartup、_isLoadingCategories等)
|
||||
- 清理所有未使用的方法(_buildActionButton、_copyQQGroupNumber、_buildDesignStyleCard、_showGuideStatusPopup、_toggleShowGuide等)
|
||||
- 清理未使用的局部变量(themeController等)
|
||||
- 修复废弃API引用(withOpacity → withValues)
|
||||
- 修复登录弹窗、服务器信息弹窗等组件的冗余依赖
|
||||
- 分析结果:0错误、0警告、164提示(均为info级别)
|
||||
- 优先级:3
|
||||
|
||||
### 新增
|
||||
- 📋 **项目分析文档**
|
||||
- 创建 `lib/PROJECT_ANALYSIS.md` 项目分析报告
|
||||
- 包含代码质量概览、需加强功能、现有问题分析、新增功能建议
|
||||
- 包含代码规范待改进项、开发进度追踪
|
||||
- 优先级:2
|
||||
- 🏷️ **主页标签点击跳转**
|
||||
- 关键词标签(如"围炉夜话")点击后跳转到对应标签诗词列表页
|
||||
- 朝代标签(如"暂无朝代")点击后跳转到对应朝代诗词列表页
|
||||
- 长按仍保留复制功能
|
||||
- 涉及文件:`lib/views/home/home_part.dart` - _buildKeywordSection 方法
|
||||
- 优先级:3
|
||||
|
||||
---
|
||||
|
||||
## [1.4.8] - 2026-04-18
|
||||
|
||||
### 新增
|
||||
- ✨ **跟随系统深色模式开关**
|
||||
- ThemeController 新增 `_followSystem` 响应式状态(默认开启)
|
||||
- 实现 `WidgetsBindingObserver` 监听系统亮度变化(`didChangePlatformBrightness`)
|
||||
- 跟随系统开启时,应用自动跟随 OS 深色/浅色模式切换
|
||||
- 跟随系统开启时,隐藏"深色模式"手动开关,界面更简洁
|
||||
- 跟随系统关闭时,显示"深色模式"手动开关,由用户手动控制
|
||||
- 状态持久化到 SharedPreferences
|
||||
- 涉及文件:
|
||||
- `lib/services/get/theme_controller.dart` - 新增 followSystem 状态、系统亮度监听、toggleFollowSystem 方法
|
||||
- `lib/views/profile/theme/app-diy.dart` - 新增跟随系统开关 UI
|
||||
- 优先级:4
|
||||
|
||||
---
|
||||
|
||||
## [1.4.7] - 2026-04-09
|
||||
|
||||
### 新增
|
||||
@@ -119,186 +164,6 @@ All notable changes to this project will be documented in this file.
|
||||
|
||||
---
|
||||
|
||||
## [1.4.4] - 2026-04-09
|
||||
|
||||
### 新增
|
||||
- ✨ **创建公告信息页面**
|
||||
- 新建 `lib/views/footprint/load/notice-page.dart` 文件
|
||||
- 从 `https://yy.vogov.cn/api/app/notice_api.php` 获取公告数据
|
||||
- 支持下拉刷新、加载状态、错误处理
|
||||
- 使用 iOS 风格 Cupertino 组件
|
||||
- 公告卡片显示公告编号、内容、作者、创建时间、更新时间
|
||||
- 支持可选显示导航栏(`showAppBar` 参数)
|
||||
- 涉及文件:
|
||||
- `lib/views/footprint/load/notice-page.dart` - 新增公告页面
|
||||
- `lib/views/favorites_page.dart` - 集成公告页面到推送标签
|
||||
- ✨ **在收藏页面添加推送标签功能**
|
||||
- 在收藏页面的"推送"标签中显示公告列表
|
||||
- 公告页面嵌入到 TabBarView 中,不显示重复导航栏
|
||||
- 涉及文件:
|
||||
- `lib/views/favorites_page.dart` - 添加推送标签处理
|
||||
- `lib/views/footprint/footprint_page.dart` - 移除通知按钮(公告已移至收藏页面)
|
||||
|
||||
---
|
||||
|
||||
## [1.4.3] - 2026-04-04
|
||||
|
||||
### 修复
|
||||
- 🐛 **修复 Trae 环境下 WiFi 设备安装卡顿问题**
|
||||
- 问题:在 Trae 中运行到三星平板时,一直显示 "Installing build\app\outputs\flutter-apk\app-debug.apk...",但 Android Studio 能正常安装
|
||||
- 根本原因:WiFi 连接的设备建立 VM Service 连接较慢,导致 Flutter 认为安装卡住
|
||||
- 解决方案:
|
||||
- 在 VS Code launch.json 中为所有配置添加 `--device-timeout=60` 参数
|
||||
- 新增 WiFi 设备专用配置,使用 `--device-timeout=120` 和 `--device-connection=wireless`
|
||||
- 新增 USB 设备专用配置,使用 `--device-timeout=30` 和 `--device-connection=attached`
|
||||
- 创建 WiFi 设备连接辅助脚本(wifi_device_helper.bat 和 wifi_device_helper.ps1)
|
||||
- 提供手动安装 APK 的选项,绕过 VM Service 连接等待
|
||||
- 涉及文件:
|
||||
- `.vscode/launch.json` - 优化设备连接配置
|
||||
- `wifi_device_helper.bat` - Windows 批处理辅助脚本
|
||||
- `wifi_device_helper.ps1` - PowerShell 辅助脚本
|
||||
- 使用说明:
|
||||
- 在 VS Code 中运行时,选择 "flutter_application_2 (WiFi Device)" 配置
|
||||
- 或使用辅助脚本 `wifi_device_helper.bat` 或 `wifi_device_helper.ps1`
|
||||
- 如仍卡住,可选择选项 4 手动安装 APK
|
||||
|
||||
---
|
||||
|
||||
## [1.4.2] - 2026-04-04
|
||||
|
||||
### 新增
|
||||
- ✨ **创建统一的平台判断工具类 PlatformUtils**
|
||||
- 新建 `lib/controllers/settings/is_platform.dart` 文件
|
||||
- 统一管理平台判断逻辑,支持 Web、Android、iOS、HarmonyOS、Windows、macOS、Linux 等平台
|
||||
- 提供平台检测、操作系统信息获取、平台显示名称等功能
|
||||
- 所有平台判断方法都包含异常处理,确保在 Web 平台也能正常工作
|
||||
|
||||
### 重构
|
||||
- ♻️ **统一平台判断代码**
|
||||
- 将分散在多个文件中的平台判断代码统一使用 PlatformUtils
|
||||
- 移除了各文件中重复的 `import 'dart:io'` 和 `import 'package:flutter/foundation.dart'`
|
||||
- 简化了平台判断逻辑,提高了代码可维护性
|
||||
- 涉及文件:
|
||||
- `lib/views/profile/app-info.dart` - 使用 PlatformUtils 替代 io.Platform
|
||||
- `lib/views/profile/expand/manu-script.dart` - 使用 PlatformUtils.platformDisplayName
|
||||
- `lib/views/profile/profile_page.dart` - 使用 PlatformUtils.isWeb
|
||||
- `lib/views/profile/components/pop-menu.dart` - 使用 PlatformUtils
|
||||
- `lib/services/get/profile_controller.dart` - 使用 PlatformUtils
|
||||
- `lib/views/profile/guide/app-data.dart` - 使用 PlatformUtils.pathSeparator
|
||||
- `lib/utils/http/vote_api.dart` - 使用 PlatformUtils
|
||||
|
||||
### 修复
|
||||
- 🐛 **修复三星平板卡 Logo 启动页的问题**
|
||||
- 将屏幕适配从初始化阶段移到第一帧绘制后执行
|
||||
- 延迟 100ms 调用屏幕适配,避免在启动时阻塞
|
||||
- 为所有初始化步骤添加 try-catch 保护,即使某个初始化失败也能继续启动
|
||||
- 添加详细的调试日志,方便定位启动问题
|
||||
- 移除 AppInitializer 中的屏幕适配调用
|
||||
- 修改 MyApp 为 StatefulWidget,使用 WidgetsBindingObserver
|
||||
- 涉及文件:
|
||||
- `lib/main.dart` - 重构启动流程
|
||||
- `lib/utils/app_initializer.dart` - 优化初始化流程
|
||||
|
||||
## [1.4.1] - 2026-04-03
|
||||
|
||||
### 新增
|
||||
- ✨ **项目默认图标裁剪**
|
||||
- 使用 Python PIL 库裁剪图片为正方形
|
||||
- 生成了多种尺寸的应用图标(1024x1024, 512x512, 256x256 等)
|
||||
- 默认图标尺寸:512x512
|
||||
- 涉及文件:
|
||||
- `assets/app_icon_default.png` - 项目默认图标(512x512)
|
||||
- `assets/app_icon_square.png` - 正方形原图(1271x1271)
|
||||
- `assets/app_icon_*.png` - 各种尺寸图标
|
||||
- `crop_image.py` - 图片裁剪脚本
|
||||
- ✨ **Web 图标替换**
|
||||
- 替换了所有 web 平台的图标为新图片
|
||||
- 包括:favicon.png (32x32)、PWA 图标 (192x192, 512x512)
|
||||
- 包含 maskable 图标版本
|
||||
- 涉及文件:
|
||||
- `web/favicon.png` - 网站图标
|
||||
- `web/icons/Icon-192.png` - PWA 图标
|
||||
- `web/icons/Icon-512.png` - PWA 图标
|
||||
- `web/icons/Icon-maskable-192.png` - PWA 可遮罩图标
|
||||
- `web/icons/Icon-maskable-512.png` - PWA 可遮罩图标
|
||||
- `replace_web_icons.py` - Web 图标替换脚本
|
||||
- ✨ **从 pubspec.yaml 动态获取版本号**
|
||||
- 使用 package_info_plus 插件动态获取应用版本号和版本代码
|
||||
- 在 AppConfig 中添加 init() 初始化方法和 appVersion、appVersionCode getter
|
||||
- 在 main.dart 中应用启动时初始化 AppConfig
|
||||
- 在 app-info.dart 中动态显示 appVersion 和 appVersionCode
|
||||
- 涉及文件:
|
||||
- `pubspec.yaml` - 使用官方 package_info_plus: ^9.0.1
|
||||
- `lib/config/app_config.dart` - 添加动态版本号获取
|
||||
- `lib/main.dart` - 初始化 AppConfig
|
||||
- `lib/views/profile/app-info.dart` - 动态显示版本号
|
||||
- ✨ **软件更新日志卡片**
|
||||
- 启用应用信息页面的软件更新日志卡片
|
||||
- 添加了版本 1.4.1 和 1.3.59 的更新内容
|
||||
- 涉及文件:
|
||||
- `lib/views/profile/app-info.dart` - 启用更新日志
|
||||
- ✨ **开源框架列表添加 GetX**
|
||||
- 在应用信息页面的开源框架列表中添加了 GetX
|
||||
- GetX 协议:MIT
|
||||
- 涉及文件:
|
||||
- `lib/views/profile/app-info.dart` - 添加 GetX 到开源框架列表
|
||||
- ✨ **了解我们页面网站列表优化**
|
||||
- 在官方网站卡片中添加了情景诗词在线版
|
||||
- 两个网站都添加了独立的复制按钮
|
||||
- 添加了网站标签显示(官方APP页/情景诗词在线版)
|
||||
- 涉及文件:
|
||||
- `lib/views/profile/settings/learn-us.dart` - 新增网站列表和复制按钮
|
||||
|
||||
### 优化
|
||||
- ⚡ **解决 package_info_plus 依赖冲突**
|
||||
- 解决 wakelock_plus 与 package_info_plus 的版本冲突
|
||||
- 使用官方版本 package_info_plus: ^9.0.1 替代 git 版本
|
||||
- 同时保留鸿蒙适配版代码在 packages/flutter_plus_plugins/packages/package_info_plus 以备需要
|
||||
- 鸿蒙适配版包含完整的 ohos 平台实现
|
||||
- 涉及文件:
|
||||
- `pubspec.yaml` - 移除 dependency_overrides,使用官方版本
|
||||
- `packages/flutter_plus_plugins/packages/package_info_plus` - 鸿蒙适配版本地备份
|
||||
- ⚡ **使用 Get.snackbar 替代 ScaffoldMessenger**
|
||||
- 将应用信息页面中的所有 SnackBar 消息改为 Get.snackbar
|
||||
- 背景色使用 Get.snackbar 默认颜色
|
||||
- 文字颜色使用动态主题色
|
||||
- 图标颜色也使用动态主题色(仅复制提示)
|
||||
- 添加圆角和边距样式
|
||||
- 涉及文件:
|
||||
- `lib/views/profile/app-info.dart` - SnackBar 改为 Get.snackbar
|
||||
- ⚡ **了解我们页面消息提示优化**
|
||||
- 将了解我们页面中的所有 SnackBar 消息改为 Get.snackbar
|
||||
- 包括:QQ群号复制、微信公众号复制、网站链接复制
|
||||
- 背景色使用 Get.snackbar 默认颜色
|
||||
- 文字颜色使用动态主题色
|
||||
- 涉及文件:
|
||||
- `lib/views/profile/settings/learn-us.dart` - 所有消息改为 Get.snackbar
|
||||
|
||||
### 修复
|
||||
- 🐛 **修复版本号不显示的问题**
|
||||
- 将 AppConfig 中的版本号改为 GetX 响应式变量
|
||||
- 在 app-info.dart 中使用 Obx 观察版本号变化
|
||||
- 更新默认版本号为 1.4.1
|
||||
- 涉及文件:
|
||||
- `lib/config/app_config.dart` - 响应式版本号
|
||||
- `lib/views/profile/app-info.dart` - Obx 包裹版本号显示
|
||||
|
||||
### 删除
|
||||
- 🗑️ **移除设计风格卡片**
|
||||
- 从应用信息页面移除了设计风格卡片
|
||||
- 涉及文件:
|
||||
- `lib/views/profile/app-info.dart` - 移除 _buildDesignStyleCard 调用
|
||||
|
||||
## [1.3.59] - 2026-04-03
|
||||
|
||||
### 修复
|
||||
- 🐛 **修复出处字段被时间提示语遮挡的问题**
|
||||
- 给诗词卡片内容添加了顶部内边距(60)
|
||||
- 确保出处等内容不被浮动的时间提示语遮挡
|
||||
- 涉及文件:
|
||||
- `lib/views/home/home_part.dart` - 添加顶部内边距
|
||||
|
||||
|
||||
---
|
||||
|
||||
## 软件特性功能
|
||||
@@ -322,6 +187,14 @@ All notable changes to this project will be documented in this file.
|
||||
- ✅ 深色模式支持
|
||||
- ✅ 液态玻璃导航栏
|
||||
- ✅ 多页面主题色支持
|
||||
- ✅ WiFi设备安装优化 (v1.4.3)
|
||||
- ✅ 统一平台判断工具类 PlatformUtils (v1.4.2)
|
||||
- ✅ 三星平板启动页修复 (v1.4.2)
|
||||
- ✅ 动态版本号获取 (v1.4.1)
|
||||
- ✅ Web图标替换 (v1.4.1)
|
||||
- ✅ 出处字段遮挡修复 (v1.3.59)
|
||||
- ✅ 公告信息页面 (v1.4.4)
|
||||
- ✅ 收藏页面推送标签 (v1.4.4)
|
||||
|
||||
### 开发中
|
||||
- 🚧 更多功能优化
|
||||
|
||||
Reference in New Issue
Block a user