BarcodeWidget class Null safety

Draw a barcode using String data

Inheritance

Constructors

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
factory
BarcodeWidget.fromBytes({required Uint8List 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})
Draw a barcode using Uint8List data

Properties

backgroundColor PdfColor?
The background color. this should be white or really light color
final
barcode Barcode
The type of barcode to use. use: [...]
final
box PdfRect?
The bounding box of this widget, calculated at layout time
read / write, inherited
canSpan bool
read-only, inherited
color PdfColor
The bars color should be black or really dark color
final
data Uint8List
the barcode data
final
decoration BoxDecoration?
Decoration to apply to the barcode
final
drawText bool
Whether to draw the text with the barcode
final
hashCode int
The hash code for this object. [...]
read-only, inherited
hasMoreWidgets bool
read-only, inherited
height double?
Height of the barcode with padding
final
margin EdgeInsets?
Margin to apply
final
padding EdgeInsets?
Padding to apply
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
textPadding double
Padding to add between the text and the barcode
final
textStyle TextStyle?
Text style to use to draw the text
final
width double?
Width of the barcode with padding
final

Methods

build(Context context) Widget
override
debugPaint(Context context) → void
@protected, inherited
layout(Context context, BoxConstraints constraints, {bool parentUsesSize = false}) → void
First widget pass to calculate the children layout and bounding box
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
paint(Context context) → void
Draw itself and its children, according to the calculated box.offset
inherited
restoreContext(covariant WidgetContext context) → void
Apply the context for next layout
inherited
saveContext() WidgetContext
Get unmodified mutable context object
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited