diff --git a/games_services/lib/src/leaderboards.dart b/games_services/lib/src/leaderboards.dart index 45edc99..0329540 100644 --- a/games_services/lib/src/leaderboards.dart +++ b/games_services/lib/src/leaderboards.dart @@ -10,8 +10,9 @@ abstract class Leaderboards { static Future 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. @@ -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.from( @@ -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 ?? "")); } diff --git a/games_services/pubspec.lock b/games_services/pubspec.lock index 1287838..da2cf83 100644 --- a/games_services/pubspec.lock +++ b/games_services/pubspec.lock @@ -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: diff --git a/games_services/pubspec.yaml b/games_services/pubspec.yaml index 8b30256..59e2631 100644 --- a/games_services/pubspec.yaml +++ b/games_services/pubspec.yaml @@ -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: diff --git a/games_services_platform_interface/CHANGELOG.md b/games_services_platform_interface/CHANGELOG.md index ea0e8dd..fd9ab34 100644 --- a/games_services_platform_interface/CHANGELOG.md +++ b/games_services_platform_interface/CHANGELOG.md @@ -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 diff --git a/games_services_platform_interface/pubspec.yaml b/games_services_platform_interface/pubspec.yaml index 9981f6a..67612cb 100644 --- a/games_services_platform_interface/pubspec.yaml +++ b/games_services_platform_interface/pubspec.yaml @@ -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'