BarcodeWidget constructor
BarcodeWidget({
- required String data,
- required Barcode barcode,
- PdfColor color = PdfColors.black,
- PdfColor? backgroundColor,
- BoxDecoration? decoration,
- EdgeInsets? margin,
- EdgeInsets? padding,
- double? width,
- double? height,
- bool drawText = true,
- TextStyle? textStyle,
- double textPadding = 0,
Create a BarcodeWidget
Implementation
factory BarcodeWidget({
required String data,
required Barcode barcode,
PdfColor color = PdfColors.black,
PdfColor? backgroundColor,
BoxDecoration? decoration,
EdgeInsets? margin,
EdgeInsets? padding,
double? width,
double? height,
bool drawText = true,
TextStyle? textStyle,
double textPadding = 0,
}) =>
BarcodeWidget.fromBytes(
data: utf8.encoder.convert(data),
barcode: barcode,
color: color,
backgroundColor: backgroundColor,
decoration: decoration,
margin: margin,
padding: padding,
width: width,
height: height,
drawText: drawText,
textStyle: textStyle,
textPadding: textPadding,
);