toPaint method
Returns a Paint for this brush to fill the given rect
.
Implementation
@override
Paint toPaint(Rect rect, {TextDirection? textDirection}) {
return Paint()
..isAntiAlias = true
..style = PaintingStyle.fill
..shader = gradient.createShader(rect, textDirection: textDirection);
}