NamiPurchase.fromMap constructor
NamiPurchase.fromMap(
- Map map
Implementation
factory NamiPurchase.fromMap(Map<dynamic, dynamic> map) {
int? expiryInt = map['expires'];
DateTime? expiry;
if (expiryInt != null && expiryInt > 0) {
expiry = DateTime.fromMillisecondsSinceEpoch(expiryInt, isUtc: false);
}
return NamiPurchase(
map['purchaseInitiatedTimestamp'],
expiry,
(map['purchaseSource'] as String)._toNamiPurchaseSource(),
map['fromNami'],
map['skuId'],
map['transactionIdentifier'],
map['localizedDescription']);
}