19 lines
437 B
Dart
Executable File
19 lines
437 B
Dart
Executable File
// html_web.dart
|
|
import 'dart:html' as html;
|
|
|
|
import 'package:nhance_app_pwa/logger.dart';
|
|
|
|
class HtmlHelper {
|
|
static void saveLoginData(Map<String, String> data) {
|
|
data.forEach((key, value) {
|
|
html.window.localStorage[key] = value;
|
|
});
|
|
|
|
html.window.dispatchEvent(
|
|
html.CustomEvent('userLoggedIn', detail: {'status': 'success'}),
|
|
);
|
|
|
|
logDebug("✅ User logged in! LocalStorage values set (web).");
|
|
}
|
|
}
|