getSessionCount method

int getSessionCount(
  1. String userId
)

Gets session count for a user

Implementation

int getSessionCount(String userId) {
  return _activeSessions.values
      .where((session) => session.userId == userId && !session.isExpired)
      .length;
}