Il rendering di Flutter coinvolge tre alberi — l'albero Widget (configurazione), l'albero Element (i widget istanziati e gestiti) e l'albero RenderObject (layout e disegno). Comprendere questa pipeline demistifica come Flutter trasforma efficientemente i widget in pixel.
I tre alberi
WIDGET tree → immutable CONFIGURATION (what you write: the description of the UI)
→ cheap to create/recreate; rebuilt often (build() returns new widgets)
ELEMENT tree → the INSTANTIATED widgets; manages lifecycle and LINKS widgets to render
objects; PERSISTS across rebuilds (this is the key to efficiency)
RENDEROBJECT tree → does the actual LAYOUT, PAINTING, and hit-testing (the heavy objects)
→ expensive; REUSED and updated (not recreated) across rebuilds
