getPlayerCenteredRankingScores static method

Future<RankingScores> getPlayerCenteredRankingScores(
  1. String rankingId,
  2. int timeDimension,
  3. int maxResults,
  4. int offsetPlayerRank,
  5. int pageDirection,
)

Obtains scores of a leaderboard with the current player's score displayed in the page center from Huawei game server.

Implementation

static Future<RankingScores> getPlayerCenteredRankingScores(
  String rankingId,
  int timeDimension,
  int maxResults,
  int offsetPlayerRank,
  int pageDirection,
) async {
  final dynamic response = await _channel.invokeMethod(
    'RankingsClient.getPlayerCenteredRankingScores',
    <String, dynamic>{
      'rankingId': rankingId,
      'maxResults': maxResults,
      'timeDimension': timeDimension,
      'offsetPlayerRank': offsetPlayerRank,
      'pageDirection': pageDirection,
    },
  );
  return RankingScores.fromMap(Map<dynamic, dynamic>.from(response));
}