getStats method
Gets session statistics.
Implementation
Map<String, dynamic> getStats() {
return {
'id': sessionId,
'is_empty': isSessionEmpty,
'length': sessionLength,
'age': getAge().inSeconds,
'is_expired': isExpired(),
'is_valid': isValid(),
'time_until_expiration': getTimeUntilExpiration()?.inSeconds,
'created_at': getCreatedAt()?.toIso8601String(),
'last_access': getLastAccess()?.toIso8601String(),
'has_timeout': getTimeout() != null,
'timeout_seconds': getTimeout()?.inSeconds,
};
}