shouldRotateOnInactivity static method

bool shouldRotateOnInactivity(
  1. SessionState? state,
  2. int now, {
  3. int foregroundSessionTimeout = 0,
})

Implementation

static bool shouldRotateOnInactivity(
  SessionState? state,
  int now, {
  int foregroundSessionTimeout = 0,
}) {
  if (state == null || foregroundSessionTimeout <= 0) {
    return false;
  }

  return now - state.lastActivityAt > foregroundSessionTimeout;
}