PkPass class

Constructors

PkPass({required PassData pass, required Map<String, dynamic> manifest, required List<int> sourceData, PkImage? background, PkImage? footer, PkImage? icon, PkImage? strip, PkImage? thumbnail, Map<String, Map<String, dynamic>>? languageData, Personalization? personalization, })

Properties

availableLanguages Iterable<String>
List of available languages. Each value is a language identifier as described in https://developer.apple.com/documentation/xcode/choosing-localization-regions-and-scripts
no setter
background PkImage?
The image displayed as the background of the front of the pass.
final
The image displayed on the front of the pass near the barcode.
final
hashCode int
The hash code for this object.
no setterinherited
icon PkImage?
The pass’s icon. This is displayed in notifications and in emails that have a pass attached, and on the lock screen. When it is displayed, the icon gets a shine effect and rounded corners.
final
isWebServiceAvailable bool
Indicates whether a webservices is available.
no setter
languageData Map<String, Map<String, dynamic>>?
Translations for this PkPass. Consists of a mapping of language identifier to translation key-value pairs. The language identifier looks as described in https://developer.apple.com/documentation/xcode/choosing-localization-regions-and-scripts
final
The image displayed on the front of the pass in the top left.
final
manifest Map<String, dynamic>
Mapping of files to their respective checksums. Typically not relevant for users of this package.
final
pass PassData
Data of the PkPass
final
personalization Personalization?
This file specifies the personal information requested by the signup form. It also contains a description of the program and (optionally) the program’s terms and conditions.
final
Use a 150 x 40 point png file. This logo is displayed at the top of the signup form.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sourceData List<int>
The bytes of this PkPass
final
strip PkImage?
The image displayed behind the primary fields on the front of the pass.
final
thumbnail PkImage?
An additional image displayed on the front of the pass. For example, on a membership card, the thumbnail could be used to a picture of the cardholder.
final
type PassType
The PassType of this PkPass.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
write({SignatureBuilder? signatureBuilder}) Uint8List?
Creates a PkPass file. If this instance was created via PkPass.fromBytes it overwrites the signature if possible.

Operators

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

Static Methods

fromBytes(List<int> bytes, {bool skipChecksumVerification = false, bool skipSignatureVerification = false}) PkPass
Parses bytes to a PkPass instance.
passesFromBytes(List<int> bytes, {bool skipChecksumVerification = false, bool skipSignatureVerification = false}) List<PkPass>
Parses a .pkpasses to a list of PkPasses. The mimetype of that file is application/vnd.apple.pkpasses. A .pkpasses file cna contain up to ten PkPasses.