resetSessionState static method

Future<void> resetSessionState()

Reset session state (call on logout).

Implementation

static Future<void> resetSessionState() async {
  _cachedEncryptedPlaces = null;
  _securityKeyVerified = false;
  _securityKeyAvailableCache = null;

  // Clear persistent directory flag on logout.

  try {
    final prefs = await SharedPreferences.getInstance();
    await prefs.remove(_keyDirVerified);
    _directoryVerified = false;
  } catch (e) {
    debugPrint('Failed to reset persistent flags: $e');
  }
}