Barcode class abstract

Barcode generation class

Annotations
  • @immutable

Constructors

Barcode()
Abstract constructor
const
Barcode.fromType(BarcodeType type)
Create a specific Barcode instance based on the BarcodeType this uses only the default barcode settings. For finer-grained usage, use the static methods:
factory

Properties

charSet Iterable<int>
Returns the list of accepted codePoints for this Barcode
no setter
hashCode int
The hash code for this object.
no setterinherited
maxLength int
Returns maximum number of characters this Barcode can encode
no setter
minLength int
Returns minimum number of characters this Barcode can encode
no setter
name String
Returns the name of this Barcode
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

isValid(String data) bool
Check if the Barcode is valid
isValidBytes(Uint8List data) bool
Check if the Barcode is valid
make(String data, {required double width, required double height, bool drawText = false, double? fontHeight, double? textPadding}) Iterable<BarcodeElement>
Main method to produce the barcode graphic description. Returns a stream of drawing operations required to properly display the barcode as a UTF-8 string.
makeBytes(Uint8List data, {required double width, required double height, bool drawText = false, double? fontHeight, double? textPadding}) Iterable<BarcodeElement>
Generate the barcode graphic description like make but takes a Uint8List data.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override
toSvg(String 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}) String
Create an SVG file with this Barcode from String data
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}) String
Create an SVG file with this Barcode from Uint8List data
verify(String data) → void
Check if the Barcode is valid. Throws BarcodeException with a proper message in case of error
verifyBytes(Uint8List data) → void
Check if the Barcode is valid. Throws BarcodeException with a proper message in case of error

Operators

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

Static Methods

aztec({int minECCPercent = BarcodeAztec.defaultEcPercent, int userSpecifiedLayers = BarcodeAztec.defaultLayers}) Barcode
Aztec
codabar({BarcodeCodabarStartStop start = BarcodeCodabarStartStop.A, BarcodeCodabarStartStop stop = BarcodeCodabarStartStop.B, bool printStartStop = false, bool explicitStartStop = false}) Barcode
Codabar Barcode
code128({bool useCode128A = true, bool useCode128B = true, bool useCode128C = true, bool escapes = false}) Barcode
Code128 Barcode
code39({bool drawSpacers = true}) Barcode
Code 39 Barcode
code93() Barcode
Code 93 Barcode
dataMatrix() Barcode
Data Matrix
ean13({bool drawEndChar = false}) Barcode
EAN 13 Barcode
ean2() Barcode
EAN 2 Barcode
ean5() Barcode
EAN 5 Barcode
ean8({bool drawSpacers = false}) Barcode
EAN 8 Barcode
gs128({bool useCode128A = true, bool useCode128B = true, bool useCode128C = true, bool escapes = false, bool addSpaceAfterParenthesis = true, bool keepParenthesis = false}) Barcode
GS1-128 Barcode
isbn({bool drawEndChar = false, bool drawIsbn = true}) Barcode
ISBN Barcode
itf({bool addChecksum = false, bool zeroPrepend = false, bool drawBorder = false, double? borderWidth, double? quietWidth, int? fixedLength}) Barcode
2 of 5 Barcode
itf14({bool drawBorder = true, double? borderWidth, double? quietWidth}) Barcode
ITF-14 Barcode
itf16({bool drawBorder = true, double? borderWidth, double? quietWidth}) Barcode
ITF-16 Barcode
pdf417({Pdf417SecurityLevel securityLevel = Pdf417SecurityLevel.level2, double moduleHeight = 2.0, double preferredRatio = 3.0}) Barcode
PDF417
qrCode({int? typeNumber, BarcodeQRCorrectionLevel errorCorrectLevel = BarcodeQRCorrectionLevel.low}) Barcode
QR Code
rm4scc() Barcode
RM4SCC Barcode
telepen() Barcode
Telepen Barcode
upcA() Barcode
UPC-A Barcode
upcE({bool fallback = false}) Barcode
UPC-E Barcode