trackIAPForIOS static method

void trackIAPForIOS(
  1. String identifier,
  2. String currencyCode,
  3. double amount, {
  4. List<String>? tags,
})

Implementation

static void trackIAPForIOS(
    String identifier, String currencyCode, double amount,
    {List<String>? tags}) {
  if (identifier == null || currencyCode == null || amount == null) {
    print("identifier, currencyCode or amount cannot be null!");
  } else {
    Map<String, dynamic> config = {
      "identifier": identifier,
      "currencyCode": currencyCode,
      "amount": amount,
      "tags": tags,
    };

    MethodChannel _channel = const MethodChannel('admost_flutter');
    _channel.invokeMethod('trackIAP', config);
  }
}