CodeType class abstract
Barcode generation class
Constructors
- CodeType()
-
Abstract constructor
const
- CodeType.fromType(CodeGenerateType type)
-
Create a specific CodeType instance based on the CodeGenerateType
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 CodeType
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxLength → int
-
Returns maximum number of characters this CodeType can encode
no setter
- minLength → int
-
Returns minimum number of characters this CodeType can encode
no setter
- name → String
-
Returns the name of this CodeType
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}) → CodeType - Aztec
-
code128(
{bool useCode128A = true, bool useCode128B = true, bool useCode128C = true, bool escapes = false}) → CodeType - Code128 CodeType
-
code39(
) → CodeType - Code 39 CodeType
-
code93(
) → CodeType - Code 93 CodeType
-
codeBar(
{BarcodeCodeBarStartStop start = BarcodeCodeBarStartStop.A, BarcodeCodeBarStartStop stop = BarcodeCodeBarStartStop.B, bool printStartStop = false, bool explicitStartStop = false}) → CodeType - Code Bar Barcode
-
dataMatrix(
) → CodeType - Data Matrix
-
ean13(
{bool drawEndChar = false}) → CodeType - EAN 13 Barcode
-
ean2(
) → CodeType - EAN 2 Barcode
-
ean5(
) → CodeType - EAN 5 Barcode
-
ean8(
{bool drawSpacers = false}) → CodeType - EAN 8 Barcode
-
gs128(
{bool useCode128A = true, bool useCode128B = true, bool useCode128C = true, bool escapes = false}) → CodeType - GS1-128 CodeType
-
isbn(
{bool drawEndChar = false, bool drawIsbn = true}) → CodeType - ISBN Barcode
-
itf(
{bool addChecksum = false, bool zeroPrepend = false, bool drawBorder = false, double? borderWidth, double? quietWidth, int? fixedLength}) → CodeType - 2 of 5 Barcode
-
itf14(
{bool drawBorder = true, double? borderWidth, double? quietWidth}) → CodeType - ITF-14 Barcode
-
itf16(
{bool drawBorder = true, double? borderWidth, double? quietWidth}) → CodeType - ITF-16 Barcode
-
pdf417(
{Pdf417SecurityLevel securityLevel = Pdf417SecurityLevel.level2, double moduleHeight = 2.0, double preferredRatio = 3.0}) → CodeType - PDF417
-
qrCode(
{int? typeNumber, BarcodeQRCorrectionLevel errorCorrectLevel = BarcodeQRCorrectionLevel.low}) → CodeType - QR Code
-
rm4scc(
) → CodeType - RM4SCC Barcode
-
telepen(
) → CodeType - Telepen Barcode
-
upcA(
) → CodeType - UPC-A Barcode
-
upcE(
{bool fallback = false}) → CodeType - UPC-E Barcode