Called by the binding when BuildOwner.scheduleBuildFor has been called to mark this element dirty, and, in components, by mount when the element is first built and by update when the widget has changed.
Source
void rebuild() { assert(_debugLifecycleState != _ElementLifecycle.initial); if (!_active || !_dirty) return; assert(() { if (debugPrintRebuildDirtyWidgets) { if (!_debugBuiltOnce) { debugPrint('Building $this'); _debugBuiltOnce = true; } else { debugPrint('Rebuilding $this'); } } return true; }); assert(_debugLifecycleState == _ElementLifecycle.active); assert(owner._debugStateLocked); BuildableElement debugPreviousBuildTarget; assert(() { debugPreviousBuildTarget = owner._debugCurrentBuildTarget; owner._debugCurrentBuildTarget = this; return true; }); performRebuild(); assert(() { assert(owner._debugCurrentBuildTarget == this); owner._debugCurrentBuildTarget = debugPreviousBuildTarget; return true; }); assert(!_dirty); }