Bonga Chat SDK
The Bonga Chat SDK is a Flutter package that provides a convenient way to integrate Bonga Chat into your Flutter applications.
Installation
To use the Bonga Chat SDK in your Flutter project, follow these steps:
-
Add the package to your
pubspec.yaml
file:dependencies: bonga_chat_sdk: ^1.0.4+1
-
Run
flutter pub get
to fetch the package and update your dependencies.
Usage
To integrate Bonga Chat into your app using the Bonga Chat SDK, follow these steps:
-
Import the necessary classes:
import 'package:bonga_chat_sdk/bonga_chat_sdk.dart';
-
Use the
HomePage
widget from the Bonga Chat SDK in your app:home: HomePage( apiKey: 'YOUR_API_KEY', greeting: 'Hello', message: 'How can I assist you?', ),
Replace
'YOUR_API_KEY'
with your Bonga Chat API key.
Example
Here's an example of how to integrate Bonga Chat into your Flutter app using the Bonga Chat SDK:
import 'package:bonga_chat/bonga_sdk/homepage.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return const MaterialApp(
title: 'Bonga Chat',
debugShowCheckedModeBanner: false,
home: HomePage(
apiKey: 'YOUR_API_KEY', //api key from DialAfrika
greeting: 'Hello', //Greeting Message to your customers
message: 'How can I assist you?', //Message to your customers
),
);
}
}
Requirements
- Flutter 2.0 or newer
- Bonga Chat API key
Support
For any issues or questions regarding the Bonga Chat SDK, please contact our support team at info@dialafrika.com.