trackIAPForAndroid static method

void trackIAPForAndroid(
  1. String originalJSON,
  2. String signature,
  3. String currencyCode,
  4. double price, {
  5. List<String>? tags,
})

Implementation

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

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