clearSession method
Implementation
Future<void> clearSession() async {
try {
SharedPreferences prefs = await SharedPreferences.getInstance();
await prefs.remove(_cookieKey);
await CookieManager.instance().deleteAllCookies();
} catch (e) {
debugPrint('Error clearing session: $e');
rethrow;
}
}