Flutter 代码审查
- 作者仓库星标 0
- 作者仓库 skills-registry
When writing or reviewing any Flutter/Dart code in this repository:
Never hardcode style values. Colors, font sizes, spacing, border radii, and icon sizes must come from
app_theme.dart(AppColors,AppText,AppLayout,AppIcons). If a value is missing, add it there first.Keep files small and focused. One widget family per file. If a file exceeds ~200 lines, split it. Extract private widget classes (
_SomeWidget) instead of nesting logic inline insidebuild.Keep functions simple. Build methods and helpers should be short. Deep nesting is a signal to extract a named widget.
Cover with tests. Every new widget needs at least one BDD widget test in
src/ui/test/. Use fake API implementations (not mocks). Cover the golden path and key edge cases (empty, error, loading). Useconst Key('...')on widgets so tests can target them reliably.
<!-- tomevault:4.0:skill_md:2026-05-22 -->Source: bsterligov/river — distributed by TomeVault.
- 流狐分类
- AI 智能
- 作者声明 Agent
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- 流狐 Token 估算
- 低消耗
- 流狐接入估算
- 即装即用
- 是否需要外部 API Key
- 未发现要求
- 检测到的系统要求
- 未声明
- 底层运行要求
- 未声明
- 检测到的文件与系统行为
-
- 只读
- 检测到的网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
作者没有在当前 SKILL.md 中定义固定输出样例。 When writing or reviewing any Flutter/Dart code in this repository: 1. **Never hardcode style values.** Colors, font sizes, spacing, border radii, and icon sizes must come from `app_theme.dart` (`AppColors`, `AppText`, `AppLayout`, `AppIcons`). If a value is missing, add it there first. …
When writing or reviewing any Flutter/Dart code in this repository:
1. **Never hardcode style values.** Colors, font sizes, spacing, border radii, and icon sizes must come from `app_theme.dart` (`AppColors`, `AppText`, `AppLayout`, `AppIcons`). If a value is missing, add it there first.
2. **Keep files small and focused.** One widget family per file. If a file exceeds ~200 lines, split it. Extract private widget classes (`_SomeWidget`) instead of nesting logic inline inside `build`.
3. **Keep functions simple.** Build methods and helpers should be short. Deep nesting is a signal to extract a named widget.
4. **Cover with tests.** Every new widget needs at least one BDD widget test in `src/ui/test/`. Use fake API implementations (not mocks). Cover the golden path and key edge cases (empty, error, loading). Use `const Key('...')` on widgets so tests can target them reliably.
---
> Source: [bsterligov/river](https://github.com/bsterligov/river) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-22 --> 作者原文负责流程事实;流狐只索引当前章节、要点、文件与命令。
章节 -> 原文未使用二、三级标题
要点 -> Never hardcode style values. · Keep files small and focused. · Keep functions simple. · Cover with tests.
文件/命令 -> apptheme.dart · AppColors · AppText · AppLayout · AppIcons · SomeWidget · build · src/ui/test/
内容 SHA-256 -> 8981a131a0cd
原文结构
适用与边界
原文中的明确线索
apptheme.dart、AppColors、AppText、AppLayout、AppIcons、SomeWidget、build、src/ui/test/