shouldRotateOnResume static method

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

Implementation

static bool shouldRotateOnResume(
  SessionState? state,
  int now, {
  int backgroundSessionTimeout = 0,
}) {
  if (state?.backgroundedAt == null || backgroundSessionTimeout <= 0) {
    return false;
  }

  return now - state!.backgroundedAt! > backgroundSessionTimeout;
}