WtSession class

Persistent key/value session.

Ordinary values live in SharedPreferences (base64-obfuscated, NOT encrypted — do not put secrets here). The bearer token is the one exception: whenever a value is stored under the configured WtConfig.tokenKey it is transparently redirected to FlutterSecureStorage (Android Keystore / iOS Keychain) and mirrored in a synchronous in-memory cache so get stays non-async for WtModel. Tokens written by an older release (plaintext in SharedPreferences) are migrated to secure storage on first read and the plaintext copy is scrubbed.

Constructors

WtSession()

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>
get<T>(String key) → T?
getUser() Map<String, dynamic>?
has(String key) bool
init() Future<void>
isLoggedIn() bool
login(Map<String, dynamic> userData) Future<void>
logout() Future<void>
remove(String key) Future<void>
set(String key, dynamic value) Future<void>