WidgetComponent constructor

WidgetComponent({
  1. required Widget child,
  2. required Size size,
  3. double pixelRatio = 1.0,
  4. double worldHeight = 1.0,
  5. WidgetUpdatePolicy update = WidgetUpdatePolicy.everyFrame,
  6. WidgetInput input = WidgetInput.automatic,
  7. Geometry? geometry,
  8. Material? material,
  9. void bind(
    1. Texture texture
    )?,
})

Creates a widget surface. With no geometry an aspect-correct quad is created; with no material and no bind, an unlit alpha-blended material bound to the capture is created.

Implementation

WidgetComponent({
  required Widget child,
  required Size size,
  double pixelRatio = 1.0,
  double worldHeight = 1.0,
  WidgetUpdatePolicy update = WidgetUpdatePolicy.everyFrame,
  this.input = WidgetInput.automatic,
  Geometry? geometry,
  Material? material,
  void Function(gpu.Texture texture)? bind,
}) : _child = child,
     _size = size,
     _pixelRatio = pixelRatio,
     _worldHeight = worldHeight,
     _update = update,
     _geometry = geometry,
     _material = material,
     _bind = bind,
     _createsSurface = true;