Skip to content

Commit e95e579

Browse files
feat: interface comments of events
1 parent 4e09885 commit e95e579

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

lib/src/events.dart

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
11
abstract class Events {
2+
/// Records a custom event with the specified values.
3+
///
4+
/// [key]: Name of the custom event, required, must not be an empty string.
5+
/// [segmentation]: Segmentation map to associate with the event, can be null. (optional)
6+
/// [count]: Count to associate with the event, should be more than zero. (optional)
7+
/// [sum]: Sum to associate with the event. (optional)
8+
/// [duration]: Duration of the event. (optional)
9+
///
10+
/// Returns a future that resolves to the result of the operation whether success or not.
211
Future<String?> recordEvent(String key, [Map<String, Object>? segmentation, int? count, double? sum, int? duration]);
12+
13+
/// Start timed event with a specified key
14+
///
15+
/// [key]: Name of the custom event, required, must not be an empty string.
16+
///
17+
/// Returns a future that resolves to the result of the operation whether success or not.
318
Future<String?> startEvent(String key);
19+
20+
/// Ends a timed event with a specified key.
21+
///
22+
/// [key]: Name of the custom event, required, must not be an empty string.
23+
/// [segmentation]: Segmentation map to associate with the event, can be null. (optional)
24+
/// [count]: Count to associate with the event, should be more than zero. Default value is 1. (optional)
25+
/// [sum]: Sum to associate with the event. Default value is 0. (optional)
26+
///
27+
/// Returns a future that resolves to the result of the operation whether success or not.
428
Future<String?> endEvent(String key, [Map<String, Object>? segmentation, int? count, double? sum]);
29+
30+
/// Cancel timed event with a specified key
31+
///
32+
/// [key]: Name of the custom event, required, must not be an empty string.
33+
///
34+
/// Returns a future that resolves to the result of the operation whether success or not.
535
Future<String?> cancelEvent(String key);
636
}

0 commit comments

Comments
 (0)