ใน Flutter ทุกอย่างคือ widget — องค์ประกอบ UI (ปุ่ม ข้อความ รูปภาพ) โครงสร้างเลย์เอาต์ (แถว คอลัมน์ padding) และแม้แต่ตัวแอปเองก็เป็น widget ทั้งหมด widget คือ building block ที่ไม่เปลี่ยนแปลง (immutable) ซึ่งประกอบกันเป็นอินเทอร์เฟซผู้ใช้ทั้งหมด
ทุกอย่างคือ widget
Widgets describe the UI. EVERYTHING is a widget:
→ visible elements: Text, Image, Icon, Button, etc.
→ layout: Row, Column, Container, Padding, Center, Stack, etc.
→ structure: Scaffold (page structure), AppBar, etc.
→ even the app itself (MaterialApp) and abstract things (Padding, Theme)
→ You build UI by COMPOSING widgets into a tree (widgets contain other widgets).
