post_enrollment_app/lib/pages/service/web_session_storage.dart
2026-04-08 09:11:24 +05:30

16 lines
520 B
Dart

import 'web_session_storage_stub.dart'
if (dart.library.html) 'web_session_storage_html.dart';
/// Web-only session storage API (backed by `window.sessionStorage`).
/// On mobile/desktop native this is a no-op; use [TokenService] paths instead.
class WebSessionStorage {
WebSessionStorage._();
static String? read(String key) => webSessionStorageRead(key);
static void write(String key, String? value) =>
webSessionStorageWrite(key, value);
static void clearAll() => webSessionStorageClearAll();
}