OwnedPurchasesResult.fromMap constructor
OwnedPurchasesResult.fromMap(
- String source
Implementation
factory OwnedPurchasesResult.fromMap(String source) {
Map<String, dynamic> jsonMap = json.decode(source);
return OwnedPurchasesResult(
continuationToken: jsonMap['continuationToken'],
errMsg: jsonMap['errMsg'],
inAppPurchaseDataList: jsonMap['inAppPurchaseDataList'] == null
? null
: List<InAppPurchaseData>.from(
jsonMap['inAppPurchaseDataList']
.map((dynamic x) => InAppPurchaseData.fromJson(x)),
).toList(),
inAppSignature: jsonMap['inAppSignature'] == null
? null
: List<String>.from(jsonMap['inAppSignature'].map((dynamic x) => x)),
itemList: jsonMap['itemList'] == null
? null
: (jsonMap['itemList'] as List<dynamic>)
.map((dynamic e) => e.toString())
.toList(),
returnCode: jsonMap['returnCode']?.toString(),
status:
jsonMap['status'] == null ? null : Status.fromMap(jsonMap['status']),
placedInappPurchaseDataList:
jsonMap['placedInappPurchaseDataList'] == null
? null
: List<String>.from(jsonMap['placedInappPurchaseDataList']),
placedInappSignatureList: jsonMap['placedInappSignatureList'] == null
? null
: List<String>.from(jsonMap['placedInappSignatureList']),
signatureAlgorithm: jsonMap['signatureAlgorithm'],
rawValue: source,
);
}