Implementation
Map<String, dynamic> get toMap {
Map<String, dynamic> configMap = {
'apiKey': _apiKey,
'secretKey': _secretKey,
'skAdNetworkEnabled': skAdNetworkEnabled,
'clipboardAttribution': clipboardAttribution,
'manualSkanConversionManagement': manualSkanConversionManagement,
'waitForTrackingAuthorizationWithTimeoutInterval':
waitForTrackingAuthorizationWithTimeoutInterval,
'shortLinkResolveTimeOut': shortLinkResolveTimeOut
};
if (singularLinksHandler != null) {
configMap['singularLinksHandler'] = 'singularLinksHandlerName';
}
if (conversionValueUpdatedCallback != null) {
configMap['conversionValueUpdatedCallback'] =
'conversionValueUpdatedCallbackName';
}
if (conversionValuesUpdatedCallback != null) {
configMap['conversionValuesUpdatedCallback'] =
'conversionValuesUpdatedCallbackName';
}
if (deviceAttributionCallback != null) {
configMap['deviceAttributionCallback'] = 'deviceAttributionCallbackName';
}
// SDID
if (customSdid != null) {
configMap['customSdid'] = customSdid;
}
if (sdidReceivedCallback != null) {
configMap['sdidReceivedCallback'] = 'sdidReceivedCallbackName';
}
if (didSetSdidCallback != null) {
configMap['didSetSdidCallback'] = 'didSetSdidCallbackName';
}
if (customUserId != null) {
configMap['customUserId'] = customUserId;
}
if (limitDataSharing != null) {
configMap['limitDataSharing'] = limitDataSharing;
}
if (imei != null) {
configMap['imei'] = imei;
}
if (facebookAppId != null) {
configMap['facebookAppId'] = facebookAppId;
}
configMap['sessionTimeout'] = sessionTimeout;
configMap['collectOAID'] = collectOAID;
configMap['enableLogging'] = enableLogging;
configMap['logLevel'] = logLevel;
configMap['espDomains'] = espDomains;
List<Map<String, dynamic>> propertiesList = [];
for (SingularGlobalProperty prop in this.globalProperties) {
propertiesList.add(prop.toMap);
}
configMap['globalProperties'] = propertiesList;
return configMap;
}