debugDoingBuild property

bool debugDoingBuild

Whether the component is currently updating the component or render tree.

For StatefulComponents and StatelessComponents this flag is true while their respective build methods are executing. Other Component types may set this to true for conceptually similar phases of their lifecycle.

When this is true, it is safe for component to establish a dependency to an InheritedComponent by calling dependOnInheritedElement or dependOnInheritedComponentOfExactType.

Accessing this flag in release mode is not valid.

Implementation

bool get debugDoingBuild;