# BoxConstraints, Expanded và LayoutBuilder

> constraints go down, sizes go up, parent sets position; tight, loose và unbounded constraints; Expanded, AspectRatio, ConstrainedBox, FittedBox, LayoutBuilder, SafeArea.

- URL: https://dantech.academy/courses/flutter-mobile-101/02-widget-essentials/lesson-04-constraints-and-sizing
- Khóa học: [Flutter Mobile 101](https://dantech.academy/courses/flutter-mobile-101.md)
- Module: Widget Fundamentals
- Thời lượng: 20 phút
- Độ khó: beginner
- Truy cập: Dành cho học viên

## Mục tiêu

- Phát biểu Flutter layout rule và dùng nó để chẩn đoán lỗi kích thước
- Phân biệt tight, loose và unbounded constraints trong BoxConstraints
- Chọn đúng Expanded, AspectRatio, ConstrainedBox, FittedBox hoặc LayoutBuilder cho từng ràng buộc kích thước

## Nội dung bài học

1. Flutter Layout Rule
2. Unbounded Constraints
3. Bộ Công Cụ, Theo Đúng Câu Hỏi Nó Trả Lời
4. Cách Repo Bắt Lỗi Overflow
5. Thuật Ngữ

## Học cùng AI agent

Toàn bộ bài học dành cho học viên của khóa. Học viên mở bài trên web và bấm nút **Markdown** để copy toàn bài, rồi dán vào Claude, ChatGPT, Cursor hoặc agent bạn đang dùng. Nhanh hơn: tạo token ở `/profile/ai-agents` và agent đọc bài trực tiếp qua MCP.

- [Đăng ký khóa học](https://dantech.academy/flutter-mobile-101/checkout)

---

- Bài trước: [collection-for, ListView.builder và Chip](https://dantech.academy/courses/flutter-mobile-101/02-widget-essentials/lesson-03-lists-and-selection.md)
- Bài tiếp theo: [Stack, Positioned và IgnorePointer](https://dantech.academy/courses/flutter-mobile-101/02-widget-essentials/lesson-05-stack-and-overlays.md)
