BarcodeWidget class

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
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
getter/setter pairinherited
canSpan bool
no setterinherited
color PdfColor
The bars color should be black or really dark color
final
data Uint8List
no setter
dataBytes Uint8List?
final
dataString String?
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.
no setterinherited
hasMoreWidgets bool
no setterinherited
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.
no setterinherited
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

applyContext(covariant WidgetContext context) → void
Called before relayout to restore the saved state and restart the layout in the same conditions
inherited
build(Context context) Widget
override
cloneContext() WidgetContext
Called after layout to save the state
inherited
debugPaint(Context context) → void
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 nonexistent 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 page layout. Called before layout to prepare for next page
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