setEntitlements static method

Future<void> setEntitlements(
  1. List<NamiEntitlementSetter> entitlements
)

Implementation

static Future<void> setEntitlements(
    List<NamiEntitlementSetter> entitlements) async {
  List<Map<String, dynamic>> list = List.empty(growable: true);
  entitlements.forEach((element) {
    var variableMap = {
      'referenceId': element.referenceId,
      "expires": element.expires?.millisecondsSinceEpoch,
      "platform": describeEnum(element.platform),
      "purchasedSKUid": element.purchasedSKUid,
    };
    list.add(variableMap);
  });
  return await channel.invokeMethod("setEntitlements", list);
}