ExternalTexture constructor

ExternalTexture({
  1. int? textureId,
  2. required int width,
  3. required int height,
  4. ExternalTextureUpdate update = ExternalTextureUpdate.everyFrame,
  5. ExternalTextureSampling sampling = const ExternalTextureSampling(),
  6. ColorFilter? colorFilter,
})

Creates a source capturing textureId at width x height pixels.

textureId may be null when a plugin has not published one yet; set it once it has.

Implementation

ExternalTexture({
  int? textureId,
  required int width,
  required int height,
  this.update = ExternalTextureUpdate.everyFrame,
  this.sampling = const ExternalTextureSampling(),
  this.colorFilter,
}) : assert(width > 0 && height > 0, 'ExternalTexture size must be positive'),
     _textureId = textureId,
     _width = width,
     _height = height;