用途分类 / 其他用途
Flutter Fix Layout Issues Skill 安全审计
作者说它能做什么(原文)
Fixes Flutter layout errors (overflows, unbounded constraints) using Dart and Flutter MCP tools. Use when addressing "RenderFlex overflowed", "Vertical viewport was given unbounded height", or similar layout issues.
第三方安全检查结论
这次检查未发现明显风险
- 已检查文件
- 1
- 发现的风险
- 0
会不会运行危险命令?检查是否下载程序后直接运行、让他人远程控制电脑,或藏起要运行的命令。未发现风险
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。未发现风险
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。未发现风险
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。未发现风险
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险
Skill 逻辑拆解
该 Skill 的用途是诊断 Flutter 约束相关的布局错误,并根据具体错误类型选择 Expanded、Flexible、SizedBox 或调整父子组件关系。
查看原文
### Task Progress- [ ] Run the application in debug mode to capture the exact layout exception in the console.- [ ] Identify the primary error message (ignore cascading "RenderBox was not laid out" errors).- [ ] Apply the conditional fix based on the specific error type: - **If "Vertical viewport was given unbounded height"**: Wrap the scrollable child (`ListView`, `GridView`) in an `Expanded` widget to consume remaining space, or wrap it in a `SizedBox` to provide an absolute height constraint. - **If "An InputDecorator...cannot have an unbounded width"**: Wrap the `TextField` or `TextFormField` in an `Expanded` or `Flexible` widget. - **If "RenderFlex overflowed"**: Constrain the overflowing child by wrapping it in an `Expanded` widget (to force it to fit) or a `Flexible` widget (to allow it to be smaller than the allocated space). - **If "Incorrect use of ParentData widget"**: Move the `ParentDataWidget` to be a direct child of its required parent. Ensure `Expanded`/`Flexible` are direct children of `Row`/`Column`/`Flex`. Ensure `Positioned` is a direct child of `Stack`.- [ ] Execute Flutter hot reload.工作流要求运行应用、执行热重载并目视复查错误界面或溢出标记;所提供的材料没有脚本、安装步骤、网络请求、凭据访问或权限变更指令。
查看原文
- **If "Incorrect use of ParentData widget"**: Move the `ParentDataWidget` to be a direct child of its required parent. Ensure `Expanded`/`Flexible` are direct children of `Row`/`Column`/`Flex`. Ensure `Positioned` is a direct child of `Stack`.- [ ] Execute Flutter hot reload.- [ ] Run validator -> review errors -> fix: Inspect the UI to verify the red/grey error screen or yellow/black overflow stripes are resolved. If new layout errors appear, repeat the workflow.示例仅展示局部 Dart 布局代码的错误状态与修复状态,例如用 Expanded 约束 Column 内 ListView 的高度。
查看原文
**Output (Resolved State):**```dart// Wrap ListView in Expanded to constrain its height to the remaining Column spaceColumn( children: <Widget>[ const Text('Header'), Expanded( child: ListView( children: const <Widget>[ ListTile(title: Text('Item 1')), ListTile(title: Text('Item 2')), ], ), ), ],)```从这里开始 · 工作说明SKILL.md
flutter-fix-layout-issues文件与检查记录1 个文件
检查范围与遗漏
逐文件查看涉及的内容
下方列出本次涉及的原文范围;纳入检查不代表已查清所有问题。
SKILL.md已纳入全文
这份报告只针对上方版本。我们看了拿到的代码和说明文件,没有实际运行 Skill,也没有检查它另外安装的软件包。因此,这不是“保证安全”的承诺;换了版本或使用环境,结果也可能不同。
SKILL.md工作说明
- 读取了多少行
- 131
- 文件校验值(用于核对版本)
- 856ef719f073431740ace0519d7d03560d825fca15c3e256d4cc0058f717ee06