apply filte delay solved and refeesh token logic updated

This commit is contained in:
Raj.Ghag
2026-04-01 11:50:00 +05:30
parent b78c83cc4a
commit b37bb3bf2b
13 changed files with 845 additions and 924 deletions

View File

@@ -182,6 +182,22 @@ class LocalPreference {
return null;
}
/// Clear only access token (keep refresh token)
static Future<void> clearAccessToken() async {
final db = await LocalDatabase().database;
await db.update(
'user_tokens',
{'access_token': ''}, // ← empty string, not null
where: 'id = ?',
whereArgs: [1],
);
if (kDebugMode) {
print('🧹 [LOCAL_PREF] Access token cleared');
}
}
/// Get refresh token
static Future<String?> getRefreshToken() async {
final db = await LocalDatabase().database;