SessionManager class

Manager for handling authentication sessions

Properties

currentSession AuthSession?
Get the current active session
no setter
currentSessionStream Stream<AuthSession?>
Stream of current session changes
no setter
hashCode int
The hash code for this object.
no setterinherited
lastSessionId String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sessionCount int
Get sessions count
no setter

Methods

addSession(AuthSession session) Future<AuthSession>
Add a new session to the manager
allSessions() Stream<List<AuthSession>>
Get all sessions
allSessionsSync() List<AuthSession>
Get all sessions
clearAllSessions() Future<void>
Clear all sessions
dispose() → void
Dispose of resources
getSessionById(String id) AuthSession?
Get a session by ID
getSessionsByType(AuthType type) List<AuthSession>
Get sessions by type
hasSession(String id) bool
Check if a session exists
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeSession(AuthSession session) Future<void>
Remove a session from the manager
switchSession(AuthSession? session) Future<AuthSession?>
Switch to a different session
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance SessionManager
getter/setter pair