I am trying to create a more complex customPaint and want to add a border to it. From the picture you can see the shape (In blue) and the partial border (in white)
The way I am creating the white border is with a secondary customPaint right now. My question is, is there an easier way of adding a border to the existing customPaint, as doing the corners of the rectangle can be annoying by itself and doesn't seem like an elegant way of doing it.
My code right now, without the border
Path.combine(
PathOperation.intersect,
Path()
..addRRect(RRect.fromLTRBR(
xCanvasLeft,
xCanvasTop,
xCanvasRight,
xCanvasBot,
const Radius.circular(canvasRadius))),
Path()
..addOval(Rect.fromCircle(
center: Offset(xHole, yHoleTop),
radius: holeRadius))
..addOval(Rect.fromCircle(
center: Offset(xHole,
yHoleBot),
radius: holeRadius))
..close(),
),
paint,
);
EDIT: I am also wondering how resource heavy custom paint is?