endEvent static method
- @Deprecated('This function is deprecated, please use "endEvent" of events instead')
ends a timed event returns error or success message
Implementation
@Deprecated('This function is deprecated, please use "endEvent" of events instead')
static Future<String?> endEvent(Map<String, Object> options) async {
String? key = options['key'] as String?;
Map<String, Object>? segmentation = options['segmentation'] as Map<String, Object>?;
int? count = _parseValue(options, 'count', 1);
double? sum = _parseValue(options, 'sum', 0);
if (key == null) {
String message = 'endEvent, key cannot be null';
log(message);
return message;
}
await _instance.events.endEvent(key, segmentation, count, sum);
return 'endEvent called';
}