addToScene method

  1. @override
void addToScene(
  1. SceneBuilder builder
)
override

Override this method to upload this layer to the engine.

Implementation

@override
void addToScene(ui.SceneBuilder builder) {
  assert(shader != null);
  assert(maskRect != null);
  assert(blendMode != null);
  engineLayer = builder.pushShaderMask(
    shader!,
    maskRect! ,
    blendMode!,
    oldLayer: _engineLayer as ui.ShaderMaskEngineLayer?,
  );
  addChildrenToScene(builder);
  builder.pop();
}