18 lines
504 B
Dart
18 lines
504 B
Dart
/// Stub implementation of browser APIs for non-web platforms.
|
|
class BrowserStorage {
|
|
String? getItem(String key) => null;
|
|
void setItem(String key, String value) {}
|
|
void removeItem(String key) {}
|
|
}
|
|
|
|
/// Stub for window.location
|
|
class BrowserLocation {
|
|
String get href => '';
|
|
set href(String value) {}
|
|
}
|
|
|
|
/// Browser utility class for non-web platforms.
|
|
class Browser {
|
|
static final BrowserStorage localStorage = BrowserStorage();
|
|
static final BrowserLocation location = BrowserLocation();
|
|
} |