logLevelUp method

Future<void> logLevelUp({
  1. required int level,
  2. String? character,
  3. Map<String, Object?>? parameters,
  4. AnalyticsCallOptions? callOptions,
})

Logs the standard level_up event.

This event signifies that a player has leveled up in your gaming app. It can help you gauge the level distribution of your userbase and help you identify certain levels that are difficult to pass.

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

Implementation

Future<void> logLevelUp({
  required int level,
  String? character,
  Map<String, Object?>? parameters,
  AnalyticsCallOptions? callOptions,
}) {
  _assertParameterTypesAreCorrect(parameters);

  return _delegate.logEvent(
    name: 'level_up',
    parameters: filterOutNulls(<String, Object?>{
      _LEVEL: level,
      _CHARACTER: character,
      if (parameters != null) ...parameters,
    }),
    callOptions: callOptions,
  );
}