IAPItem.fromJSON constructor

IAPItem.fromJSON(
  1. Map<String, dynamic> json
)

Create IAPItem from a Map that was previously JSON formatted

Implementation

IAPItem.fromJSON(Map<String, dynamic> json)
    : productId = json['productId'] as String?,
      price = json['price'] as String?,
      currency = json['currency'] as String?,
      localizedPrice = json['localizedPrice'] as String?,
      title = json['title'] as String?,
      description = json['description'] as String?,
      introductoryPrice = json['introductoryPrice'] as String?,
      introductoryPricePaymentModeIOS =
          json['introductoryPricePaymentModeIOS'] as String?,
      introductoryPriceNumberOfPeriodsIOS =
          json['introductoryPriceNumberOfPeriodsIOS'] as String?,
      introductoryPriceSubscriptionPeriodIOS =
          json['introductoryPriceSubscriptionPeriodIOS'] as String?,
      introductoryPriceNumberIOS =
          json['introductoryPriceNumberIOS'] as String?,
      subscriptionPeriodNumberIOS =
          json['subscriptionPeriodNumberIOS'] as String?,
      subscriptionPeriodUnitIOS =
          json['subscriptionPeriodUnitIOS'] as String?,
      subscriptionPeriodAndroid =
          json['subscriptionPeriodAndroid'] as String?,
      signatureAndroid = json['signatureAndroid'] as String?,
      iconUrl = json['iconUrl'] as String?,
      originalJson = json['originalJson'] as String?,
      originalPrice = json['originalPrice'].toString(),
      discountsIOS = _extractDiscountIOS(json['discounts']),
      subscriptionOffersAndroid =
          _extractSubscriptionOffersAndroid(json['subscriptionOffers']);