PurchasedItem.fromJSON constructor
Create PurchasedItem from a Map that was previously JSON formatted
Implementation
PurchasedItem.fromJSON(Map<String, dynamic> json)
: productId = json['productId'] as String?,
transactionId = json['transactionId'] as String?,
transactionDate = _extractDate(json['transactionDate']),
transactionReceipt = json['transactionReceipt'] as String?,
purchaseToken = json['purchaseToken'] as String?,
dataAndroid = json['dataAndroid'] as String?,
signatureAndroid = json['signatureAndroid'] as String?,
isAcknowledgedAndroid = json['isAcknowledgedAndroid'] as bool?,
autoRenewingAndroid = json['autoRenewingAndroid'] as bool?,
purchaseStateAndroid =
_decodePurchaseStateAndroid(json['purchaseStateAndroid'] as int?),
originalTransactionDateIOS =
_extractDate(json['originalTransactionDateIOS']),
originalTransactionIdentifierIOS =
json['originalTransactionIdentifierIOS'] as String?,
transactionStateIOS =
_decodeTransactionStateIOS(json['transactionStateIOS'] as int?);