mcpField
F
flutter-responsive-layout

flutter-responsive-layout

github.com/thienqoDesign & UI943 installsUpdated 1d ago
Repository

About flutter-responsive-layout

A Flutter skill for building responsive layouts from parent constraints rather than assumed device models. It guides developers in adapting composition, navigation, and content across viewport sizes and input modes.

Key features

  1. 01Diagnose constraint and overflow issues
  2. 02Set content-driven breakpoints
  3. 03Adapt navigation and information density
  4. 04Respect insets, text scaling, and input
  5. 05Test boundary widths and localized text

Use cases

  1. 01Fix layouts that overflow at narrow widths
  2. 02Adapt navigation for larger viewports
  3. 03Check layouts with large text and keyboard insets

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/thienqo/flutter-skills --skill flutter-responsive-layout

After installing, type/flutter-responsive-layoutin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

evals/
cases.json
references/
adaptive-navigation-patterns.md
geometry-viewport-and-fixture-testing.md

Details

From the project README

Flutter Responsive Layout

Design from the constraints supplied by the parent, not from a guessed device model.

Diagnose

Reproduce the layout on the failing viewport with text scaling and the relevant platform chrome. Read the first meaningful constraint or overflow failure and identify which widget imposed the incompatible size. When no framework exception occurs, inspect the geometry and hit-test behavior of the affected components instead of assuming that a clean console proves the layout is usable.

Rules

  • Use LayoutBuilder when a subtree responds to local constraints and MediaQuery when behavior depends on window or accessibility properties.
  • Choose a small set of content-driven breakpoints; do not branch on specific device names.
  • Prefer flexible constraints, wrapping, scrolling, or alternate composition over fixed width/height patches.
  • Keep readable content widths on large displays instead of stretching every element.
  • Adapt navigation and information density when space changes materially.
  • Respect safe areas, display features, keyboard insets, text scaling, and both pointer and touch input.
  • Avoid IntrinsicHeight or repeated intrinsic measurement on hot, complex trees without evidence.

Verification

Exercise boundary widths just below and above each breakpoint, long localized strings, large text, landscape, and the intended desktop/web window sizes. Add a focused widget or golden test for regressions that visual assertions can represent reliably.

When components overlap, become clipped, or cover an action, follow the geometry, viewport, and fixture testing reference. Define explicit spatial relationships for important components rather than treating every intersecting render box as a defect.

References

When adaptive navigation is in scope, follow the adaptive navigation patterns reference.

Sources

Comments

Markdown supported