flutter-adaptive-ui
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.
Security Assessment
About flutter-adaptive-ui
The flutter-adaptive-ui skill helps developers build, fix, review, and validate adaptive and responsive Flutter user interfaces that work seamlessly across mobile phones, tablets, desktops, web browsers, large screens, foldables, and devices with mixed input methods. Unlike traditional approaches that rely on platform detection, this skill uses a constraint-based methodology where layout decisions are driven by available window or parent constraints rather than device labels. It ensures touch interfaces remain usable while explicitly adding mouse, keyboard, and platform-specific behaviors that can be independently tested.
This skill implements adaptive layouts using standardized breakpoints (compact <600px, medium 600-840px, expanded ≥840px) and provides specialized guidance on responsive navigation patterns, adaptive dialogs, lists, and grids. It leverages Flutter's core layout principles—constraints flow down, sizes flow up, parent sets position—and uses MediaQuery and LayoutBuilder for intelligent space measurement. The skill includes comprehensive resource routing that directs developers to specific references for layout constraints, common widgets, adaptive workflows, and platform behavior branching through Capability and Policy patterns. It comes with starter code for responsive navigation and capability-based platform adaptations.
This skill is ideal for Flutter developers building cross-platform applications that need to maintain consistent user experiences across different form factors and input methods. It's particularly valuable for teams working on applications that must support phone-to-desktop continuity, adaptive navigation patterns, orientation changes, foldable devices, or complex multi-platform deployments. By focusing on constraint-driven design rather than device detection, it helps create maintainable, testable UI code that preserves application state—including scroll position, navigation state, form input, and focus—across resize, orientation, and fold changes.
FAQ
When should I use this skill instead of checking Platform.isAndroid or Platform.isIOS?
Use this skill when making layout decisions based on available screen space or window constraints. Platform checks should only be used for platform-specific APIs or services, not for UI layout branching. This skill uses breakpoints and constraints to create adaptive layouts that work across any platform at any screen size, making your code more maintainable and testable.
What's the difference between using MediaQuery.sizeOf and LayoutBuilder?
Use MediaQuery.sizeOf(context) for app-level or page-level window decisions when you need to know the entire screen dimensions. Use LayoutBuilder when your layout branch depends on the parent widget's constraints within a subtree. The skill provides guidance on measuring the right space for each adaptive scenario.
Does this skill support foldable devices and large screens?
Yes, the skill explicitly supports foldables and large screens by using constraint-based layouts rather than device detection. It helps implement adaptive patterns that respond to window size changes, including fold/unfold transitions, while preserving application state across these transitions.
What are Capability and Policy patterns mentioned in the skill?
Capability and Policy are architectural patterns for handling platform-specific behavior in adaptive Flutter apps. Capabilities represent what the app can do on a given platform, while Policies define what the app should do. These patterns provide a structured way to branch platform behavior without scattering Platform checks throughout your UI code.
How does this skill help preserve state during adaptive changes?
The skill emphasizes implementing the smallest adaptive change that preserves application state across resize, orientation, and fold changes. It provides guidance on maintaining scroll position, selected navigation destinations, form input, and focus stability when layouts adapt to different constraints or form factors.
All Files
9 filesInstall flutter-adaptive-ui
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
madteacher/mad-agents-skills