play_game_service 0.1.1 play_game_service: ^0.1.1 copied to clipboard
A Google Play Games Service Plugin, Created for my little game app. Only support Android for now, but nullsafe
play_game_service #
A Google Play Games Services plugin for flutter
Getting Started #
-
add dependencies
dependencies: play_game_service: ^0.0.1
-
import requirements
import 'package:play_game_service/play_game_service.dart';
-
SignIn
// set scopeSnapShot=false if you don't want play with snapshots; var ret = await PlayGameService.signIn(scopeSnapShot: true);
-
Save Game Data
var ret = await PlayGameService.saveSnapShot("HashiTogether", new Uint8List(10), "description");
-
Load Game Data
var map = await PlayGameService.loadSnapShot("HashiTogether"); if(map["result"] == 0){ Uint8List data = map["data"]; // TODO Now you have data, do what you want. return true; } else { return false; }