shaderCallback property

ShaderCallback get shaderCallback

Called to creates the Shader that generates the mask.

The shader callback is called with the current size of the child so that it can customize the shader to the size and location of the child.

The rectangle will always be at the origin when called by RenderShaderMask.

Implementation

// TODO(abarth): Use the delegate pattern here to avoid generating spurious
// repaints when the ShaderCallback changes identity.
ShaderCallback get shaderCallback => _shaderCallback;
set shaderCallback (ShaderCallback value)

Implementation

set shaderCallback(ShaderCallback value) {
  if (_shaderCallback == value) {
    return;
  }
  _shaderCallback = value;
  markNeedsPaint();
}