chore: 完成多模块迭代优化与依赖更新
本次提交包含多项更新: 1. 更新file_picker依赖到11.0.0-ohos.1版本 2. 清理SecureStorage、Catcher2配置冗余代码 3. 优化鸿蒙系统下HomeWidget调用方式 4. 重构编辑器导航栏图标与页面路由引用 5. 修复边框样式、简化空值判断逻辑 6. 移除冗余系统UI样式配置 7. 新增共享组件导出与自适应返回按钮 8. 批量替换路由引用为app_routes 9. 标记过时通知服务并补充注释 10. 新增引导页扫一扫功能卡片 11. 完善沉浸式状态栏配置逻辑 12. 为大量页面添加统一自适应返回按钮
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
// ============================================================
|
||||
// 闲言APP — 编辑器系统UI管理
|
||||
// 创建时间: 2026-05-03
|
||||
// 更新时间: 2026-05-03
|
||||
// 作用: 管理编辑器的系统状态栏、导航栏、屏幕方向
|
||||
// 上次更新: enterEditor读取编辑器主题偏好,浅色模式状态栏图标暗色
|
||||
// ============================================================
|
||||
/// ============================================================
|
||||
/// 闲言APP — 编辑器系统UI管理
|
||||
/// 创建时间: 2026-05-03
|
||||
/// 更新时间: 2026-05-22
|
||||
/// 作用: 管理编辑器的系统状态栏、导航栏、屏幕方向
|
||||
/// 上次更新: 统一使用StatusBarService,移除直接SystemChrome调用
|
||||
/// ============================================================
|
||||
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
import 'package:xianyan/core/services/ui/status_bar_service.dart';
|
||||
import 'package:xianyan/core/utils/device_detection.dart';
|
||||
import 'package:xianyan/editor/services/core/editor_theme_notifier.dart';
|
||||
|
||||
@@ -16,7 +17,7 @@ class EditorSystemUI {
|
||||
|
||||
static void enterEditor() {
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||
_applyOverlayStyle(isDark: EditorThemeNotifier.instance.isDark);
|
||||
StatusBarService.applyStyle(isDark: EditorThemeNotifier.instance.isDark);
|
||||
if (AppDevice.isMobile) {
|
||||
SystemChrome.setPreferredOrientations([
|
||||
DeviceOrientation.landscapeLeft,
|
||||
@@ -27,42 +28,13 @@ class EditorSystemUI {
|
||||
}
|
||||
|
||||
static void exitEditor() {
|
||||
SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||
_applyDefaultOverlayStyle();
|
||||
StatusBarService.enterEdgeToEdge();
|
||||
if (AppDevice.isMobile) {
|
||||
SystemChrome.setPreferredOrientations(DeviceOrientation.values);
|
||||
}
|
||||
}
|
||||
|
||||
static void updateForTheme(bool isDark) {
|
||||
_applyOverlayStyle(isDark: isDark);
|
||||
}
|
||||
|
||||
static void _applyOverlayStyle({required bool isDark}) {
|
||||
SystemChrome.setSystemUIOverlayStyle(
|
||||
SystemUiOverlayStyle(
|
||||
statusBarColor: const Color(0x00000000),
|
||||
statusBarIconBrightness: isDark ? Brightness.light : Brightness.dark,
|
||||
statusBarBrightness: isDark ? Brightness.dark : Brightness.light,
|
||||
systemNavigationBarColor: const Color(0x00000000),
|
||||
systemNavigationBarIconBrightness: isDark
|
||||
? Brightness.light
|
||||
: Brightness.dark,
|
||||
systemNavigationBarDividerColor: const Color(0x00000000),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
static void _applyDefaultOverlayStyle() {
|
||||
SystemChrome.setSystemUIOverlayStyle(
|
||||
const SystemUiOverlayStyle(
|
||||
statusBarColor: Color(0x00000000),
|
||||
statusBarIconBrightness: Brightness.light,
|
||||
statusBarBrightness: Brightness.dark,
|
||||
systemNavigationBarColor: Color(0x00000000),
|
||||
systemNavigationBarIconBrightness: Brightness.light,
|
||||
systemNavigationBarDividerColor: Color(0x00000000),
|
||||
),
|
||||
);
|
||||
StatusBarService.applyStyle(isDark: isDark);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,8 +171,8 @@ class _EditorTopNavState extends State<EditorTopNav> {
|
||||
if (widget.onToolDrawer != null) _PillDivider(palette: p),
|
||||
if (widget.onCanvasStyle != null)
|
||||
_NavBtn(
|
||||
icon: EditorIcon.cupertino(
|
||||
'rectangle',
|
||||
icon: EditorIcon.svg(
|
||||
'square_dashed',
|
||||
size: 16,
|
||||
color: p.textPrimary,
|
||||
),
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user