extractPurchased function
Implementation
List<PurchasedItem>? extractPurchased(dynamic result) {
List<PurchasedItem>? decoded = json
.decode(result.toString())
.map<PurchasedItem>(
(dynamic product) =>
PurchasedItem.fromJSON(product as Map<String, dynamic>),
)
.toList();
return decoded;
}