withShaderMaskGradient method

Widget withShaderMaskGradient(
  1. Gradient gradient, {
  2. BlendMode blendMode = BlendMode.srcATop,
})

Wrap with ShaderMask widget Gradient

Implementation

Widget withShaderMaskGradient(
  Gradient gradient, {
  BlendMode blendMode = BlendMode.srcATop,
}) {
  return ShaderMask(
    shaderCallback: (rect) => gradient.createShader(rect),
    blendMode: blendMode,
    child: this,
  );
}