Skip to content

Commit

Permalink
update games_services_platform_interface version number
Browse files Browse the repository at this point in the history
  • Loading branch information
Abedalkareem committed Aug 8, 2024
1 parent ea98b2e commit 9949175
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 16 deletions.
28 changes: 16 additions & 12 deletions games_services/lib/src/leaderboards.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ abstract class Leaderboards {
static Future<String?> showLeaderboards(
{iOSLeaderboardID = "", androidLeaderboardID = ""}) async {
return await GamesServicesPlatform.instance.showLeaderboards(
iOSLeaderboardID: iOSLeaderboardID,
androidLeaderboardID: androidLeaderboardID);
iOSLeaderboardID: iOSLeaderboardID,
androidLeaderboardID: androidLeaderboardID,
);
}

/// Get leaderboard scores as a list. Use this to build a custom UI.
Expand All @@ -23,11 +24,12 @@ abstract class Leaderboards {
required TimeScope timeScope,
required int maxResults}) async {
final response = await GamesServicesPlatform.instance.loadLeaderboardScores(
androidLeaderboardID: androidLeaderboardID,
iOSLeaderboardID: iOSLeaderboardID,
scope: scope,
timeScope: timeScope,
maxResults: maxResults);
androidLeaderboardID: androidLeaderboardID,
iOSLeaderboardID: iOSLeaderboardID,
scope: scope,
timeScope: timeScope,
maxResults: maxResults,
);
if (response != null) {
Iterable items = json.decode(response) as List;
return List<LeaderboardScoreData>.from(
Expand All @@ -42,11 +44,13 @@ abstract class Leaderboards {
androidLeaderboardID = "",
required PlayerScope scope,
required TimeScope timeScope}) async {
final String? response = await GamesServicesPlatform.instance.getPlayerScoreObject(
androidLeaderboardID: androidLeaderboardID,
iOSLeaderboardID: iOSLeaderboardID,
scope: scope,
timeScope: timeScope);
final String? response =
await GamesServicesPlatform.instance.getPlayerScoreObject(
androidLeaderboardID: androidLeaderboardID,
iOSLeaderboardID: iOSLeaderboardID,
scope: scope,
timeScope: timeScope,
);

return LeaderboardScoreData.fromJson(json.decode(response ?? ""));
}
Expand Down
4 changes: 2 additions & 2 deletions games_services/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ packages:
dependency: "direct main"
description:
name: games_services_platform_interface
sha256: be5a69656d0b76dd03a7d3d3db5c3eec5d85c51d44c862d83761576fa6cb4f13
sha256: "3742c23afdd5ebd5498612b13dc251853fccf935f6f56ef6bf13c6e8c0c89a8d"
url: "https://pub.dev"
source: hosted
version: "4.0.1"
version: "4.0.2"
lints:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion games_services/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
flutter:
sdk: flutter

games_services_platform_interface: ^4.0.1
games_services_platform_interface: ^4.0.2
#path: ../games_services_platform_interface/
#uncomment in time of development.
# git:
Expand Down
8 changes: 8 additions & 0 deletions games_services_platform_interface/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 4.0.2
- Add getPlayerScoreObject to retrieve rank and other score data for leaderboard and time span. by @egonbeermat
- Add optional String token to methods that submit and retrieve score. by @egonbeermat
- Add optional Bool showsCompletionBanner as parameter for iOS GKAchievement.report, replacing hard-coded true. Defaults to true. by @egonbeermat
- Add resetAchievements method for iOS only, Android doesn't support this through Play Games. by @egonbeermat
- Export for player_data.dart. by @@theLee3
- Add logs to save game.

## 4.0.1
- Add ability to get Play Games auth code for use with backends by @theLee3
- Add PlayerData class to return more score holder details by @theLee3
Expand Down
2 changes: 1 addition & 1 deletion games_services_platform_interface/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: games_services_platform_interface
description: A common platform interface for the games_services plugin.
homepage: https://github.com/Abedalkareem/games_services
version: 4.0.1
version: 4.0.2

environment:
sdk: '>=2.12.0 <4.0.0'
Expand Down

0 comments on commit 9949175

Please sign in to comment.