getUser method
Implementation
@override
RuutUser? getUser() {
if (_box.values.length == 0) {
return null;
}
final storedKey =
_clientInstanceIdToUserIdentifierBox.get(_clientInstanceKey);
// Primary path: use the mapped key
if (storedKey != null) {
final user = _box.get(storedKey);
if (user != null) {
return user;
}
}
// Fallback for legacy entries where the mapping/key mismatched
return _box.values.first;
}