writeLeaderboardRecord method

  1. @override
Future<LeaderboardRecord> writeLeaderboardRecord({
  1. required Session session,
  2. required String leaderboardId,
  3. int? score,
  4. int? subscore,
  5. String? metadata,
})
override

Implementation

@override
Future<LeaderboardRecord> writeLeaderboardRecord({
  required model.Session session,
  required String leaderboardId,
  int? score,
  int? subscore,
  String? metadata,
}) async {
  return await _client.writeLeaderboardRecord(
    WriteLeaderboardRecordRequest(
      leaderboardId: leaderboardId,
      record: WriteLeaderboardRecordRequest_LeaderboardRecordWrite(
        score: score == null ? null : Int64(score),
        subscore: subscore == null ? null : Int64(subscore),
        metadata: metadata,
      ),
    ),
    options: _getSessionCallOptions(session),
  );
}