PassJson class

A JSON dictionary that defines the pass.

Annotations
  • @JsonSerializable()

Constructors

PassJson({required int formatVersion, required String passTypeIdentifier, required String description, required String teamIdentifier, required String organizationName, required String serialNumber, PassStructureDictionary? storeCard, PassStructureDictionary? coupon, PassStructureDictionary? generic, PassStructureDictionary? eventTicket, PassStructureDictionary? boardingPass, Color? labelColor, Color? backgroundColor, Color? foregroundColor, String? webServiceURL, String? authenticationToken, List<int>? associatedStoreIdentifiers, String? appLaunchURL, String? expirationDate, bool? voided, String? groupingIdentifier, String? logoText, bool? suppressStripShine, List<Barcode>? barcodes, Barcode? barcode, List<Location>? locations, int? maxDistance, String? relevantDate})
Creates a new PassJson
const
PassJson.fromJson(Map<String, dynamic> json)
Convert from 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
barcode Barcode?
Optional. Information specific to the pass’s barcode. For this dictionary’s keys, see Barcode Dictionary Keys. Note:Deprecated in iOS 9.0 and later; use barcodes instead.
final
barcodes List<Barcode>?
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. Note: Available only in iOS 9.0 and later.
final
boardingPass PassStructureDictionary?
Information specific to a boarding pass.
final
coupon PassStructureDictionary?
Information specific to a coupon.
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 PassStructureDictionary?
Information specific to an 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. Available in iOS 7.0.
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 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. Use this to group passes that are tightly related, such as the boarding passes for different connections of the same trip. Available in iOS 7.0.
final
hashCode int
The hash code for this object.
no setterinherited
labelColor Color?
Optional. Color of the label text. If omitted, the label color is determined automatically.
final
locations List<Location>?
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. Available in iOS 7.0.
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
storeCard PassStructureDictionary?
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
suppressStripShine bool?
Optional. If true, the strip image is displayed without a shine effect. The default value prior to iOS 7.0 is false. In iOS 7.0, a shine effect is never applied, and this key is deprecated.
final
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. Available in iOS 7.0.
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>
Convert to json
toString() String
A string representation of this object.
inherited

Operators

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