WidgetSurfacePipeline class final

A widget's own render pipeline, kept alive across draws and pointer events.

Holds a BuildOwner, a PipelineOwner, a RenderView and the element tree child built into — the same four pieces WidgetTexture.rasterise builds and discards per call, kept here instead so that a State inside child survives between frames the way it would inside the application's own tree.

Constructors

WidgetSurfacePipeline({required Widget child, required int width, required int height, double pixelRatio = 1.0})

Properties

hashCode → int
The hash code for this object.
no setterinherited
isDirty → bool
Whether PipelineOwner or BuildOwner have reported a change since the last redrawIfDirty — a render object calling markNeedsPaint or markNeedsLayout, or an Element calling markNeedsBuild.
no setter
redrawCount → int
How many times redrawIfDirty has actually run the pipeline, for a caller measuring how often a control redraws itself.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

announcePointer(int pointer, {required bool added}) → void
Announces the pointer to GestureBinding's router before its first event and withdraws it after its last — the two events dispatchAtUv and dispatchAtLocal do not carry hit-test information for, per GestureBinding.dispatchEvent's own contract.
currentImage() → Future<Image>
The pipeline's canvas as an image, whatever it currently holds — call redrawIfDirty first if the caller wants it current.
dispatchAtLocal(Offset local, PointerEvent event(Offset local)) → void
dispatchAtUv(Offset uv, PointerEvent event(Offset local)) → void
Turns a hit's UV — (0, 0) at the surface's own top-left, (1, 1) at its bottom-right, whatever the mesh underneath is shaped like — into a position on this pipeline's logical canvas and dispatches event there.
dispose() → void
Unmounts the element tree, the way WidgetTexture.rasterise does on its way out — for a State that holds a ticker, a listener or an image and should not keep it once the surface it drew for is gone.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
redrawIfDirty() → bool
Runs the pipeline and returns true if isDirty was set — the mechanism wg-00 measures the cost of, and the reason a control that nobody touched this frame costs nothing beyond this call and the branch inside it.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited