getRankingTopScores static method

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

Obtains the scores on the first page of a leaderboard from Huawei game server.

Implementation

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