toSvgBytes method
Create an SVG file with this Barcode from Uint8List data
Implementation
@nonVirtual
String toSvgBytes(
Uint8List data, {
double x = 0,
double y = 0,
double width = 200,
double height = 80,
bool drawText = true,
String fontFamily = 'monospace',
double? fontHeight,
double? textPadding,
int color = 0x000000,
bool fullSvg = true,
double baseline = .75,
}) {
fontHeight ??= height * 0.2;
textPadding ??= height * 0.05;
final recipe = makeBytes(
data,
width: width.toDouble(),
height: height.toDouble(),
drawText: drawText,
fontHeight: fontHeight,
textPadding: textPadding,
);
return _toSvg(recipe, x, y, width, height, fontFamily, fontHeight,
textPadding, color, fullSvg, baseline);
}