allPurchases static method

Future<List<NamiPurchase>> allPurchases()

Returns a list of all purchases

Implementation

static Future<List<NamiPurchase>> allPurchases() async {
  List<dynamic> dynamicPurchases = await channel.invokeMethod("allPurchases");
  List<NamiPurchase> allPurchases = List.empty(growable: true);
  dynamicPurchases.forEach((element) {
    NamiPurchase namiPurchase = NamiPurchase.fromMap(element);
    allPurchases.add(namiPurchase);
  });
  return allPurchases;
}