LeaderboardRecord.fromDto constructor
LeaderboardRecord.fromDto(
- LeaderboardRecord dto
Implementation
factory LeaderboardRecord.fromDto(api.LeaderboardRecord dto) =>
LeaderboardRecord(
leaderboardId: dto.leaderboardId,
ownerId: dto.ownerId,
username: dto.username.value,
score: dto.score.toInt(),
subscore: dto.subscore.toInt(),
numScore: dto.numScore.toInt(),
metadata: dto.metadata,
createTime:
dto.createTime.hasNanos() ? dto.createTime.toDateTime() : null,
updateTime:
dto.updateTime.hasNanos() ? dto.updateTime.toDateTime() : null,
expiryTime:
dto.expiryTime.hasNanos() ? dto.expiryTime.toDateTime() : null,
rank: dto.rank.toInt(),
maxNumScore: dto.maxNumScore.toInt(),
);