16 lines
520 B
Dart
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();
|
|
}
|