logUnlockAchievement method
Logs the standard unlock_achievement
event with a given achievement
id
.
Log this event when the user has unlocked an achievement in your game. Since achievements generally represent the breadth of a gaming experience, this event can help you understand how many users are experiencing all that your game has to offer.
Implementation
Future<void> logUnlockAchievement({
required String id,
Map<String, Object?>? parameters,
}) {
_assertParameterTypesAreCorrect(parameters);
return _delegate.logEvent(
name: 'unlock_achievement',
parameters: filterOutNulls(<String, Object?>{
_ACHIEVEMENT_ID: id,
if (parameters != null) ...parameters,
}),
);
}