← 返回
开发者工具
中文
Flutter
Build performant cross-platform apps with Flutter widgets, state management, and platform integration.
使用 Flutter 组件、状态管理和平台集成构建高性能跨平台应用。
ivangdavila
开发者工具
clawhub
v1.0.1 1 版本 99778 Key: 无需
#latest
概述
Quick Reference
| Topic | File |
|---|
| ------- | ------ |
| setState, state loss, keys | state.md |
| build method, context, GlobalKey | widgets.md |
| FutureBuilder, dispose, mounted | async.md |
| Context after pop, deep linking | navigation.md |
| const, rebuilds, performance | performance.md |
| Platform channels, null safety | platform.md |
Critical Rules
setState after dispose — check mounted before calling, crashes otherwise- Key missing on list items — reordering breaks state, always use keys
- FutureBuilder rebuilds on parent rebuild — triggers future again, cache the Future
- BuildContext after async gap — context may be invalid, check
mounted first const constructor — prevents rebuilds, use for static widgetsStatefulWidget recreated — key change or parent rebuild creates new state- GlobalKey expensive — don't use just to access state, pass callbacks instead
dispose incomplete — cancel timers, subscriptions, controllers- Navigator.pop with result — returns Future, don't ignore errors
- ScrollController not disposed — memory leak
- Image caching — use
cached_network_image, default doesn't persist - PlatformException not caught — platform channel calls can throw
版本历史
共 1 个版本
-
v1.0.1
当前
2026-03-28 18:42 安全 安全
安全检测
腾讯云安全 (Sanbu)
安全,无风险
查看报告
🔗 相关推荐
developer-tools
steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668
📥 324,156
developer-tools
steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921
📥 185,798
ai-intelligence
ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,358
📥 318,360