Session class
Represents a user session.
Constructors
Properties
-
data
→ Map<
String, dynamic> -
Returns the internal data map.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
The unique session identifier.
final
- isDirty → bool
-
Whether the session data has been modified.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
flush(
) → void - Clears the entire session.
-
forget(
String key) → void - Removes a value from the session.
-
get<
T> (String key) → T? - Gets a value from the session.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put(
String key, dynamic value) → void - Sets a value in the session.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
generateId(
) → String - Generates a new unique session ID.