UserPrefsDatasource class

Thin wrapper around SharedPreferences for non-secret, device-local user prefs. Use flutter_secure_storage for anything sensitive (API keys, auth tokens). This class is safe to instantiate multiple times — all instances talk to the same underlying storage.

Constructors

UserPrefsDatasource({SharedPreferences? prefs})

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

getLastActiveOrgId() Future<String?>
getLastUsedMode() Future<String>
Returns 'personal' or 'org'. Defaults to 'personal' when unset.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setLastActiveOrgId(String orgId) Future<void>
setLastUsedMode(String mode) Future<void>
toString() String
A string representation of this object.
inherited

Operators

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