logEarnVirtualCurrency method

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

Logs the standard earn_virtual_currency event.

This event tracks the awarding of virtual currency in your app. Log this along with logSpendVirtualCurrency to better understand your virtual economy.

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

Implementation

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

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