- 新增模型目录占位文件与翻译类型拆分 - 调整路由配置与桌面端窗口初始化 - 移除多处冗余图表配置项 - 重构右侧面板注册表与三栏布局组件 - 添加智能AppBar、拖拽书签等新功能组件 - 优化安卓编译配置与多平台插件注册 - 新增翻译覆盖率测试与共享组件 - 格式化代码与修复静态分析警告
30 lines
878 B
Dart
30 lines
878 B
Dart
/// ============================================================
|
|
/// 闲言APP — 面板缓存组件
|
|
/// 创建时间: 2026-05-29
|
|
/// 更新时间: 2026-05-29
|
|
/// 作用: 使用AutomaticKeepAliveClientMixin保持面板状态不被销毁
|
|
/// 上次更新: 初始创建
|
|
/// ============================================================
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
class KeepAlivePanelWrapper extends StatefulWidget {
|
|
const KeepAlivePanelWrapper({required this.child, super.key});
|
|
final Widget child;
|
|
|
|
@override
|
|
State<KeepAlivePanelWrapper> createState() => _KeepAlivePanelWrapperState();
|
|
}
|
|
|
|
class _KeepAlivePanelWrapperState extends State<KeepAlivePanelWrapper>
|
|
with AutomaticKeepAliveClientMixin {
|
|
@override
|
|
bool get wantKeepAlive => true;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
super.build(context);
|
|
return widget.child;
|
|
}
|
|
}
|