1
0
forked from baron/baron-sso

feat: i18n 개선 및 userfront 로그인/로케일 보완

This commit is contained in:
Lectom C Han
2026-02-12 21:25:26 +09:00
parent b6d3b69cda
commit dfa2fc2406
60 changed files with 5724 additions and 1734 deletions

View File

@@ -0,0 +1,5 @@
import 'web_storage_stub.dart'
if (dart.library.html) 'web_storage_web.dart';
export 'web_storage_stub.dart'
if (dart.library.html) 'web_storage_web.dart';

View File

@@ -0,0 +1,21 @@
class WebStorage {
bool get isWeb => false;
String? get(String key) => null;
void set(String key, String value) {}
String? getSession(String key) => null;
void setSession(String key, String value) {}
void removeSession(String key) {}
void clearSession() {}
void remove(String key) {}
void clear() {}
}
final webStorage = WebStorage();

View File

@@ -0,0 +1,37 @@
// ignore_for_file: avoid_web_libraries_in_flutter
import 'dart:html' as html;
class WebStorage {
bool get isWeb => true;
String? get(String key) => html.window.localStorage[key];
void set(String key, String value) {
html.window.localStorage[key] = value;
}
String? getSession(String key) => html.window.sessionStorage[key];
void setSession(String key, String value) {
html.window.sessionStorage[key] = value;
}
void removeSession(String key) {
html.window.sessionStorage.remove(key);
}
void clearSession() {
html.window.sessionStorage.clear();
}
void remove(String key) {
html.window.localStorage.remove(key);
}
void clear() {
html.window.localStorage.clear();
}
}
final webStorage = WebStorage();