BuildOwner class
Schedules and rebuilds dirty elements.
Constructors
- BuildOwner({bool debugRebuilds = false})
- Creates a build owner.
Properties
- debugRebuilds → bool
-
Enables per-element rebuild logging to stdout.
final
- hadBuildThisFrame → bool
-
Whether any elements were rebuilt during the current frame's build phase.
no setter
- hasDirty → bool
-
Whether there are dirty elements waiting to rebuild.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasPaintDirty → bool
-
Whether a repaint has been requested for the current frame.
no setter
- mouseCapture → Element?
-
The element currently holding mouse capture, if any.
no setter
-
recentTimings
→ List<
WidgetFrameTiming> -
Recent widget frame timings (up to
_maxRecentTimings).no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- widgetFrameCount → int
-
Total widget frames rendered so far.
no setter
Methods
-
addFrameTimingCallback(
WidgetFrameTimingCallback callback) → void - Registers a callback invoked after each widget frame with timing data.
-
beginFrame(
Element root) → void - Starts a frame by resetting accumulators and running the build phase.
-
buildScope(
Element root) → void -
Rebuilds all dirty elements that are descendants of
root. -
buildScopeFor(
Element root, Element element) → void -
Rebuilds
elementwhen it is dirty and underroot. -
captureMouse(
Element element) → void -
Routes subsequent mouse messages to
element. -
clearPendingMountInitCmds(
) → void - Drops queued mount-init commands without returning them.
-
didRebuild(
Element element) → void -
Notifies the owner that
elementfinished rebuilding. -
drainMountInitCmds(
) → Cmd? - Drains queued mount-init commands.
-
enableMountInitCmdCapture(
) → void - Starts collecting init commands from newly mounted elements.
-
endFrame(
{Duration? totalDuration, Duration? buildDuration}) → void - Ends a frame and publishes collected timing information.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
performanceSnapshot(
RenderMetrics? renderMetrics) → PerformanceMetricsSnapshot - Returns a PerformanceMetricsSnapshot combining the given runtime metrics with widget-level timing data.
-
queueMountInitCmd(
Cmd? cmd) → void - Queues an init command produced by a newly mounted element.
-
recordLayout(
Duration duration) → void - Records layout duration accumulated by a RenderObjectElement during the current frame.
-
recordPaint(
Duration duration) → void - Records paint duration accumulated by a RenderObjectElement during the current frame.
-
releaseMouse(
Element element) → void -
Clears mouse capture when
elementcurrently owns it. -
removeFrameTimingCallback(
WidgetFrameTimingCallback callback) → void - Removes a previously registered frame timing callback.
-
scheduleBuildFor(
Element element) → void -
Schedules
elementto rebuild in the next build scope. -
schedulePaint(
) → void - Marks the frame as needing a paint pass.
-
toString(
) → String -
A string representation of this object.
inherited
-
unscheduleBuildFor(
Element element) → void -
Removes
elementfrom the dirty queue if present.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited