WidgetComponent.bindOnly constructor

WidgetComponent.bindOnly({
  1. required Widget child,
  2. required Size size,
  3. required void bind(
    1. Texture texture
    ),
  4. double pixelRatio = 1.0,
  5. WidgetUpdatePolicy update = WidgetUpdatePolicy.everyFrame,
  6. 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;