Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
madteacher avatar

Flutter Adaptive Ui

  • 1.8k installs
  • 105 repo stars
  • Updated May 1, 2026
  • madteacher/mad-agents-skills

flutter-adaptive-ui is an agent skill that builds adaptive Flutter UIs using constraints, breakpoints, and Capability Policy patterns.

About

The flutter-adaptive-ui skill implements adaptive Flutter layouts from narrow mobile to desktop and web without guessing from device type labels. Principle zero uses available constraints not platform names, with default breakpoints compact under 600, medium 600 to 839, and expanded 840 plus. Workflow identifies user flow and failure modes, inspects navigation dialogs lists and fixed sizes, abstracts shared destination models before branching, measures with MediaQuery.sizeOf or LayoutBuilder, and validates with flutter analyze plus compact and expanded width checks. Resource routing loads adaptive-workflow, layout-constraints, capability-policy references only for the current failure mode. Rules forbid Platform.isIOS layout checks, full-width stretched reading content, and duplicating whole screens when local reflow suffices. Bundled responsive_navigation and capability_policy_example assets are copy-ready only after flutter analyze passes. Use when creating breakpoint layouts, adaptive dialogs, keyboard and mouse behavior, or Capability Policy platform-specific behavior in Flutter.

  • Constraint-driven layout: compact under 600, medium 600-839, expanded 840+.
  • MediaQuery.sizeOf for page-level and LayoutBuilder for subtree breakpoint decisions.
  • Capability and Policy objects separate what is possible vs what should be shown.
  • Forbidden: Platform.isIOS or OrientationBuilder for layout branching.
  • Validation requires flutter analyze and width checks at compact and expanded sizes.

Flutter Adaptive Ui by the numbers

  • 1,824 all-time installs (skills.sh)
  • +12 installs in the week ending Jul 29, 2026 (Skillselion tracking)
  • Ranked #125 of 1,039 Mobile Development skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Jul 29, 2026 (Skillselion catalog sync)
At a glance

flutter-adaptive-ui capabilities & compatibility

Capabilities
breakpoint driven layout branching · shared destination model abstraction · capability and policy separation · layoutbuilder and mediaquery measurement · flutter analyze width validation
Use cases
frontend · ui design · testing
From the docs

What flutter-adaptive-ui says it does

Build, fix, review, and validate adaptive or responsive Flutter UIs
SKILL.md
Adaptive Flutter UI is based on available constraints, not platform labels.
SKILL.md
npx skills add https://github.com/madteacher/mad-agents-skills --skill flutter-adaptive-ui

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.8k
repo stars105
Security audit3 / 3 scanners passed
Last updatedMay 1, 2026
Repositorymadteacher/mad-agents-skills

How do I make Flutter layouts adapt from phone to desktop without Platform.isAndroid checks?

Build adaptive Flutter UIs from compact to expanded widths using constraints, breakpoints, Capability and Policy patterns, and responsive navigation.

Who is it for?

Developers building Flutter apps for mobile, tablet, desktop, and web with responsive navigation and dialogs.

Skip if: Skip for single fixed-width mobile-only screens without adaptive requirements.

When should I use this skill?

Use when creating breakpoint layouts, responsive navigation, adaptive dialogs, or keyboard mouse touch behavior in Flutter.

What you get

Breakpoint-driven adaptive UI with shared models, Capability Policy branches, and validated width behavior.

  • Capability and Policy classes
  • Platform-adaptive Flutter widgets

Files

SKILL.mdMarkdownGitHub ↗

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

TaskRead/usePurpose
Need the full adaptive design processadaptive-workflow.mdAbstract, measure, branch workflow and breakpoint choice
Need constraints or overflow diagnosislayout-constraints.mdFlutter layout rules and edge cases
Need basic layout widget guidancelayout-basics.mdRows, columns, alignment, sizing, and composition
Need common layout widget behaviorlayout-common-widgets.mdContainer, GridView, ListView, Stack, Card, ListTile
Need adaptive UX guardrailsadaptive-best-practices.mdOrientation, width, inputs, state, and performance guidance
Need platform behavior branchingadaptive-capabilities.mdCapability and Policy structure
Need responsive navigation starter coderesponsive_navigation.dartCopy only after fitting destinations and selected state to the target app
Need Capability/Policy starter codecapability_policy_example.dartCopy 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.

Related skills

FAQ

Who is flutter-adaptive-ui for?

Developers and software engineers building Flutter apps for mobile, tablet, desktop, and web with responsive navigation and dialogs.

When should I use flutter-adaptive-ui?

When creating breakpoint layouts, responsive navigation, adaptive dialogs, or keyboard mouse touch behavior in Flutter.

Is flutter-adaptive-ui safe to install?

Review the Security Audits panel on this page before installing in production.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.