In Flutter, tutto è un widget — gli elementi dell'interfaccia utente (pulsanti, testo, immagini), le strutture di layout (righe, colonne, padding) e persino l'app stessa sono tutti widget. I widget sono i blocchi di costruzione immutabili che si compongono per formare l'intera interfaccia utente.
Tutto è un 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).
