paint method

  1. @override
void paint(
  1. Canvas canvas,
  2. Rect rect, {
  3. double? gapStart,
  4. double gapExtent = 0.0,
  5. double gapPercentage = 0.0,
  6. TextDirection? textDirection,
})
override

Draw a vertical line at the right side of rect.

The borderSide defines the line's color and weight.

Implementation

@override
void paint(
  Canvas canvas,
  Rect rect, {
  double? gapStart,
  double gapExtent = 0.0,
  double gapPercentage = 0.0,
  TextDirection? textDirection,
}) {
  if (borderRadius.topRight != Radius.zero ||
      borderRadius.bottomRight != Radius.zero) {
    canvas.clipPath(getOuterPath(rect, textDirection: textDirection));
  }
  canvas.drawLine(rect.topRight, rect.bottomRight, borderSide.toPaint());
}