QrBarType enum

Defines the supported barcode and QR code formats for generation and scanning.

This enum represents various 1D and 2D code formats that can be used throughout the package for consistent type handling between scanning and generation operations.

Example usage:

// Create a QR code
QrBarGenView(data: 'https://flutter.dev', type: QrBarType.qr);

// Handle a scanned barcode
onScan: (result) {
  if (result.type == QrBarType.ean13) {
    // Handle product code
  }
}
Inheritance
Available extensions

Values

qr → const QrBarType

QR Code (2D)

A popular square-shaped 2D barcode that can store various types of data. Supports up to several kilobytes of data, including URLs, text, and more. Has strong error correction capabilities and is widely used in mobile applications.

c128 → const QrBarType

Code 128 (1D)

A high-density linear barcode that can encode all 128 ASCII characters. Commonly used for shipping and packaging labels, inventory management. Supports variable length data with good data integrity.

ean13 → const QrBarType

EAN-13 (1D) – European Article Number

A 13-digit barcode used worldwide for marking retail products. First digits typically represent the country code of the manufacturer. Fixed length (13 digits) and commonly used for retail items.

upc → const QrBarType

UPC-A (1D) – Universal Product Code

A 12-digit barcode widely used for tracking retail products in the US and Canada. Fixed length (12 digits) with the first digit typically being the number system digit. Similar to EAN-13 but with one fewer digit.

pdf417 → const QrBarType

PDF417 (2D stacked linear barcode)

A stacked linear barcode format that can store up to 1.1 kilobytes of data. Often used for ID cards, shipping labels, and airline boarding passes. Has high data density and good error correction.

aztec → const QrBarType

Aztec Code (2D)

A square grid 2D barcode with a distinctive bullseye pattern in the center. Can encode up to 3000+ characters with robust error correction. Often used for travel documents and transportation tickets.

dm → const QrBarType

Data Matrix (2D)

A square or rectangular 2D barcode consisting of black and white cells. Can encode up to 2335 alphanumeric characters with excellent reliability. Often used for marking small items and in industrial applications.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
label String

Available on QrBarType, provided by the QrBarTypeExt extension

Returns a human-readable label for each barcode type.
no setter
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

values → const List<QrBarType>
A constant List of the values in this enum, in order of their declaration.