Everything Is a Widget in Flutter: StatelessWidget, StatefulWidget, BuildContext and the Three Trees
In Flutter a widget is not the thing on the screen but an immutable configuration: on a rebuild widgets are replaced while elements and render objects stay, and State lives in the element. Using BookCard and FavoriteButton, we show with real test output the State lifecycle with its Angular counterparts, how const cuts off rebuilds, the mounted check after an await, and how state slides to the wrong row without keys.
15 Nov 2026
·
12 min
·
5