paint method

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

Draw a rounded rectangle around rect using borderRadius.

The borderSide defines the line's color and weight.

The top side of the rounded rectangle may be interrupted by a single gap if gapExtent is non-null. In that case the gap begins at gapStart - gapPadding (assuming that the textDirection is TextDirection.ltr). The gap's width is (gapPadding + gapExtent + gapPadding) * gapPercentage.

Implementation

@override
void paint(
  Canvas canvas,
  Rect rect, {
  double? gapStart = 0.0,
  double gapExtent = 0.0,
  double gapPercentage = 0.0,
  TextDirection? textDirection,
}) {
  var paint = borderSide.toPaint();
  var path = _path(canvas, rect);
  canvas.drawPath(path, paint);
}