paintBar method

void paintBar(
  1. PaintingContext context,
  2. Offset offset,
  3. BarcodeBar element
)

Implementation

void paintBar(PaintingContext context, Offset offset, BarcodeBar element) {
  if (!element.black) {
    return;
  }

  context.canvas.drawRect(
    Rect.fromLTWH(
      offset.dx + element.left,
      offset.dy + element.top,
      element.width,
      element.height,
    ),
    barStyle,
  );
}