flutter_playfab 0.3.5

flutter_playfab #

A package to integrate flutter with PlayFab

Usage #

Import package:flutter_playfab/flutter_playfab.dart, and instantiate PlayFab

Implemented Endpoints #

  • Authentication
    • LoginWithIOSDeviceID
    • LoginWithAndroidDeviceID
  • Analytics
    • WritePlayerEvent

Example:

import 'package:flutter_playfab/flutter_playfab.dart';

PlayFabClientAPI.initialize("326A"); // YOUR PLAYFAB ID GOES HERE
PlayFabClientAPI.debugMode  = true; 
PlayFabClientAPI.writePlayerEvent("test_1");

PlayFabClientAPI.writePlayerEvent("test_2", {
    "Name": "Hello",
    "Year": 2019,
    "data": {"data1": 100, "data2": "2000"}
});

PlayFabClientAPI.login(
    onSuccess: (LoginResult data) {
        print("On Login Success: " + data.sessionTicket);
        PlayFabClientAPI.getTitleData(
            onSuccess: (TitleData titleData){
            }
        );
    },
    onError: () {
        print("On Login Failed");
    }
);
PlayFabClientAPI.writePlayerEvent("test_3");

[0.3.5] - 03/02/2019

  • Static Bug Fix

[0.3.4] - 03/02/2019

  • Added playfab id to PlayFabCliet Api

[0.3.3] - 02/02/2019

  • Android & iOS Push Notfication Registration

[0.3.2] - 31/01/2019

  • Match PlayFab API Naming Convention
  • Breaks all previous API's

[0.2.2] - 09/01/2019

  • EventQueue Bug Fix

[0.2.1] - 07/01/2019

  • Queue Sequence Bug Fix

[0.2.0] - 06/01/2019

  • Changed PlayFab to Static Library

[0.1.1] - 28/12/2018

  • Added MIT License

[0.1.0] - 28/12/2018

  • Login
  • Send Event Logs

example/README.md

example #

A new Flutter project.

Getting Started #

This project is a starting point for a Flutter application.

A few resources to get you started if this is your first Flutter project:

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_playfab: ^0.3.5

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_playfab/flutter_playfab.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
19
Health:
Code health derived from static analysis. [more]
91
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
60
Overall:
Weighted score of the above. [more]
49
Learn more about scoring.

We analyzed this package on Sep 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.0
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.2

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Health suggestions

Fix lib/flutter_playfab.dart. (-8.63 points)

Analysis of lib/flutter_playfab.dart reported 18 hints, including:

line 51 col 10: The class 'Future' wasn't exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 122 col 10: The class 'Future' wasn't exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 162 col 10: The class 'Future' wasn't exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 178 col 10: The class 'Future' wasn't exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

line 218 col 10: The class 'Future' wasn't exported from 'dart:core' until version 2.1, but this code is required to be able to run on earlier versions.

Format lib/models/request.dart.

Run flutter format to format lib/models/request.dart.

Format lib/models/response.dart.

Run flutter format to format lib/models/response.dart.

Maintenance issues and suggestions

Support latest dependencies. (-20 points)

The version constraint in pubspec.yaml does not support the latest published versions for 2 dependencies (device_info, shared_preferences).

The package description is too short. (-20 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
device_info ^0.3.0 0.3.0 0.4.0+2
flutter 0.0.0
http ^0.12.0 0.12.0+2
shared_preferences ^0.4.3 0.4.3 0.5.3+4
Transitive dependencies
async 2.3.0
charcode 1.1.2
collection 1.14.11 1.14.12
http_parser 3.1.3
meta 1.1.7
path 1.6.4
pedantic 1.8.0+1
sky_engine 0.0.99
source_span 1.5.5
string_scanner 1.0.5
term_glyph 1.1.0
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test