logPurchaseWithContentId method

dynamic logPurchaseWithContentId(
  1. String contentId,
  2. String? contentType,
  3. double revenue,
  4. String currency,
)

Implementation

logPurchaseWithContentId(
    String contentId, String? contentType, double revenue, String currency) {
  _appsflyersdk?.logEvent(
      contentType != null && contentType == "vip"
          ? "purchase_subscription"
          : "purchase_normal",
      {
        "af_content_id": contentId,
        "af_content_type": contentType ?? "",
        "af_revenue": revenue,
        "af_currency": currency,
      });
}