Usage
Import it
import 'package:engage_plugin/engage_plugin.dart';
Initialization
final _engagePlugin = EngagePlugin();
var initConfig = InitConfig(
"TenantId",
"Token",
"ServerUrl(optional)",
"cdnServerUrl(optional)",
chatOverlayVisibility: Bool(optional, default value is true),
deeplinkUrls: List<String>(optional),
"overlayBackgroundColor(<Hex Color Code> - optional)",
"controlsColor(<Hex Color Code> - optiona)");
You may initialize the library any time during the life of your application.
_engagePlugin.init(initConfig)
To start co-browsing you should use
_engagePlugin.startCoBrowsing()
To stop co-browsing you should use
_engagePlugin.stopCoBrowsing()
To tag a user you must enter the user info first
var tagUserInfo = TagUserInfo(
["Labels", "list"],
"Email",
"FirstName",
"LastName",
"ID",
"AssignedUser",
"ExternalToken",
{"AdditionalTagging":"Data"});
_engagePlugin.tagUser(tagUserInfo)
To clear a user you should use
_engagePlugin.clear()
For a better reference on how to use the plugin you can check this example.