Also below is my flutter init class.
@override
void initState() {
super.initState();
print('loading zoho sales IQ');
ZohoSalesIQ.setLanguage("en");
ZohoSalesIQ.enableInAppNotification();
ZohoSalesIQ.eventChannel;
ZohoSalesIQ.knowledgeBase.setVisibility(ResourceType.articles, true);
ZohoSalesIQ.setConversationVisibility(true);
ZohoSalesIQ.setConversationListTitle("CypherX Support");
if (io.Platform.isIOS || io.Platform.isAndroid) {
print('platform is valid');
String appKey = ""; //Note, i added the actual key, just removed it for sake of this post.
String accessKey = ""; //Note, i added the actual key, just removed it for sake of this post.
// appKey = dotenv.env['ZOHO_IOS_APP_KEY'];
// accessKey = dotenv.env['ZOHO_IOS_ACCESS_KEY'];
ZohoSalesIQ.init(appKey , accessKey ).then((_) async {
print('zoho initialization successful');
// initialization successful
//ZohoSalesIQ.launcher.show(VisibilityMode.always);
ZohoSalesIQ.knowledgeBase.setVisibility(ResourceType.articles, true);
ZohoSalesIQ.setConversationVisibility(true);
ZohoSalesIQ.setConversationListTitle("CypherX Support");
var dataZoho = await ZohoSalesIQ.show();
print(dataZoho);
}).catchError((error) {
print('zoho initialization failed');
// initialization failed
print(error);
});
ZohoSalesIQ.setThemeColorForiOS("#6500D8");
}
}