rollee_flutter_sdk 1.0.2 copy "rollee_flutter_sdk: ^1.0.2" to clipboard
rollee_flutter_sdk: ^1.0.2 copied to clipboard

Rollee Connect Flutter SDK

RolleeLogo

Rollee Connect Flutter SDK #

Rollee Connect Flutter SDK is a used for integrating Rollee Connect process into your app easily.

What it Supports? #

Android SDK 19+ or 20+

iOS 11.0+

Usage #

The RolleeConnect widget represents a view that you can integrate into your app's flow, with your customized configuration and callback handlers that are passed as its properties.

import 'package:rollee_flutter_sdk/rollee_flutter_sdk.dart';

//...

RolleeConnect(
  config: const RolleeConnectConfig(
    token: "<YOUR-TOKEN-HERE>",
    sessionToken: "<THE-SESSION-TOKEN-HERE>",
  ),
  onCompleted: (result) {
    print("onCompleted $result");
  },
  onClose: (close) {
    print("onClose $close");
  },
  onLoginSuccess: (loginResult) {
    print("onLoginSuccess $loginResult");
  },
),

Callbacks #

The RolleeConnect widget can be customized with many callbacks that let you trigger your users events during the Rollee Connect flow :

  • When Rollee Connect's home page starts, the onHomeStarted callback will run.

  • When Rollee Connect's terms page starts, the onTermsStarted callback will run.

  • When Rollee Connect's search page starts, the onSearchStarted callback will run.

  • When Rollee Connect's login page starts, the onLoginStarted callback will run.

  • When Rollee Connect's login page fetching starts, the onFetchStarted callback will run.

  • When a user logs in successfully to a data source in Rollee Connect, the onLoginSuccess callback will run.

  • When Rollee Connect's connected page starts, the onConnected callback will run.

  • When a user completes the Rollee Connect's flow successfully, the onCompleted callback will run.

  • at any point of Rollee Connect's flow, if a user closes it without completing it, the onClose callback will run.

Configuration #

To define a user Session on RolleeConnect, you must set a RolleeConnectConfig object to the config property, with providing its mandatory parameters:

  • Your token
  • The user's sessionToken.

Example of the minimal configuration:

final config = RolleeConnectConfig(
   token: "<YOUR-TOKEN-HERE>",
   sessionToken: "<THE-SESSION-TOKEN-HERE>",
),

Example of more customized configuration:

final config = RolleeConnectConfig(
   token: "<YOUR-TOKEN-HERE>",
   sessionToken: "<THE-SESSION-TOKEN-HERE>",
   setup: RolleeConnectConfigSetup(
     isProduction: false,
     introScreenSkip: false,
     introScreenTitle: "Lets link your work accounts"
     ctaTextColor: Colors.red,
     ctaBackgroundColor: Colors.purple,
     removeCloseButton: false,
     partnerLogoUrl: 'https://somedomain.com/your_logo.png',
     datasource: '<datasource-uuid>'
  ),
),

the setup properties are optional, not setting or ignoring them will make the SDK uses the default values instead.

But, when your app is going to production, don't forget to set the isProduction property to true.

API reference #

Full API reference from here

1
likes
60
points
35
downloads

Publisher

verified publisherrollee.io

Weekly Downloads

Rollee Connect Flutter SDK

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

equatable, flutter, http, meta, webview_flutter

More

Packages that depend on rollee_flutter_sdk