Agent skill

Flutter Build Responsive Layout

by abdulmominsakib in abdulmominsakib/localmind

Use LayoutBuilder, MediaQuery, or Expanded/Flexible to create a layout that adapts to different screen sizes.

MITAuto-check passedMobile

Install Flutter Build Responsive Layout

skills CLI
$ npx skills add abdulmominsakib/localmind --skill flutter-build-responsive-layout -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install abdulmominsakib/localmind flutter-build-responsive-layout --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/abdulmominsakib/localmind.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/flutter-build-responsive-layout .claude/skills/flutter-build-responsive-layout && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
flutter-build-responsive-layout
GitHub stars
268
Used in
1 other repo
Token cost
~1.7k tokens
SKILL.md length
600 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
MIT

At a glance

Use LayoutBuilder, MediaQuery, or Expanded/Flexible to create a layout that adapts to different screen sizes.

  • You need the UI to look good on both mobile and tablet/desktop form factors
  • SKILL.md covers Contents, Space Measurement Guidelines, Widget Sizing and Constraints and Device and Orientation Behaviors, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Responsive design

What it does

Flutter Build Responsive Layout is an agent skill from abdulmominsakib/localmind. Use LayoutBuilder, MediaQuery, or Expanded/Flexible to create a layout that adapts to different screen sizes. Use when you need the UI to look good on both mobile and tablet/desktop form factors.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Mobile, covering Responsive design and Cross-platform mobile apps. It works with Flutter. The repository describes itself as: A mobile application designed to provide a beautiful, fast, and privacy-respecting interface for on device LLM and local LLM servers and cloud providers. The licence is MIT.

When your agent uses it

  • You need the UI to look good on both mobile and tablet/desktop form factors
  • Tasks that involve Responsive design
  • Tasks that involve Cross-platform mobile apps

Example prompts

  • “/flutter-build-responsive-layout”

What it can do on your machine

Read from SKILL.md and the folder at commit 9ff3f94. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are dart).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Flutter Build Responsive Layout loads about 1.7k tokens when it runs. Until then it costs about 58 tokens; SKILL.md has 600 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from abdulmominsakib/localmind at commit 9ff3f94, republished under its MIT licence (© abdulmominsakib). 600 words, ~1,702 tokens.

