drawBarcodeBytes function
void
drawBarcodeBytes(})
Create a Barcode
Implementation
void drawBarcodeBytes(
Image image,
Barcode barcode,
Uint8List bytes, {
int x = 0,
int y = 0,
int? width,
int? height,
BitmapFont? font,
int? textPadding,
int color = 0xff000000,
}) {
width ??= image.width;
height ??= image.height;
textPadding ??= 0;
final recipe = barcode.makeBytes(
bytes,
width: width.toDouble(),
height: height.toDouble(),
drawText: font != null,
fontHeight: font?.lineHeight.toDouble(),
textPadding: textPadding.toDouble(),
);
_drawBarcode(image, recipe, x, y, font, color);
}