RenderShaderMask constructor Null safety

RenderShaderMask(
  1. {RenderBox? child,
  2. required ShaderCallback shaderCallback,
  3. BlendMode blendMode = BlendMode.modulate}
)

Creates a render object that applies a mask generated by a Shader to its child.

The shaderCallback and blendMode arguments must not be null.

Implementation

RenderShaderMask({
  RenderBox? child,
  required ShaderCallback shaderCallback,
  BlendMode blendMode = BlendMode.modulate,
}) : assert(shaderCallback != null),
     assert(blendMode != null),
     _shaderCallback = shaderCallback,
     _blendMode = blendMode,
     super(child);