Download SKILL.mdSave it as .claude/skills/flutter-build-responsive-layout/SKILL.md (or your agent's skills folder).
name
flutter-build-responsive-layout
description
Use `LayoutBuilder`, `MediaQuery`, or `Expanded/Flexible` to create a layout that adapts to different screen sizes. Use when you need the UI to look good on both mobile and tablet/desktop form factors.
metadata.model
models/gemini-3.1-pro-preview
metadata.last_modified
Tue, 21 Apr 2026 20:17:40 GMT

Implementing Adaptive Layouts

Contents

Space Measurement Guidelines

Determine the available space accurately to ensure layouts adapt to the app window, not just the physical device.

  • Use MediaQuery.sizeOf(context) to get the size of the entire app window.
  • Use LayoutBuilder to make layout decisions based on the parent widget's allocated space. Evaluate constraints.maxWidth to determine the appropriate widget tree to return.
  • Do not use MediaQuery.orientationOf or OrientationBuilder near the top of the widget tree to switch layouts. Device orientation does not accurately reflect the available app window space.
  • Do not check for hardware types (e.g., "phone" vs. "tablet"). Flutter apps run in resizable windows, multi-window modes, and picture-in-picture. Base all layout decisions strictly on available window space.

Widget Sizing and Constraints

Understand and apply Flutter's core layout rule: Constraints go down. Sizes go up. Parent sets position.

  • Distribute Space: Use Expanded and Flexible within Row, Column, or Flex widgets.
    • Use Expanded to force a child to fill all remaining available space (equivalent to Flexible with fit: FlexFit.tight and a flex factor of 1.0).
    • Use Flexible to allow a child to size itself up to a specific limit while still expanding/contracting. Use the flex factor to define the ratio of space consumption among siblings.
  • Constrain Width: Prevent widgets from consuming all horizontal space on large screens. Wrap widgets like GridView or ListView in a ConstrainedBox or Container and define a maxWidth in the BoxConstraints.
  • Lazy Rendering: Always use ListView.builder or GridView.builder when rendering lists with an unknown or large number of items.

Device and Orientation Behaviors

Ensure the app behaves correctly across all device form factors and input methods.

  • Do not lock screen orientation. Locking orientation causes severe layout issues on foldable devices, often resulting in letterboxing (the app centered with black borders). Android large format tiers require both portrait and landscape support.
  • Fallback for Locked Orientation: If business requirements strictly mandate a locked orientation, use the Display API to retrieve physical screen dimensions instead of MediaQuery. MediaQuery fails to receive the larger window size in compatibility modes.
  • Support Multiple Inputs: Implement support for basic mice, trackpads, and keyboard shortcuts. Ensure touch targets are appropriately sized and keyboard navigation is accessible.
Show full SKILL.md (220 more words)Show less

Workflow: Constructing an Adaptive Layout

Follow this workflow to implement a layout that adapts to the available BoxConstraints.

Task Progress:

  • Identify the target widget that requires adaptive behavior.
  • Wrap the widget tree in a LayoutBuilder.
  • Extract the constraints.maxWidth from the builder callback.
  • Define an adaptive breakpoint (e.g., largeScreenMinWidth = 600).
  • If maxWidth > largeScreenMinWidth: Return a large-screen layout (e.g., a Row placing a navigation sidebar and content area side-by-side).
  • If maxWidth <= largeScreenMinWidth: Return a small-screen layout (e.g., a Column or standard navigation-style approach).
  • Run validator -> resize the application window -> review layout transitions -> fix overflow errors.

Workflow: Optimizing for Large Screens

Follow this workflow to prevent UI elements from stretching unnaturally on large displays.

Task Progress:

  • Identify full-width components (e.g., ListView, text blocks, forms).
  • If optimizing a list: Convert ListView.builder to GridView.builder using SliverGridDelegateWithMaxCrossAxisExtent to automatically adjust column counts based on window size.
  • If optimizing a form or text block: Wrap the component in a ConstrainedBox.
  • Apply BoxConstraints(maxWidth: [optimal_width]) to the ConstrainedBox.
  • Wrap the ConstrainedBox in a Center widget to keep the constrained content centered on large screens.
  • Run validator -> test on desktop/tablet target -> review horizontal stretching -> adjust maxWidth or grid extents.

Examples

Adaptive Layout using LayoutBuilder

Demonstrates switching between a mobile and desktop layout based on available width.

dart
import 'package:flutter/material.dart';

const double largeScreenMinWidth = 600.0;

class AdaptiveLayout extends StatelessWidget {
  const AdaptiveLayout({super.key});

  @override
  Widget build(BuildContext context) {
    return LayoutBuilder(
      builder: (context, constraints) {
        if (constraints.maxWidth > largeScreenMinWidth) {
          return _buildLargeScreenLayout();
        } else {
          return _buildSmallScreenLayout();
        }
      },
    );
  }

  Widget _buildLargeScreenLayout() {
    return Row(
      children: [
        const SizedBox(width: 250, child: Placeholder(color: Colors.blue)),
        const VerticalDivider(width: 1),
        Expanded(child: const Placeholder(color: Colors.green)),
      ],
    );
  }

  Widget _buildSmallScreenLayout() {
    return const Placeholder(color: Colors.green);
  }
}
Constraining Width on Large Screens

Demonstrates preventing a widget from consuming all horizontal space.

dart
import 'package:flutter/material.dart';

class ConstrainedContent extends StatelessWidget {
  const ConstrainedContent({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: ConstrainedBox(
          constraints: const BoxConstraints(
            maxWidth: 800.0, // Maximum width for readability
          ),
          child: ListView.builder(
            itemCount: 50,
            itemBuilder: (context, index) {
              return ListTile(
                title: Text('Item $index'),
              );
            },
          ),
        ),
      ),
    );
  }
}

© abdulmominsakib, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/flutter-build-responsive-layout of abdulmominsakib/localmind.

Open the folder on GitHubat commit 9ff3f94

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in abdulmominsakib/localmind, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Flutter Build Responsive Layout next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Flutter Build Responsive Layout compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Flutter Build Responsive Layout this skillabdulmominsakib/localmind2681 repos~1.7kAutomated safety check: PassMIT
Mobile Developmentrohitg00/awesome-claude-code-toolkit2.7k—~1.5kAutomated safety check: PassApache-2.0
Flutter Devaiskillstore/marketplace4331 repos~1.3kAutomated safety check: PassMIT
Material 3hamen/material-3-skill1.5k2 repos~7.8kAutomated safety check: PassMIT
Flutter Building Layoutsbtwld/superdeck130—~1.5kAutomated safety check: PassBSD-3-Clause
Flutter Adaptive UIMADTeacher/mad-agents-skills110—~1.5kAutomated safety check: PassMIT

Similar skills

  • Mobile Development

    rohitg00/awesome-claude-code-toolkit

    Mobile development patterns for React Native and Flutter including navigation, state management, and responsive design

    2.7k GitHub stars~1.5k tokensUpdated 5 mo ago
    MobileAuto-check passed
  • Flutter Dev

    aiskillstore/marketplace

    Flutter cross-platform development guide covering widget patterns, Riverpod/Bloc state management, GoRouter navigation, performance optimization, and platform-specific implementations.

    433 GitHub starsUsed in 1 repo~1.3k tokens
    MobileAuto-check passed
  • Material 3

    hamen/material-3-skill

    Implement Google's Material Design 3 (Material You) UI system.

    1.5k GitHub starsUsed in 2 repos~7.8k tokens
    Frontend & DesignAuto-check passed
  • Builds Flutter layouts using the constraint system and layout widgets.

    130 GitHub stars~1.5k tokensUpdated yesterday
    MobileAuto-check passed
  • Flutter Adaptive UI

    MADTeacher/mad-agents-skills

    Build, fix, review, and validate adaptive or responsive Flutter UIs for mobile, tablet, desktop, web, large screens, foldables, and mixed input devices.

    110 GitHub stars~1.5k tokensUpdated 5 mo ago
    MobileAuto-check passed
  • Iphone Duo Flutter

    mirzaaghazadeh/iphone-duo-skills

    Adapt a Flutter app to iPhone Duo, Apple's first foldable iPhone — what MediaQuery gives you today, why displayFeatures does not work here, and how to bridge the iOS 27.1 reserved-region, hinge and…

    149 GitHub stars~1.6k tokensUpdated 3 days ago
    MobileAuto-check passed

More from abdulmominsakib/localmind

All 13 skills in this repo
  • Flutter Add Widget Preview

    abdulmominsakib/localmind

    Adds interactive widget previews to the project using the previews.dart system.

    268 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • Flutter Feature Based Architecture

    abdulmominsakib/localmind

    Design, implement, refactor, and review Flutter apps that use feature-based vertical slices, handwritten Dart models/providers, componentized StatelessWidget UI, Riverpod state management, and a…

    268 GitHub stars~2.9k tokensUpdated 2 days ago
    Auto-check passed
  • Flutter Add Widget Test

    abdulmominsakib/localmind

    Implement a component-level test using WidgetTester to verify UI rendering and user interactions (tapping, scrolling, entering text).

    268 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • Architects a Flutter application using the recommended layered approach (UI, Logic, Data).

    268 GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check passed
  • Flutter Fix Layout Issues

    abdulmominsakib/localmind

    Fixes Flutter layout errors (overflows, unbounded constraints) using Dart and Flutter MCP tools.

    268 GitHub starsUsed in 1 repo~1.3k tokens
    Auto-check passed
  • Flutter Implement JSON Serialization

    abdulmominsakib/localmind

    Create model classes with fromJson and toJson methods using dart:convert.

    268 GitHub starsUsed in 1 repo~1.4k tokens
    Auto-check passed

Works with

Questions about Flutter Build Responsive Layout

What does Flutter Build Responsive Layout do?

Use LayoutBuilder, MediaQuery, or Expanded/Flexible to create a layout that adapts to different screen sizes. Flutter Build Responsive Layout is an agent skill from abdulmominsakib/localmind. Use LayoutBuilder, MediaQuery, or Expanded/Flexible to create a layout that adapts to different screen sizes.

When should I use Flutter Build Responsive Layout?

Flutter Build Responsive Layout fits situations like: you need the UI to look good on both mobile and tablet/desktop form factors; tasks that involve Responsive design; tasks that involve Cross-platform mobile apps.

How do I install Flutter Build Responsive Layout in Claude Code?

Run `npx skills add abdulmominsakib/localmind --skill flutter-build-responsive-layout -a claude-code`. Or copy the skill folder (.agents/skills/flutter-build-responsive-layout in abdulmominsakib/localmind) into .claude/skills/flutter-build-responsive-layout in your project. Claude Code loads it when a task matches its description.

How do I install Flutter Build Responsive Layout in Codex?

Run `npx skills add abdulmominsakib/localmind --skill flutter-build-responsive-layout -a codex`. Or copy the skill folder (.agents/skills/flutter-build-responsive-layout in abdulmominsakib/localmind) into .agents/skills/flutter-build-responsive-layout in your project. Codex loads it when a task matches its description.

Can I use Flutter Build Responsive Layout in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add abdulmominsakib/localmind --skill flutter-build-responsive-layout -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/flutter-build-responsive-layout, .gemini/skills/flutter-build-responsive-layout, .github/skills/flutter-build-responsive-layout and .opencode/skills/flutter-build-responsive-layout in your project.

What does Flutter Build Responsive Layout need to run?

SKILL.md names no scripts, command-line tools or credentials: Flutter Build Responsive Layout is instructions for the agent only.

Does Flutter Build Responsive Layout access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Flutter Build Responsive Layout safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Flutter Build Responsive Layout use?

Flutter Build Responsive Layout is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Flutter Build Responsive Layout use?

About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Flutter Build Responsive Layout?

Skills that share tags, products or a category with Flutter Build Responsive Layout: Mobile Development (rohitg00/awesome-claude-code-toolkit, 2.7k stars), Flutter Dev (aiskillstore/marketplace, 433 stars), Material 3 (hamen/material-3-skill, 1.5k stars) and Flutter Building Layouts (btwld/superdeck, 130 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Flutter Build Responsive Layout?

abdulmominsakib (a GitHub user) maintains it in abdulmominsakib/localmind, which has 268 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on October 8, 2026.

Source: abdulmominsakib/localmind on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.