paintBorder2 method

void paintBorder2(
  1. Canvas canvas,
  2. Rect rect,
  3. GradientBorderSide side, {
  4. TextDirection? textDirection,
})

Implementation

void paintBorder2(
  Canvas canvas,
  Rect rect,
  GradientBorderSide side, {
  TextDirection? textDirection,
}) {
  final innerPath = getInnerPath(rect, textDirection: textDirection);
  final outerPath = getOuterPath(rect, textDirection: textDirection);

  final Path borderPath = outerPath..addPath(innerPath, Offset.zero);
  final Paint paint = side.toPaint(rect);
  canvas.drawPath(borderPath, paint);
}