GamesServicesPlatform class abstract

Inheritance
  • Object
  • PlatformInterface
  • GamesServicesPlatform

Constructors

GamesServicesPlatform()
Constructs a GamesServicesPlatform.

Properties

hashCode int
The hash code for this object.
no setterinherited
isSignedIn Future<bool?>
Check to see if the user is currently signed into Game Center or Google Play Services
no setter
playerIsMultiplayerGamingRestricted Future<bool?>
Check if player is restricted from joining multiplayer games (always false on Android).
no setter
playerIsPersonalizedCommunicationRestricted Future<bool?>
Check if player is restricted from using personalized communication on the device (always false on Android).
no setter
playerIsUnderage Future<bool?>
Check if player is underage (always false on Android).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

deleteGame({required String name}) Future<String?>
Delete game with name.
getPlayerHiResImage() Future<String?>
Get the player's hi-res profile image as a base64 encoded String.
getPlayerIconImage() Future<String?>
Get the player's icon-size profile image as a base64 encoded String.
getPlayerID() Future<String?>
Get the player id. On iOS the player id is unique for your game but not other games.
getPlayerName() Future<String?>
Get the player name. On iOS the player alias is the name of the player.
getPlayerScore({dynamic iOSLeaderboardID = "", dynamic androidLeaderboardID = ""}) Future<int?>
Get player score for a specific leaderboard.
getSavedGames() Future<String?>
Get all saved games.
hideAccessPoint() Future<String?>
Hide the iOS Access Point.
increment({required Achievement achievement}) Future<String?>
Increment an achievement. Achievement takes two parameters: androidID the achievement id for android. steps If the achievement is of the incremental type you can use this method to increment the steps.
loadAchievements() Future<String?>
Get achievements as json data. To show the prebuilt system screen use showAchievements.
loadGame({required String name}) Future<String?>
Load game with name.
loadLeaderboardScores({dynamic iOSLeaderboardID = "", dynamic androidLeaderboardID = "", required PlayerScope scope, required TimeScope timeScope, required int maxResults}) Future<String?>
Get leaderboard scores as a json data. To show the prebuilt system screen use showLeaderboards.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
saveGame({required String data, required String name}) Future<String?>
Save game with data and a unique name. The name must be between 1 and 100 non-URL-reserved characters (a-z, A-Z, 0-9, or the symbols "-", ".", "_", or "~").
showAccessPoint(AccessPointLocation location) Future<String?>
Show the iOS Access Point.
showAchievements() Future<String?>
It will open the achievements screen.
showLeaderboards({dynamic iOSLeaderboardID = "", dynamic androidLeaderboardID = ""}) Future<String?>
It will open the leaderboards screen.
signIn({bool shouldEnableSavedGame = false}) Future<String?>
To sign in the user. If you pass shouldEnableSavedGame, a drive scope will be will be added to GoogleSignInOptions. This will happed just android as for iOS/macOS nothing is required to be sent when authenticate. You need to call the sign in before making any action, (like sending a score or unlocking an achievement).
signOut() Future<String?>
To sign the user out of Google Play Services. After calling, you can no longer make any actions on the user's account.
submitScore({required Score score}) Future<String?>
Submit a score to specific leader board. Score takes three parameters: androidLeaderboardID the leader board id that you want to send the score for in case of android. iOSLeaderboardID the leader board id that you want to send the score for in case of iOS. value the score.
toString() String
A string representation of this object.
inherited
unlock({required Achievement achievement}) Future<String?>
Unlock an achievement. Achievement takes three parameters: androidID the achievement id for android. iOSID the achievement id for iOS. percentComplete the completion percent of the achievement, this parameter is optional in case of iOS.

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance GamesServicesPlatform
The default instance of GamesServicesPlatform to use.
getter/setter pair