createUID2ExtraMap method
Map?
createUID2ExtraMap(
{
})
Implementation
Map? createUID2ExtraMap({
String? subscriptionID,
String? serverPublicKey,
String? email,
String? emailHash,
String? phone,
String? phoneHash,
String? appName,
String? customURLString,
bool isTestMode = false,
}) {
Map extraMap = {};
if (subscriptionID != null)
{
extraMap['subscriptionID'] = subscriptionID;
}
else
{
print("---UID2ExtraMap.subscriptionID can not be null ---");
return null;
}
if (serverPublicKey != null)
{
extraMap['serverPublicKey'] = serverPublicKey;
}
else
{
print("---UID2ExtraMap.serverPublicKey can not be null ---");
return null;
}
if(email == null && emailHash == null && phone == null && phoneHash == null)
{
print("---UID2ExtraMap email,emailHash,phone,phoneHash set at least one---");
return null;
}
if (email != null)
{
extraMap['email'] = email;
}
if (emailHash != null)
{
extraMap['emailHash'] = emailHash;
}
if (phone != null)
{
extraMap['phone'] = phone;
}
if (phoneHash != null)
{
extraMap['phoneHash'] = phoneHash;
}
if (appName != null)
{
extraMap['appName'] = appName;
}
extraMap['isTestMode'] = isTestMode;
if (customURLString != null)
{
extraMap['customURLString'] = customURLString;
}
return extraMap;
}