createShader method
Creates a Shader for this gradient to fill the given rect.
If the gradient's configuration is text-direction-dependent, for example
it uses AlignmentDirectional objects instead of Alignment
objects, then the textDirection
argument must not be null.
The shader's transform will be resolved from the transform of this gradient.
Implementation
@override
Shader createShader(Rect rect, {TextDirection? textDirection}) {
if (borderEdge != null) {
rect = Rect.fromLTRB(rect.left - borderEdge!.left, rect.top - borderEdge!.top, rect.right - borderEdge!.right,
rect.bottom - borderEdge!.bottom);
}
return super.createShader(rect, textDirection: textDirection);
}