SessionMetadata class

Bookkeeping attached to a Session.

Timestamps are epoch milliseconds (portable across runtimes). expiresAt is optional: null means the session never expires on its own.

Constructors

SessionMetadata({required int createdAt, required int updatedAt, int? expiresAt})
const
SessionMetadata.fromJson(Map<String, dynamic> json)
factory
SessionMetadata.now({int? expiresAt})
Metadata stamped now with an optional expiresAt offset in milliseconds from the epoch.
factory

Properties

createdAt → int
Creation time (epoch ms).
final
expiresAt → int?
Optional expiry (epoch ms); null = no expiry.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
updatedAt → int
Last mutation time (epoch ms).
final

Methods

copyWith({int? updatedAt, int? expiresAt}) → SessionMetadata
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
toString() → String
A string representation of this object.
inherited

Operators

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