What are the three trees in Flutter's rendering architecture?
Flutter uses three synchronized trees: the Widget tree (immutable blueprints), the Element tree (mutable li...
25 questions
3-tree architecture, slivers, constraints, painting
Flutter uses three synchronized trees: the Widget tree (immutable blueprints), the Element tree (mutable li...
StatelessWidget renders based solely on its constructor arguments and never changes. StatefulWidget maintai...
Parent passes BoxConstraints (min/max width and height) down to each child. The child determines its own si...
Keys help Flutter's reconciliation algorithm match elements to widgets when the widget type stays the same ...
InheritedWidget provides a way to efficiently propagate data down the widget tree. Descendant widgets subsc...
BuildContext is a handle to the location of a widget in the element tree. It's used for theme lookups, navi...
Slivers are scrollable areas with a custom scroll effect protocol. They allow fine-grained control over scr...
RepaintBoundary creates an isolated layer in the render tree. When content inside it changes, only that lay...
StatefulWidget lifecycle: createState → initState → didChangeDependencies → build → (didUpdateWidget / setS...
Const widgets are canonicalized at compile time — Flutter skips rebuilding them entirely because it knows t...
Create a custom RenderObject when you need layout or painting behavior that cannot be achieved by composing...
Flutter strongly favors composition over inheritance. Build complex widgets by combining smaller ones rathe...
Flutter reconciles by checking if the new widget's runtimeType and key match the existing element's. If yes...
RenderFlex overflow occurs when the total intrinsic size of children exceeds the available space in a Row o...
LocalKey (ValueKey, ObjectKey, UniqueKey) identifies a widget among its siblings. GlobalKey uniquely identi...
Use LayoutBuilder when you need the constraints available to your widget. Use MediaQuery when you need scre...
Opacity paints transparently but still lays out and hit-tests. Visibility can remove the widget from layout...
Use InkWell for Material Design ripple feedback on tappable widgets. Use GestureDetector for custom gesture...
IndexedStack keeps all children in the tree (preserving their state) and shows only one at a time. PageView...
Flutter's rendering pipeline: vsync signal → build (widget tree diff) → layout (constraints/sizes) → paint ...
Flutter doesn't have a traditional CSS box model. Padding is an explicit widget. 'Margin' is achieved with ...
CustomPainter provides a Canvas API for arbitrary 2D drawing. Override paint() for drawing logic and should...
Widget tests verify widget structure and behavior via finder/matcher APIs. Golden tests render a widget to ...
NestedScrollView coordinates scrolling between an outer scrollable (e.g., SliverAppBar) and inner scrollabl...
Flutter builds a semantic tree in parallel with the widget tree. The Semantics widget annotates nodes with ...