flutter-adaptive-ui
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "flutter-adaptive-ui" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-6b12d23471de0fb3eba777fdc9dae0f05a49176e969e5c86e0dd9a489c902388. Verify the upstream source and version against https://github.com/MADTeacher/mad-agents-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Build, fix, review, and validate adaptive or responsive Flutter UIs for mobile, tablet, desktop, web, large screens, foldables, and mixed-input devices. Applicable to breakpoint-based layouts, responsive navigation, adaptive dialogs/lists/grids, keyboard/mouse/touch behaviors, window-size decisions using MediaQuery or LayoutBuilder, and platform-specific behaviors using Capability and Policy patterns.
Introduction source: third_party · MADTeacher · 2.0 Reference
SkillPi interpretation
- Tasks
- 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.
- Audience
- Not specified in the source documentation.
- Inputs and outputs
- Not specified in the source documentation.
- Software, accounts and paid services
- Not specified in the source documentation.
- Limits and differences
- Not specified in the source documentation.
- Testing
- Not tested
Browse files
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
- 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.
- Inspect existing widgets before changing layout. Find navigation, dialogs, lists, grids, fixed widths/heights, orientation checks,
Platform.*layout checks, and custom input/focus handling. - Abstract shared data before branching. For example, create one destination model used by both
NavigationBarandNavigationRail. - Measure the right space:
- Use
MediaQuery.sizeOf(context)for app-level or page-level window decisions. - Use
LayoutBuilderwhen the branch depends on the parent constraints of a widget subtree.
- Use
- 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.
- Implement the smallest adaptive change that preserves state. Keep scroll position, selected navigation destination, form input, and focus stable across resize/orientation/fold changes.
- 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. Useassets/for starter code. - Do not use
Platform.isIOS,Platform.isAndroid, device names, orOrientationBuilderfor 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 analyzepasses in the target project or a scratch Flutter project.
Validation
After changing a Flutter project:
- Run
flutter analyze. - Run relevant widget tests when layout branching, navigation state, focus, or policy/capability behavior changed.
- Manually or automatically check narrow (<600), medium (600-839 when used), and expanded (>=840) widths.
- Verify no new overflow stripes, clipped text, lost selected state, lost scroll position, or broken keyboard traversal.
- 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.
Current listing version
2.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供完整 Flutter 自适应 UI 工作流,解决多设备适配核心痛点
- 覆盖移动/平板/桌面/Web/折叠屏等全场景,实用价值高
Highlights
- 触发词精准覆盖断点布局、响应式导航、自适应组件等关键场景
- 边界清晰,无歧义或重叠风险
Areas to improve
-
description 内容重复 Reported severity: Minor
顶层 frontmatter 和 skill_body 内部均包含 description 字段
Recommendation: 建议移除 skill_body 内部的重复 description 以保持简洁
Highlights
- 结构清晰完整:Principle→Workflow→Resource Routing→Implementation→Validation→Fallback
- 提供具体资源文件引用(responsive_navigation.dart 等)便于落地
Highlights
- 严格遵循 Flutter 约束优先原则,避免平台类型判断
- 提供完整验证流程(flutter analyze + 多宽度测试 + 状态检查)
- 异常处理覆盖 overflow、状态丢失、键盘遍历等关键场景
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Not specified in the source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.