WidgetComponent constructor
WidgetComponent({
- required Widget child,
- required Size size,
- double pixelRatio = 1.0,
- double worldHeight = 1.0,
- WidgetUpdatePolicy update = WidgetUpdatePolicy.everyFrame,
- WidgetInput input = WidgetInput.automatic,
- Geometry? geometry,
- Material? material,
- void bind(
- 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;