SKPaymentWrapper class

Dart wrapper around StoreKit's SKPayment.

Used as the parameter to initiate a payment. In general, a developer should not need to create the payment object explicitly; instead, use SKPaymentQueueWrapper.addPayment directly with a product identifier to initiate a payment.

Annotations
  • @immutable
  • @JsonSerializable(createToJson: true)

Constructors

SKPaymentWrapper({required String productIdentifier, String? applicationUsername, String? requestData, int quantity = 1, bool simulatesAskToBuyInSandbox = false, SKPaymentDiscountWrapper? paymentDiscount})
Creates a new SKPaymentWrapper with the provided information.
const
SKPaymentWrapper.fromJson(Map<String, dynamic> map)
Constructs an instance of this from a key value map of data.
factory

Properties

applicationUsername String?
An opaque id for the user's account.
final
hashCode int
The hash code for this object.
no setteroverride
paymentDiscount SKPaymentDiscountWrapper?
The details of a discount that should be applied to the payment.
final
productIdentifier String
The id for the product that the payment is for.
final
quantity int
The amount of the product this payment is for.
final
requestData String?
Reserved for future use.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
simulatesAskToBuyInSandbox bool
Produces an "ask to buy" flow in the sandbox.
final

Methods

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

Operators

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

Static Methods

convertFromPigeon(SKPaymentMessage msg) SKPaymentWrapper
Converts SKPaymentMessage into the dart equivalent