game_service_connect 0.0.14 copy "game_service_connect: ^0.0.14" to clipboard
game_service_connect: ^0.0.14 copied to clipboard

discontinuedreplaced by: games_services
PlatformAndroidiOS

A wrapper for iOS Game Center and Google Play Games Services including auth and player info, leaderboard and achievements.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';
import 'package:flutter/services.dart';
import 'package:game_service_connect/game_service_connect.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  SignInResult _results;

  @override
  void initState() {
    signIn();
    super.initState();
  }

  Future<void> signIn() async {
    SignInResult results;
    try {
      results = await GameServicesConnect.signIn;
    } on PlatformException {
      results = null;
    }
    if (!mounted) return;

    setState(() {
      _results = results ?? 'error';
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Game Services Connect'),
        ),
        body: Center(
          child: Text(
              'SIGNING ON: ${_results != null ? _results.success : 'not connected'}'),
        ),
      ),
    );
  }
}
4
likes
150
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

A wrapper for iOS Game Center and Google Play Games Services including auth and player info, leaderboard and achievements.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

flutter

More

Packages that depend on game_service_connect

Packages that implement game_service_connect