BarcodeWidget constructor

BarcodeWidget({
  1. required String data,
  2. required Barcode barcode,
  3. PdfColor color = PdfColors.black,
  4. PdfColor? backgroundColor,
  5. BoxDecoration? decoration,
  6. EdgeInsets? margin,
  7. EdgeInsets? padding,
  8. double? width,
  9. double? height,
  10. bool drawText = true,
  11. TextStyle? textStyle,
  12. 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,
    );