Baineann socrú UI ar Flutter trí crainn a úsáid — an Widget tree (cumraíocht), an Element tree (na giuirléidí atá instantiated agus bainistríthe), agus an RenderObject tree (leagan amach agus péinteáil). Tugann tuiscint ar an bpíoplíne seo soiléireacht ar an mbealach a dhéanann Flutter giuirléidí a thiontú go píocsal go héifeachtach.
Na trí crainn
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
