tambi_flutter_sdk 0.1.5 copy "tambi_flutter_sdk: ^0.1.5" to clipboard
tambi_flutter_sdk: ^0.1.5 copied to clipboard

Effortless cx automation for startups

💬 Tambi SDK

A Flutter plugin for integrating Tambi SDK in your mobile app.

Usage #

To use this plugin, add tambi_sdk as a dependency in your pubspec.yaml file.

import 'package:tambi_flutter_sdk/tambi_flutter_sdk.dart';

Initialize the Tambi sdk with appId, appKey which you could get from here: Where to find App ID & App Key

It has following [TambiSDKConfig] properties:

Update the user info by setting by creating a TambichatUser object

 TambichatUser user = TambichatUser();
 user.setEmail("ahmed@asake.com");
 user.setFirstName("Ahmed");
 user.setLastName("Ololade");
 user.setPhone("+234800000000");
 user.setLocation("Lagos, Nigeria");

Create an SDK options for styling

TambiSdkOptions options =  TambiSdkOptions(
        appName: "Example App",
        chatColor: Color(0xFF0D4D3B),
        logoUrl: "https://firebasestorage.googleapis.com/v0/b/tambi-sdk.appspot.com/o/PHOTO-2024-04-24-21-33-11.jpg?alt=media&token=5ce76a95-1fb5-4547-81a6-1ada012d2970")

Initialize the SDK to setup a user

await TambiSDK.setUpTambiUser(
  appId: 'YOUR_APP_ID_HERE',
  appKey: 'YOUR_APP_KEY_HERE',
  userData: user,
  sdkOptions: options
  );

Open the support dialog that opens the chat screen

await TambiSDK.openDialog(BuildContext context);

A boolean value to determine whether a notification is from the SDK

await TambiSDK.isTambiNotification(Map pushData);

Reset user data at logout or when deemed appropriate based on user action in the app.

await TambiSDK.resetUser();

Example #

Find the example wiring in the TambiSDK example application.

API details #

See the tambi_sdk.dart for more API details

Issues and feedback #

Please file issues to send feedback or report a bug. Thank you!