initAppgainSDKWithSubdomain method
Initializes the Appgain sdk with subdomain
appId
and appKey
are required can be found in the dashboard
subdomain
is an optional parameter to allow specifying a subdomain url
if it is not passed the dafault appgain subdomain will be used
(https://docs.appgain.io/basicIntegration/configureYourDashboard/#sdk-integration)
Implementation
Future initAppgainSDKWithSubdomain({
required String? appId,
required String? appKey,
required String subdomain,
}) async {
var data = {
'appId': appId,
'apiKey': appKey,
'configure': true,
'subdomain': subdomain,
};
try {
await _channel
.invokeMethod(_initializeAppgainSDKWithSubdomain, data)
.then((result) {
logger.d('initAppgainSDK $result');
});
return 'Success';
} on PlatformException catch (e) {
logger.d(e.toString());
return e;
}
}