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:getrollee_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
onHomeStartedcallback will run. -
When Rollee Connect's terms page starts, the
onTermsStartedcallback will run. -
When Rollee Connect's search page starts, the
onSearchStartedcallback will run. -
When Rollee Connect's login page starts, the
onLoginStartedcallback will run. -
When Rollee Connect's login page fetching starts, the
onFetchStartedcallback will run. -
When a user logs in successfully to a data source in Rollee Connect, the
onLoginSuccesscallback will run. -
When Rollee Connect's connected page starts, the
onConnectedcallback will run. -
When a user completes the Rollee Connect's flow successfully, the
onCompletedcallback will run. -
at any point of Rollee Connect's flow, if a user closes it without completing it, the
onClosecallback 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:
- The user's
sessionToken.
Example of the minimal configuration:
final config = RolleeConnectConfig(
sessionToken: "<THE-SESSION-TOKEN-HERE>",
),
Customization via Rollee Dashboard
You can personalize the Rollee Connect flow to match your brand using the Rollee Dashboard. In the dashboard, you can create customizations—such as changing colors, logos, and other UI elements. Each customization is assigned a unique customization ID.
To apply a specific customization, add the customization_id as a query parameter to the sessionToken:
final config = RolleeConnectConfig(
sessionToken: "<THE-SESSION-TOKEN-HERE>?customization_id=<YOUR-CUSTOMIZATION-ID>",
setup: RolleeConnectConfigSetup(
isProduction: true,
),
),
This will display the customized version of Rollee Connect that you configured in the dashboard for your users.
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
Libraries
- core/models/export
- core/models/rollee_connect_config
- core/models/rollee_connect_config_setup
- core/models/rollee_connect_initial_state
- core/models/rollee_connect_login_result
- core/models/rollee_connect_params
- core/models/rollee_connect_result
- core/utils/constants/api/api
- core/utils/constants/base/base
- core/utils/constants/constants
- core/utils/helpers/channel
- core/utils/helpers/helpers
- core/utils/helpers/logger
- rollee_flutter_sdk
- widget/rolle_connect