Migrate to web

This commit is contained in:
Daniel 2024-10-14 12:24:54 -04:00
parent 9dfab9511c
commit 58662a6fe0
3 changed files with 5 additions and 4 deletions

View file

@ -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<String?> getKey(String key) async {
return window.localStorage[key];
return web.window.localStorage[key];
}
Future<void> setKey(String key, String value) async {
window.localStorage[key] = value;
web.window.localStorage[key] = value;
}
}

View file

@ -622,7 +622,7 @@ packages:
source: hosted
version: "14.2.5"
web:
dependency: transitive
dependency: "direct main"
description:
name: web
sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb

View file

@ -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: