PassBarcode class

Information about a pass’s barcode.

Use with Flutter:

BarcodeWidget.fromBytes(
  barcode: Barcode.fromType(myPassBarcode.format),
  data: myPassBarcode.barcodeData,
)

Please not the spec requires you to display the altText next to the barcode in case available.

Constructors

PassBarcode({required BarcodeType format, @Deprecated('Use [barcodeData] instead') String? message, Encoding messageEncoding = utf8, Uint8List? barcodeData, required String? altText})
PassBarcode.fromJson(Map<String, Object?> json)
factory

Properties

altText String?
Text displayed near the barcode. For example, a human-readable version of the barcode data in case the barcode doesn’t scan.
final
barcodeData Uint8List
Correctly encoded byte list to be displayed in the barcode.
final
format → BarcodeType
Barcode format. For the barcode dictionary, you can use only the following values: PKBarcodeFormatQR, PKBarcodeFormatPDF417, or PKBarcodeFormatAztec. For dictionaries in the barcodes array, you may also use PKBarcodeFormatCode128.
final
hashCode int
The hash code for this object.
no setterinherited
message String
Message or payload to be displayed as a barcode.
no setter
messageEncoding Encoding
Text encoding that is used to convert the message from the string representation to a data representation to render the barcode.
final
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

Static Properties

supportedCodecs Map<String, Encoding>
the Encoding supported for messageEncoding. Can be expanded at runtime.
getter/setter pair