Barcode class
Information about a pass’s barcode.
- Annotations
-
- @JsonSerializable(includeIfNull: false)
Constructors
- Barcode({String? altText, required PkPassBarcodeType format, required String message, required String messageEncoding})
-
Barcode.fromJson(Map<
String, dynamic> json) -
Creates an instance of Barcode from a JSON object
factory
Properties
- altText → String?
-
Optional. Text displayed near the barcode. For example, a human-readable
version of the barcode data in case the barcode doesn’t scan.
final
- format → PkPassBarcodeType
-
Required. 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
-
Required. Message or payload to be displayed as a barcode.
final
- messageEncoding → String
-
Required. Text encoding that is used to convert the message from the
string representation to a data representation to render the barcode.
The value is typically iso-8859-1, but you may use another encoding that
is supported by your barcode scanning infrastructure.
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
-
toJson(
) → Map< String, dynamic> - Converts this instance to a JSON object
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited