sendEvent static method
Implementation
static Future<bool> sendEvent({
required String eventName,
required String appToken,
String? identifier,
String? registration,
Map<String, dynamic> eventValues = const {},
bool conversionEvent = false,
double conversionValue = 0,
String conversionNotId = '',
}) async {
if (identifier == null && registration == null) {
throw InngageException(
'Unfortunately it was not possible send an event,'
' you need to declare the identifier or registration',
);
}
try {
await Future.microtask(
() async => await _inngageNetwork.sendEvent(
eventName: eventName,
appToken: appToken,
identifier: identifier ?? '',
registration: registration ?? '',
eventValues: eventValues,
conversionValue: conversionValue,
conversionNotId: conversionNotId,
conversionEvent: conversionEvent,
),
);
} catch (e) {
return false;
}
return true;
}