recordSessionEvent method
- SessionEventKind kind,
- String occurredAt, {
- int? durationMs,
Append one session-lifecycle event (SessionEventKind.open /
.background / .close) to the local buffer for later
at-least-once delivery — does not itself hit the network.
durationMs is only meaningful for .close (foreground session
length); leave it null for .open/.background.
Implementation
Future<void> recordSessionEvent(
SessionEventKind kind,
String occurredAt, {
int? durationMs,
}) =>
_platform.recordSessionEvent(kind, occurredAt, durationMs: durationMs);