diff --git a/lib/controller/stillbox_web.dart b/lib/controller/stillbox_web.dart index e4fbcd9..7958494 100644 --- a/lib/controller/stillbox_web.dart +++ b/lib/controller/stillbox_web.dart @@ -1,14 +1,14 @@ -import 'dart:html'; +import 'package:web/web.dart' as web; import 'package:web_socket_channel/web_socket_channel.dart'; import 'package:http/http.dart' as http; class Storer { Future getKey(String key) async { - return window.localStorage[key]; + return web.window.localStorage[key]; } Future setKey(String key, String value) async { - window.localStorage[key] = value; + web.window.localStorage[key] = value; } } diff --git a/pubspec.lock b/pubspec.lock index 3ff5e24..51b85b6 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -622,7 +622,7 @@ packages: source: hosted version: "14.2.5" web: - dependency: transitive + dependency: "direct main" description: name: web sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb diff --git a/pubspec.yaml b/pubspec.yaml index 3d4208c..66c726d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -51,6 +51,7 @@ dependencies: media_kit_libs_windows_audio: ^1.0.9 intl: ^0.19.0 audio_session: ^0.1.21 + web: ^1.1.0 dev_dependencies: flutter_test: