convertToPigeon static method

SKProductMessage convertToPigeon(
  1. SKProductWrapper wrapper
)

Convert from SKProductWrapper to SKProductMessage

Implementation

static SKProductMessage convertToPigeon(SKProductWrapper wrapper) {
  return SKProductMessage(
      productIdentifier: wrapper.productIdentifier,
      localizedTitle: wrapper.localizedTitle,
      localizedDescription: wrapper.localizedDescription,
      priceLocale: SKPriceLocaleWrapper.convertToPigeon(wrapper.priceLocale),
      price: wrapper.price,
      subscriptionGroupIdentifier: wrapper.subscriptionGroupIdentifier,
      subscriptionPeriod: wrapper.subscriptionPeriod != null
          ? SKProductSubscriptionPeriodWrapper.convertToPigeon(
              wrapper.subscriptionPeriod!)
          : null,
      introductoryPrice: wrapper.introductoryPrice != null
          ? SKProductDiscountWrapper.convertToPigeon(
              wrapper.introductoryPrice!)
          : null,
      discounts: wrapper.discounts
          .map((SKProductDiscountWrapper? e) =>
              SKProductDiscountWrapper.convertToPigeon(e!))
          .toList());
}