WidgetTextureController class Widgets

Owns the gpu.Texture a WidgetTexture streams its child into.

Bind texture to any material texture slot (for example PhysicallyBasedMaterial.baseColorTexture). It is null until the first capture completes; listen for changes to pick it up (the texture object is also replaced when the capture size changes).

Captures round-trip through the CPU today (rasterize, read back, upload), so treat this as a correct-but-slow path: captures are throttled to one in flight and only run when the child subtree actually repaints, but each one costs a readback on the raster thread plus a byte upload.

Inheritance

Constructors

WidgetTextureController()

Properties

captureCount int
Total completed captures, for diagnostics.
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
lastCaptureDuration Duration
Wall-clock duration of the last capture round trip (rasterize, read back, upload), for diagnostics.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
texture Texture?
The most recent capture, or null before the first one completes.
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
pointerCancel({int pointer = 0}) → void
Cancels an active pointer interaction, if any.
pointerDown(Offset uv, {int pointer = 0}) → void
Sends a pointer down at uv. Follow with pointerMove and pointerUp (or pointerCancel) to complete the interaction.
pointerMove(Offset uv, {int pointer = 0}) → void
Moves an active pointer to uv.
pointerScroll(Offset uv, Offset scrollDelta) → void
Sends a scroll at uv of scrollDelta logical pixels (positive y scrolls down), driving scrollables under that point.
pointerUp(Offset uv, {int pointer = 0}) → void
Releases an active pointer at uv.
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
requestCapture() → void
Captures the child's latest recorded content now. The trigger for WidgetUpdatePolicy.manual; under other policies it forces an immediate capture (subject to one-in-flight throttling).
tapAt(Offset uv, {int pointer = 0}) → void
Sends a complete tap (down then up) at uv.
toString() String
A string representation of this object.
inherited

Operators

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