WidgetComponent.bindOnly constructor
WidgetComponent.bindOnly({
- required Widget child,
- required Size size,
- required void bind(
- Texture texture
- double pixelRatio = 1.0,
- WidgetUpdatePolicy update = WidgetUpdatePolicy.everyFrame,
- WidgetInput input = WidgetInput.automatic,
Creates a capture-and-bind-only component: no geometry or mesh is
created, and every texture change is delivered to bind (which
typically assigns a texture slot on an existing material).
Implementation
WidgetComponent.bindOnly({
required Widget child,
required Size size,
required void Function(gpu.Texture texture) bind,
double pixelRatio = 1.0,
WidgetUpdatePolicy update = WidgetUpdatePolicy.everyFrame,
this.input = WidgetInput.automatic,
}) : _child = child,
_size = size,
_pixelRatio = pixelRatio,
_worldHeight = 1.0,
_update = update,
_geometry = null,
_material = null,
_bind = bind,
_createsSurface = false;