What is Flutter's rendering pipeline order?

Why Interviewers Ask This

Senior Flutter engineers are expected to reason about architecture, performance, and edge cases. This question separates mid-level from senior candidates by testing deep system-level understanding.

Answer

Flutter's rendering pipeline executes in this order each frame: BuildLayoutPaintComposite. In the Build phase, Flutter calls build() on dirty widgets to produce the widget tree. In the Layout phase, RenderObjects receive constraints from their parents, calculate their sizes, and position their children. In the Paint phase, RenderObjects paint to their Canvas layers. Finally, in the Composite phase, the GPU takes the painted layers and composites them into the final frame displayed on screen. Understanding this pipeline helps you optimize at the right stage.

Pro Tip

This topic has Flutter-specific nuances that differ from general programming. Highlighting those nuances in your answer shows expertise rather than generic knowledge.