logSpendVirtualCurrency method

Future<void> logSpendVirtualCurrency({
  1. required String itemName,
  2. required String virtualCurrencyName,
  3. required num value,
  4. Map<String, Object?>? parameters,
})

Logs the standard spend_virtual_currency event.

This event tracks the sale of virtual goods in your app and can help you identify which virtual goods are the most popular objects of purchase.

See: https://firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event.html#SPEND_VIRTUAL_CURRENCY

Implementation

Future<void> logSpendVirtualCurrency({
  required String itemName,
  required String virtualCurrencyName,
  required num value,
  Map<String, Object?>? parameters,
}) {
  _assertParameterTypesAreCorrect(parameters);

  return _delegate.logEvent(
    name: 'spend_virtual_currency',
    parameters: filterOutNulls(<String, Object?>{
      _ITEM_NAME: itemName,
      _VIRTUAL_CURRENCY_NAME: virtualCurrencyName,
      _VALUE: value,
      if (parameters != null) ...parameters,
    }),
  );
}