fixing android build
This commit is contained in:
18
lib/platform/browser_stub.dart
Normal file
18
lib/platform/browser_stub.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
/// 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();
|
||||
}
|
||||
Reference in New Issue
Block a user