rotateSession static method
SessionState
rotateSession(
- SessionState? state,
- int now,
- String firstEventId,
- String firstEventTimestamp,
Implementation
static SessionState rotateSession(
SessionState? state,
int now,
String firstEventId,
String firstEventTimestamp,
) {
return SessionState(
sessionId: now,
sessionIndex: state == null ? 0 : state.sessionIndex + 1,
previousSessionId: state?.sessionId,
firstEventId: firstEventId,
firstEventTimestamp: firstEventTimestamp,
eventIndex: 0,
lastActivityAt: now,
backgroundedAt: null,
);
}