logEarnVirtualCurrency method

Future<void> logEarnVirtualCurrency({
  1. @required String virtualCurrencyName,
  2. @required num value,
})

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,
}) {
  return logEvent(
    name: 'earn_virtual_currency',
    parameters: filterOutNulls(<String, dynamic>{
      _VIRTUAL_CURRENCY_NAME: virtualCurrencyName,
      _VALUE: value,
    }),
  );
}