Implementation
Map<String, String?> get toMap {
Map<String, String?> configMap = {
'sdkPrefix': sdkPrefix,
'appToken': _appToken,
'environment': _environment
.toString()
.substring(_environment.toString().indexOf('.') + 1),
};
if (userAgent != null) {
configMap['userAgent'] = userAgent;
}
if (processName != null) {
configMap['processName'] = processName;
}
if (logLevel != null) {
configMap['logLevel'] =
logLevel.toString().substring(logLevel.toString().indexOf('.') + 1);
}
if (defaultTracker != null) {
configMap['defaultTracker'] = defaultTracker;
}
if (externalDeviceId != null) {
configMap['externalDeviceId'] = externalDeviceId;
}
if (urlStrategy != null) {
configMap['urlStrategy'] = urlStrategy;
}
if (isDeviceKnown != null) {
configMap['isDeviceKnown'] = isDeviceKnown.toString();
}
if (sendInBackground != null) {
configMap['sendInBackground'] = sendInBackground.toString();
}
if (eventBufferingEnabled != null) {
configMap['eventBufferingEnabled'] = eventBufferingEnabled.toString();
}
if (needsCost != null) {
configMap['needsCost'] = needsCost.toString();
}
if (preinstallTrackingEnabled != null) {
configMap['preinstallTrackingEnabled'] =
preinstallTrackingEnabled.toString();
}
if (allowiAdInfoReading != null) {
configMap['allowiAdInfoReading'] = allowiAdInfoReading.toString();
}
if (allowAdServicesInfoReading != null) {
configMap['allowAdServicesInfoReading'] =
allowAdServicesInfoReading.toString();
}
if (allowIdfaReading != null) {
configMap['allowIdfaReading'] = allowIdfaReading.toString();
}
if (_skAdNetworkHandling != null) {
configMap['skAdNetworkHandling'] = _skAdNetworkHandling.toString();
}
if (launchDeferredDeeplink != null) {
configMap['launchDeferredDeeplink'] = launchDeferredDeeplink.toString();
}
if (_info1 != null) {
configMap['info1'] = _info1.toString();
}
if (_info2 != null) {
configMap['info2'] = _info2.toString();
}
if (_info3 != null) {
configMap['info3'] = _info3.toString();
}
if (_info4 != null) {
configMap['info4'] = _info4.toString();
}
if (_secretId != null) {
configMap['secretId'] = _secretId.toString();
}
if (delayStart != null) {
configMap['delayStart'] = delayStart.toString();
}
if (attributionCallback != null) {
configMap['attributionCallback'] = _attributionCallbackName;
}
if (sessionSuccessCallback != null) {
configMap['sessionSuccessCallback'] = _sessionSuccessCallbackName;
}
if (sessionFailureCallback != null) {
configMap['sessionFailureCallback'] = _sessionFailureCallbackName;
}
if (eventSuccessCallback != null) {
configMap['eventSuccessCallback'] = _eventSuccessCallbackName;
}
if (eventFailureCallback != null) {
configMap['eventFailureCallback'] = _eventFailureCallbackName;
}
if (deferredDeeplinkCallback != null) {
configMap['deferredDeeplinkCallback'] = _deferredDeeplinkCallbackName;
}
if (conversionValueUpdatedCallback != null) {
configMap['conversionValueUpdatedCallback'] =
_conversionValueUpdatedCallbackName;
}
return configMap;
}