PassMetadata class

Information that is required for all passes.

Constructors

PassMetadata({required String description, required int formatVersion, required String organizationName, required String passTypeIdentifier, required String serialNumber, required String teamIdentifier, String? appLaunchURL, DateTime? expirationDate, bool voided = false, List<Beacon> beacons = const [], List<Location> locations = const [], int? maxDistance, DateTime? relevantDate, PassStructureDictionary? boardingPass, PassStructureDictionary? coupon, PassStructureDictionary? eventTicket, PassStructureDictionary? generic, PassStructureDictionary? storeCard, List<PassBarcode> barcodes = const [], int? backgroundColor, int? foregroundColor, String? groupingIdentifier, int? labelColor, String? logoText, PassWebService? webService})
const
PassMetadata.fromJson(Map<String, Object?> json)
factory

Properties

appLaunchURL → String?
A URL to be passed to the associated app when launching it.
final
backgroundColor → int?
Background color of the pass.
final
barcodes → List<PassBarcode>
Information specific to the pass’s barcode. The system uses the first valid barcode dictionary in the array. Additional dictionaries can be added as fallbacks.
final
beacons → List<Beacon>
Beacons marking locations where the pass is relevant.
final
boardingPass → PassStructureDictionary?
Information specific to a boarding pass.
final
coupon → PassStructureDictionary?
Information specific to a coupon.
final
description → String
Brief description of the pass, used by accessibility technologies.
final
eventTicket → PassStructureDictionary?
Information specific to an event ticket.
final
expirationDate → DateTime?
Date and time when the pass expires.
final
foregroundColor → int?
Foreground color of the pass.
final
formatVersion → int
Version of the file format. The value must be 1.
final
generic → PassStructureDictionary?
Information specific to a generic pass.
final
groupingIdentifier → String?
Optional for event tickets and boarding passes; otherwise not allowed. Identifier used to group related passes. If a grouping identifier is specified, passes with the same style, pass type identifier, and grouping identifier are displayed as a group. Otherwise, passes are grouped automatically.
final
hashCode → int
The hash code for this object.
no setterinherited
labelColor → int?
Color of the label text.
final
locations → List<Location>
Locations where the pass is relevant. For example, the location of your store.
final
logoText → String?
Text displayed next to the logo on the pass.
final
maxDistance → int?
Maximum distance in meters from a relevant latitude and longitude that the pass is relevant. This number is compared to the pass’s default distance and the smaller value is used.
final
organizationName → String
Display name of the organization that originated and signed the pass.
final
passTypeIdentifier → String
Pass type identifier, as issued by Apple. The value must correspond with your signing certificate.
final
relevantDate → DateTime?
Recommended for event tickets and boarding passes; otherwise optional. Date and time when the pass becomes relevant. For example, the start time of a movie.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
serialNumber → String
Serial number that uniquely identifies the pass. No two passes with the same pass type identifier may have the same serial number.
final
storeCard → PassStructureDictionary?
Information specific to a store card.
final
teamIdentifier → String
Team identifier of the organization that originated and signed the pass, as issued by Apple.
final
voided → bool
Indicates that the pass is void—for example, a one time use coupon that has been redeemed. The default value is false.
final
webService → PassWebService?
Information used to update passes using the web service.
final

Methods

getLocalizedDescription(PassFile pass, Locale? locale) → String
Localized version of description based on given locale and pass.
getLocalizedLogoText(PassFile pass, Locale? locale) → String?
Localized version of logoText based on given locale and pass.
getLocalizedOrganizationName(PassFile pass, Locale? locale) → String
Localized version of organizationName based on given locale and pass.
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