tracking method
Future<String>
tracking(
- dynamic eventInfo,
- dynamic userData
)
Implementation
Future<String> tracking(eventInfo, userData) async {
var iRInfo = {};
if (userData != null) {
iRInfo = {
'eventName': eventInfo.eventName,
'orderID': eventInfo.orderID,
'purchaseValue': eventInfo.purchaseValue,
'referrerCode': eventInfo.referrerCode,
'uniqueCode': eventInfo.uniqueCode,
'orderCustomValue': eventInfo.orderCustomValue,
'name': userData.name,
'email': userData.email,
'mobile': userData.mobile,
'customValueOne': userData.customValueOne,
'customValueTwo': userData.customValueTwo,
};
} else {
iRInfo = {
'eventName': eventInfo.eventName,
'orderID': eventInfo.orderID,
'purchaseValue': eventInfo.purchaseValue,
'referrerCode': eventInfo.referrerCode,
'uniqueCode': eventInfo.uniqueCode,
'orderCustomValue': eventInfo.orderCustomValue,
};
}
String response = await _channel.invokeMethod('tracking', iRInfo);
return response;
}