debugPrintRebuildDirtyWidgets top-level property
getter/setter pair
Log the dirty widgets that are built each frame.
Combined with debugPrintBuildScope or debugPrintBeginFrameBanner, this allows you to distinguish builds triggered by the initial mounting of a widget tree (e.g. in a call to runApp) from the regular builds triggered by the pipeline.
Combined with debugPrintScheduleBuildForStacks, this lets you watch a widget's dirty/clean lifecycle.
To get similar information but showing it on the timeline available from Flutter DevTools rather than getting it in the console (where it can be overwhelming), consider debugProfileBuildsEnabled.
See also:
- WidgetsBinding.drawFrame, which pumps the build and rendering pipeline to generate a frame.
Implementation
bool debugPrintRebuildDirtyWidgets = false;