schibsted_account_sdk 0.0.1

schibsted_account_sdk #

Flutter plugin for Schibsted Account SDK

Disclaimer: This project is not maintained by Schibsted Account team. It is an independent initiative. Please report any issue or ideas directly into this repository. Pull requests are also welcome.

Getting Started #

Example project #

If you want to run the Android example project - please provide values in example/android/app/src/main/assets/schibsted_account.conf file. For more info visit the SDK Setup doc.

Android #

Configure your Android project following the steps in account-sdk-android docs

iOS #

Not supported at the moment :-( If somebody would like to add it - don't hesitate ;-)

Flutter #

Import the classes with: import 'package:schibsted_account_sdk/schibsted_account.dart';

To start the login flow, just call: SchibstedAccountPlugin.login;

To log out, just call: SchibstedAccountPlugin.logout;

You can listen to the exposed SchibstedAccountPlugin.loginEvents Stream to get the SchibstedAccountEvent login events which contain the current state. State can be a value from the SchibstedAccountState enum:

  • logged_out - user has logged out
  • logged_in - user has logged in and we have the User Data (email, displayName, ...)
  • unknown - should never happen. Would be sent if Android resultCode was unknown and not handeled by the plugin.
  • canceled - user cancels the Login flow.
  • fetching - user has logged in and we start to fetch the User Data (email, displayName, ...)
  • error - when the SDK fails at some point

For more reference on how to use the plugin check the example project in this repo.


  • [ ] Implement iOS
  • [ ] Write tests

0.0.1 #

Android support only at the moment. Working features:

  • Login with the SDK UI (also with SmartLock)
  • Logout
  • Reading the displayName, id, email and photo of a logged in user.
  • Errors from the SDK are passed to Flutter


schibsted_account_sdk_example #

Demonstrates how to use the schibsted_account_sdk plugin.

Getting Started #

If you want to run the Android example project - please provide values in example/android/app/src/main/assets/schibsted_account.conf file. For more info visit the SDK Setup doc.

Use this package as a library

1. Depend on it

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

  schibsted_account_sdk: ^0.0.1

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:schibsted_account_sdk/models/schibsted_account_error.dart';
import 'package:schibsted_account_sdk/models/schibsted_account_event.dart';
import 'package:schibsted_account_sdk/models/schibsted_account_state.dart';
import 'package:schibsted_account_sdk/models/schibsted_account_user_data.dart';
import 'package:schibsted_account_sdk/schibsted_account.dart';
import 'package:schibsted_account_sdk/schibsted_account_plugin.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 25, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5
  • Flutter: 1.12.13+hotfix.7

Health issues and suggestions

Document public APIs. (-1 points)

57 out of 57 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/models/schibsted_account_event.dart.

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

Format lib/models/schibsted_account_state.dart.

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

Format lib/models/schibsted_account_user_data.dart.

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

Format lib/schibsted_account.dart.

Run flutter format to format lib/schibsted_account.dart.

Format lib/schibsted_account_plugin.dart.

Run flutter format to format lib/schibsted_account_plugin.dart.

Maintenance suggestions

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.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.8
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies