PasskitPass class

Constructors

PasskitPass({required int formatVersion, required String passTypeIdentifier, required String description, required String teamIdentifier, required String organizationName, required String serialNumber, PasskitStructure? storeCard, PasskitStructure? coupon, PasskitStructure? generic, PasskitStructure? eventTicket, PasskitStructure? boardingPass, Color? labelColor, Color? backgroundColor, Color? foregroundColor, String? webServiceURL, String? authenticationToken, List<int>? associatedStoreIdentifiers, String? appLaunchURL, String? expirationDate, bool? voided, bool? sharingProhibited, String? groupingIdentifier, String? logoText, List<PasskitBarcode>? barcodes, PasskitNfc? nfc, List<PasskitLocation>? locations, int? maxDistance, String? relevantDate})
const
PasskitPass.fromJson(Map<String, dynamic> json)
factory

Properties

appLaunchURL String?
Optional. A URL to be passed to the associated app when launching it. The app receives this URL in the application:didFinishLaunchingWithOptions: and application:openURL:options: methods of its app delegate. If this key is present, the associatedStoreIdentifiers key must also be present.
final
associatedStoreIdentifiers List<int>?
Optional. A list of iTunes Store item identifiers for the associated apps. Only one item in the list is used—the first item identifier for an app compatible with the current device. If the app is not installed, the link opens the App Store and shows the app. If the app is already installed, the link launches the app.
final
authenticationToken String?
The authentication token to use with the web service. The token must be 16 characters or longer.
final
backgroundColor Color?
Optional. Background Color of the pass.
final
barcodes List<PasskitBarcode>?
Optional. 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. For this dictionary’s keys, see Barcode Dictionary Keys.
final
boardingPass PasskitStructure?
Information specific to a boarding pass card.
final
coupon PasskitStructure?
Information specific to a coupon card.
final
description String
Required. Brief description of the pass, used by the iOS accessibility technologies. Don’t try to include all of the data on the pass in its description, just include enough detail to distinguish passes of the same type.
final
eventTicket PasskitStructure?
Information specific to a event ticket.
final
expirationDate String?
Optional. Date and time when the pass expires. The value must be a complete date with hours and minutes, and may optionally include seconds.
final
foregroundColor Color?
Optional. Foreground Color of the pass.
final
formatVersion int
Required. Version of the file format. The value must be 1.
final
generic PasskitStructure?
Information specific to a generic card.
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. Use this to group passes that are tightly related, such as the boarding passes for different connections of the same trip.
final
hashCode int
The hash code for this object.
no setterinherited
labelColor Color?
Optional. Label Color of the pass. If omitted, the label color is determined automatically.
final
locations List<PasskitLocation>?
Optional. Locations where the pass is relevant. For example, the location of your store.
final
logoText String?
Optional. Text displayed next to the logo on the pass.
final
maxDistance int?
Optional. 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
nfc PasskitNfc?
Optional. An object that represents the near-field communication (NFC) payload the device passes to an Apple Pay terminal.
final
organizationName String
Required. Display name of the organization that originated and signed the pass.
final
passTypeIdentifier String
Required. Pass type identifier, as issued by Apple. The value must correspond with your signing certificate.
final
props List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
relevantDate String?
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. The value must be a complete date with hours and minutes, and may optionally include seconds.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serialNumber String
Required. Serial number that uniquely identifies the pass. No two passes with the same pass type identifier may have the same serial number.
final
sharingProhibited bool?
Optional. Indicates that the pass is shareable. The default value is false.
final
storeCard PasskitStructure?
Information specific to a store card.
final
stringify bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
teamIdentifier String
Required. Team identifier of the organization that originated and signed the pass, as issued by Apple.
final
voided bool?
Optional. Indicates that the pass is void—for example, a one time use coupon that has been redeemed. The default value is false.
final
webServiceURL String?
The URL of a web service that conforms to the API described in PassKit Web Service Reference. The web service must use the HTTPS protocol; the leading https:// is included in the value of this key. On devices configured for development, there is UI in Settings to allow HTTP web services.
final

Methods

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

Operators

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