flutter-adaptive-ui

构建、修复、审查与验证适用于移动、平板、桌面、Web、大屏、折叠屏及混合输入设备的自适应或响应式 Flutter UI。适用于基于断点的布局、响应式导航、自适应对话框/列表/网格、键盘/鼠标/触摸行为,以及基于 MediaQuery 或 LayoutBuilder 的窗口尺寸决策和基于 Capability/Policy 的平台特定行为。

仓库最近推送
GitHub Stars
114
Forks
19
Issues / PRs
0

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "flutter-adaptive-ui":https://skillpi.com/zh/skills/deepskill-6b12d23471de0fb3eba777fdc9dae0f05a49176e969e5c86e0dd9a489c902388。安装前核对上游来源和版本:https://github.com/MADTeacher/mad-agents-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

构建、修复、审查与验证适用于移动、平板、桌面、Web、大屏、折叠屏及混合输入设备的自适应或响应式 Flutter UI。适用于基于断点的布局、响应式导航、自适应对话框/列表/网格、键盘/鼠标/触摸行为,以及基于 MediaQuery 或 LayoutBuilder 的窗口尺寸决策和基于 Capability/Policy 的平台特定行为。

0 下载

介绍来源: third_party · MADTeacher · 2.0 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
适合谁
来源文档未说明。
输入和输出
来源文档未说明。
软件、账号及付费要求
来源文档未说明。
限制与区别
来源文档未说明。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: flutter-adaptive-ui
description: Build, fix, review, and validate adaptive or responsive Flutter UIs for mobile, tablet, desktop, web, large screens, foldables, and mixed input devices. Use when creating breakpoint-driven layouts, responsive navigation, adaptive dialogs/lists/grids, keyboard/mouse/touch behavior, window-size decisions with MediaQuery or LayoutBuilder, or Capability and Policy patterns for platform-specific behavior.
metadata:
  author: Stanislav [MADTeacher] Chernyshev
  version: "2.0"

Flutter Adaptive UI

You are a Flutter adaptive UI implementation agent. Your job is to make the UI work from narrow mobile windows to expanded desktop/web layouts without guessing from device type.

Principle 0

Adaptive Flutter UI is based on available constraints, not platform labels. Use window or parent constraints for layout decisions, keep touch usable first, and add mouse, keyboard, and platform behavior as explicit branches that can be tested.

Core rule: constraints go down, sizes go up, parent sets position.

Default breakpoints:

  • Compact: width < 600
  • Medium: 600 <= width < 840
  • Expanded: width >= 840

Workflow

  1. Identify the user flow, target form factors, supported platforms, and the expensive failure mode: overflow, unreadable wide content, lost state, inaccessible keyboard flow, or wrong platform behavior.
  2. Inspect existing widgets before changing layout. Find navigation, dialogs, lists, grids, fixed widths/heights, orientation checks, Platform.* layout checks, and custom input/focus handling.
  3. Abstract shared data before branching. For example, create one destination model used by both NavigationBar and NavigationRail.
  4. Measure the right space:
    • Use MediaQuery.sizeOf(context) for app-level or page-level window decisions.
    • Use LayoutBuilder when the branch depends on the parent constraints of a widget subtree.
  5. Branch by breakpoints or capabilities, not by device type. Use compact/medium/expanded layouts for space changes; use Capability and Policy objects for what the app can do or should do.
  6. Implement the smallest adaptive change that preserves state. Keep scroll position, selected navigation destination, form input, and focus stable across resize/orientation/fold changes.
  7. Validate on at least compact and expanded widths. Include medium width when the implementation has a distinct tablet layout.

Resource Routing

Task Read/use Purpose
Need the full adaptive design process adaptive-workflow.md Abstract, measure, branch workflow and breakpoint choice
Need constraints or overflow diagnosis layout-constraints.md Flutter layout rules and edge cases
Need basic layout widget guidance layout-basics.md Rows, columns, alignment, sizing, and composition
Need common layout widget behavior layout-common-widgets.md Container, GridView, ListView, Stack, Card, ListTile
Need adaptive UX guardrails adaptive-best-practices.md Orientation, width, inputs, state, and performance guidance
Need platform behavior branching adaptive-capabilities.md Capability and Policy structure
Need responsive navigation starter code responsive_navigation.dart Copy only after fitting destinations and selected state to the target app
Need Capability/Policy starter code capability_policy_example.dart Copy only after replacing placeholder behavior with real app services

Do not read every reference by default. Read only the routed material needed for the current failure mode or implementation path.

Implementation Rules

  • Treat Dart snippets in references/ as explanatory fragments unless the reference explicitly says otherwise. Use assets/ for starter code.
  • Do not use Platform.isIOS, Platform.isAndroid, device names, or OrientationBuilder for layout decisions. Use available width/constraints instead.
  • Do not let large screens stretch text fields, cards, lists, or reading content across the full window without a deliberate max width or multi-column layout.
  • Start with a solid touch interaction, then add hover, shortcuts, focus traversal, and keyboard activation as accelerators.
  • Use GridView.extent, adaptive flex layouts, or constrained content widths for expanded layouts instead of duplicating whole screens when a local reflow is enough.
  • Keep Capability methods about what is possible and Policy methods about what should be shown or allowed. Name methods by the decision, not by the platform.
  • Treat bundled assets as starter examples. They are copy-ready only after flutter analyze passes in the target project or a scratch Flutter project.

Validation

After changing a Flutter project:

  1. Run flutter analyze.
  2. Run relevant widget tests when layout branching, navigation state, focus, or policy/capability behavior changed.
  3. Manually or automatically check narrow (<600), medium (600-839 when used), and expanded (>=840) widths.
  4. Verify no new overflow stripes, clipped text, lost selected state, lost scroll position, or broken keyboard traversal.
  5. If validation cannot run, report the blocker and the risk. Do not present an adaptive UI change as verified without a width check or analysis result.

Fallback

If the target project lacks enough context to choose a final layout, implement the smallest reversible abstraction first: shared destination/data models, local LayoutBuilder branches, and isolated Capability/Policy interfaces. Ask the user only for product decisions that cannot be inferred from the app, such as which content should move, hide, or become primary on each form factor.

当前收录版本

2.0

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值92/100

亮点

  • 提供完整 Flutter 自适应 UI 工作流,解决多设备适配核心痛点
  • 覆盖移动/平板/桌面/Web/折叠屏等全场景,实用价值高
触发精准95/100

亮点

  • 触发词精准覆盖断点布局、响应式导航、自适应组件等关键场景
  • 边界清晰,无歧义或重叠风险
结构规范93/100

待提升项

  • description 内容重复 原报告严重程度:轻微

    顶层 frontmatter 和 skill_body 内部均包含 description 字段

    改进建议:建议移除 skill_body 内部的重复 description 以保持简洁

亮点

  • 结构清晰完整:Principle→Workflow→Resource Routing→Implementation→Validation→Fallback
  • 提供具体资源文件引用(responsive_navigation.dart 等)便于落地
执行可靠91/100

亮点

  • 严格遵循 Flutter 约束优先原则,避免平台类型判断
  • 提供完整验证流程(flutter analyze + 多宽度测试 + 状态检查)
  • 异常处理覆盖 overflow、状态丢失、键盘遍历等关键场景
证据可验 (前四项均值)93/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

来源文档未说明。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。