drawBarBackground method

void drawBarBackground (
  1. Canvas canvas,
  2. Size size
)

Implementation

void drawBarBackground(Canvas canvas, Size size) {
  Paint paint = Paint()
    ..color = backgroundColor
    ..style = PaintingStyle.fill
    ..strokeCap = StrokeCap.round;

  double left = 0;
  double top = 0;
  double right = size.width;
  double bottom = size.height;

  canvas.drawRRect(
      RRect.fromRectAndRadius(
        Rect.fromLTRB(left, top, right, bottom),
        Radius.circular(backgroundRadius ?? 0),
      ),
      paint);
}