PipelineOwner class Null safety
The pipeline owner manages the rendering pipeline.
The pipeline owner provides an interface for driving the rendering pipeline and stores the state about which render objects have requested to be visited in each stage of the pipeline. To flush the pipeline, call the following functions in order:
- flushLayout updates any render objects that need to compute their layout. During this phase, the size and position of each render object is calculated. Render objects might dirty their painting or compositing state during this phase.
- flushCompositingBits updates any render objects that have dirty compositing bits. During this phase, each render object learns whether any of its children require compositing. This information is used during the painting phase when selecting how to implement visual effects such as clipping. If a render object has a composited child, it needs to use a Layer to create the clip in order for the clip to apply to the composited child (which will be painted into its own Layer).
- flushPaint visits any render objects that need to paint. During this phase, render objects get a chance to record painting commands into PictureLayers and construct other composited Layers.
- Finally, if semantics are enabled, flushSemantics will compile the semantics for the render objects. This semantic information is used by assistive technology to improve the accessibility of the render tree.
The RendererBinding holds the pipeline owner for the render objects that are visible on screen. You can create other pipeline owners to manage off-screen objects, which can flush their pipelines independently of the on-screen render objects.
Constructors
- PipelineOwner({VoidCallback? onNeedVisualUpdate, VoidCallback? onSemanticsOwnerCreated, VoidCallback? onSemanticsOwnerDisposed})
- Creates a pipeline owner.
Properties
- debugDoingLayout → bool
-
Whether this pipeline is currently in the layout phase.
read-only
- debugDoingPaint → bool
-
Whether this pipeline is currently in the paint phase.
read-only
- debugOutstandingSemanticsHandles → int
-
The number of clients registered to listen for semantics.
read-only
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- onNeedVisualUpdate → VoidCallback?
-
Called when a render object associated with this pipeline owner wishes to
update its visual appearance.
final
- onSemanticsOwnerCreated → VoidCallback?
-
Called whenever this pipeline owner creates a semantics object.
final
- onSemanticsOwnerDisposed → VoidCallback?
-
Called whenever this pipeline owner disposes its semantics owner.
final
- rootNode ↔ AbstractNode?
-
The unique object managed by this pipeline that has no parent.
read / write
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- semanticsOwner → SemanticsOwner?
-
The object that is managing semantics for this pipeline owner, if any.
read-only
Methods
-
ensureSemantics(
{VoidCallback? listener}) → SemanticsHandle -
Opens a SemanticsHandle and calls
listener
whenever the semantics tree updates. -
flushCompositingBits(
) → void - Updates the RenderObject.needsCompositing bits.
-
flushLayout(
) → void - Update the layout information for all dirty render objects.
-
flushPaint(
) → void - Update the display lists for all render objects.
-
flushSemantics(
) → void - Update the semantics for render objects marked as needing a semantics update.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
requestVisualUpdate(
) → void - Calls onNeedVisualUpdate if onNeedVisualUpdate is not null.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited