flutter-building-layouts

Guide Flutter UI layouts using Row, Column, Stack, LayoutBuilder, and constraint handling workflows.

Updated Mar 15, 2026
One-click install
npx skills add https://github.com/dangdungvn/review_system_app --skill flutter-building-layouts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flutter-building-layouts
Source: https://github.com/dangdungvn/review_system_app/tree/main/.github/skills/flutter-building-layouts
Command: npx skills add https://github.com/dangdungvn/review_system_app --skill flutter-building-layouts

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers create and refine the UI structure of Flutter applications by providing guidance on using constraint systems and layout widgets effectively.

Core Features & Use Cases

  • Understanding Layout Principles: Learn the fundamental Flutter layout rule: Constraints go down, Sizes go up, Parent sets position.
  • Choosing Structural Widgets: Guidance on using Row, Column, Expanded, Flexible, Container, Stack, Positioned, and SizedBox.
  • Responsive and Adaptive Design: Strategies for handling different screen sizes and form factors using LayoutBuilder and conditional rendering.
  • Workflow for Complex Layouts: A step-by-step process for architecting and implementing UI layouts, including validation and debugging.
  • Example Solutions: Demonstrations of how to resolve common layout issues like unbounded constraints and implement responsive patterns.

Quick Start

Use the flutter-building-layouts skill to help me implement a responsive layout for a mobile and tablet view.

Frequently Asked Questions about flutter-building-layouts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build responsive layouts in Flutter for different screen sizes?

Build responsive layouts in Flutter by using `LayoutBuilder` to conditionally render structural widgets based on available constraints. This allows your application to adapt its UI structure dynamically across mobile, tablet, and desktop form factors.

Why does my Flutter app crash with an unbounded constraints error?

An unbounded constraints error occurs when a widget requests infinite space within a parent that does not impose strict boundaries. Resolve it by wrapping widgets in `Expanded` or `Flexible` within `Row` or `Column` to allocate finite space.

What is the core rule for how Flutter layouts work?

The core rule for Flutter layouts is that constraints go down the tree, sizes go up, and parents set positions. Understanding this mechanism is essential for effectively using structural widgets like `Container`, `Stack`, and `SizedBox`.

When should I use Expanded versus Flexible in a Flutter Column?

Use `Expanded` to force a child widget to fill all available space within a `Row` or `Column`, preventing overflow. Use `Flexible` when the child should occupy available space but can be smaller if its content does not require the full extent.

What is the best way to position widgets overlapping each other in Flutter?

The best way to position overlapping widgets in Flutter is using the `Stack` widget combined with `Positioned`. `Stack` layers children on top of each other, while `Positioned` specifies exact coordinates for each child within the stack boundaries.

Can I use LayoutBuilder to implement conditional rendering for mobile and tablet views?

Yes, you can use `LayoutBuilder` to implement conditional rendering by checking the `BoxConstraints` provided to your builder function. This allows you to render different widget trees specifically tailored for mobile or tablet views.