MainShell 从 StatelessWidget 转为 StatefulWidget + WidgetsBindingObserver, 参考 mobile-app HomeShellPage 模式,实现: - initState 首帧后自动检查更新 - didChangeAppLifecycleState(resumed) 从后台恢复时自动检查 - 90-300秒随机冷却间隔防止频繁请求(static 变量跨 rebuild 保持) - 延迟3秒启动检查,避免干扰用户操作 - 有更新时弹出 SelfHostedUpdater 对话框(支持强制更新) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| android | ||
| assets | ||
| ios | ||
| lib | ||
| scripts | ||
| test | ||
| .gitignore | ||
| .metadata | ||
| DEVELOPMENT_GUIDE.md | ||
| README.md | ||
| analysis_options.yaml | ||
| pubspec.yaml | ||
README.md
mining_app
A new Flutter project.
Getting Started
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.