SessionService class

A service to manage session data key-by-key.

Constructors

SessionService()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

destroy() Future<void>
Destroy the entire session
get(String key) Future
Retrieve a value from the session by key
init(Request request, Response response) → void
Initialize per request
remove(String key) Future<void>
Remove a key from the session
set(String key, dynamic value, {Duration? ttl}) Future<void>
Save a value to the session under the specified key