en_bot_sdk 1.0.6 en_bot_sdk: ^1.0.6 copied to clipboard
A new Flutter project.
en_bot_sdk #
Getting Started #
en_bot_sdk plugin is used for integrating ENChatBot mobile SDK into your flutter project.
Usage #
dependencies:
en_bot_sdk: ^1.0.6
import 'package:en_bot_sdk/en_bot_sdk.dart';
EnBotSdk sdk = EnBotSdk();
Object? doneObejct = await sdk.launchBot(context,
"<bot Key>",
"<bot Name>",
"<branding Key>",
"<user Id>",
100 , // <Chat history limit>
false, // <show done button>
EnBotSdk_LanguageDirection.defaultDirection, //<Language direction>
"<fonts/font name for header>",
"<fonts/font name for sub header>",
"<Assets/Images/image name>" ,
);
Android #
Add below in gradle.properties at the end of the file.
authToken=jp_6g5s2bmecnfji9odln54qatcht
Change minimum sdk version in Android/App/build.gradle
defaultConfig {
...
minSdkVersion 21
...
}
pub get #
iOS #
- Fetch dependancies
pub get #
- Go to file ios/Podfile
platform :ios, '12.0'
- Add following snippet at the end of the podfile
post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
end
end
end
Issues and workaround #
If you get below error while running for iOS
Building Flutter app for iOS - "GeneratedPluginRegistrant.m:12:9: Module 'en_bot_sdk' not found"
- Please restart your simulator
- flutter clean
- Re-run the flutter project once.
LICENSE# #
The code under MIT style.