feat: 重构会话管理与提醒通知系统

This commit is contained in:
qzl
2026-03-31 18:26:36 +08:00
parent a8c262e9c7
commit 9a231dae9e
31 changed files with 650 additions and 223 deletions
+9 -1
View File
@@ -14,9 +14,17 @@ class CacheScope {
}
static String token() {
final value = maybeToken();
if (value == null) {
throw StateError('CacheScope not configured - user must be logged in');
}
return value;
}
static String? maybeToken() {
final raw = _provider?.call()?.trim();
if (raw == null || raw.isEmpty) {
return 'anonymous';
return null;
}
return raw;
}