跳转到正文
报告库
用途分类 / 其他用途

Flutter Build Responsive Layout Skill 安全审计

作者说它能做什么(原文)

Use `LayoutBuilder`, `MediaQuery`, or `Expanded/Flexible` to create a layout that adapts to different screen sizes. Use when you need the UI to look good on both mobile and tablet/desktop form factors.

第三方安全检查结论

这次检查未发现明显风险

已检查文件
1
发现的风险
0
会不会运行危险命令?检查是否下载程序后直接运行、让他人远程控制电脑,或藏起要运行的命令。未发现风险
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。未发现风险
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。未发现风险
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。未发现风险
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

7 个说明模块

此 Skill 的声明用途是指导 Flutter 界面根据可用窗口空间适配移动端和大屏;核心决策依据是 LayoutBuilder 提供的父级宽度,而非硬件类型或设备朝向。

查看原文
SKILL.md:3来自说明文档打开原文件
name: flutter-build-responsive-layoutdescription: Use `LayoutBuilder`, `MediaQuery`, or `Expanded/Flexible` to create a layout that adapts to different screen sizes. Use when you need the UI to look good on both mobile and tablet/desktop form factors.metadata:
SKILL.md:22来自说明文档打开原文件
*   **Use `MediaQuery.sizeOf(context)`** to get the size of the entire app window.*   **Use `LayoutBuilder`** to make layout decisions based on the parent widget's allocated space. Evaluate `constraints.maxWidth` to determine the appropriate widget tree to return.*   **Do not use `MediaQuery.orientationOf` or `OrientationBuilder`** near the top of the widget tree to switch layouts. Device orientation does not accurately reflect the available app window space.*   **Do not check for hardware types** (e.g., "phone" vs. "tablet"). Flutter apps run in resizable windows, multi-window modes, and picture-in-picture. Base all layout decisions strictly on available window space.

其工作流会让代理识别目标组件、添加 LayoutBuilder、设定断点,并分别构建大屏和小屏布局;示例断点为 600。

查看原文
SKILL.md:47来自说明文档打开原文件
**Task Progress:**- [ ] Identify the target widget that requires adaptive behavior.- [ ] Wrap the widget tree in a `LayoutBuilder`.- [ ] Extract the `constraints.maxWidth` from the builder callback.- [ ] Define an adaptive breakpoint (e.g., `largeScreenMinWidth = 600`).- [ ] **If `maxWidth > largeScreenMinWidth`:** Return a large-screen layout (e.g., a `Row` placing a navigation sidebar and content area side-by-side).- [ ] **If `maxWidth <= largeScreenMinWidth`:** Return a small-screen layout (e.g., a `Column` or standard navigation-style approach).- [ ] Run validator -> resize the application window -> review layout transitions -> fix overflow errors.
SKILL.md:75来自说明文档打开原文件
const double largeScreenMinWidth = 600.0;class AdaptiveLayout extends StatelessWidget {  const AdaptiveLayout({super.key});  @override  Widget build(BuildContext context) {    return LayoutBuilder(      builder: (context, constraints) {        if (constraints.maxWidth > largeScreenMinWidth) {          return _buildLargeScreenLayout();        } else {          return _buildSmallScreenLayout();        }

大屏优化包括把列表改为自适应网格,或用 ConstrainedBox 限制表单和文本宽度,再通过 Center 居中。

查看原文
SKILL.md:60来自说明文档打开原文件
**Task Progress:**- [ ] Identify full-width components (e.g., `ListView`, text blocks, forms).- [ ] **If optimizing a list:** Convert `ListView.builder` to `GridView.builder` using `SliverGridDelegateWithMaxCrossAxisExtent` to automatically adjust column counts based on window size.- [ ] **If optimizing a form or text block:** Wrap the component in a `ConstrainedBox`.- [ ] Apply `BoxConstraints(maxWidth: [optimal_width])` to the `ConstrainedBox`.- [ ] Wrap the `ConstrainedBox` in a `Center` widget to keep the constrained content centered on large screens.- [ ] Run validator -> test on desktop/tablet target -> review horizontal stretching -> adjust `maxWidth` or grid extents.

可见内容只包含说明和 Flutter/Dart 示例;没有安装步骤、外部链接、网络请求、凭据访问、权限提升或文件删除指令。工作流提到运行“validator”,但未指定任何命令或实现。

查看原文
SKILL.md:53来自说明文档打开原文件
- [ ] **If `maxWidth <= largeScreenMinWidth`:** Return a small-screen layout (e.g., a `Column` or standard navigation-style approach).- [ ] Run validator -> resize the application window -> review layout transitions -> fix overflow errors.
SKILL.md:72来自说明文档打开原文件
```dartimport 'package:flutter/material.dart';const double largeScreenMinWidth = 600.0;
从这里开始 · 工作说明SKILL.md
flutter-build-responsive-layout
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。
文件与检查记录1 个文件

检查范围与遗漏

逐文件查看涉及的内容

下方列出本次涉及的原文范围;纳入检查不代表已查清所有问题。

  • SKILL.md已纳入全文

这份报告只针对上方版本。我们看了拿到的代码和说明文件,没有实际运行 Skill,也没有检查它另外安装的软件包。因此,这不是“保证安全”的承诺;换了版本或使用环境,结果也可能不同。

  • SKILL.md工作说明
读取了多少行
140
文件校验值(用于核对版本)
c89a933ba17b5a05aaeedc684d85e5af10c197282674eafed12016da4d3c4f19