-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
browser_client.dart - Error: Not found: 'dart:html' #36318
Comments
I believe the https://flutter.dev/docs/cookbook/networking/web-sockets#1-connect-to-a-websocket-server |
Thanks Dan, but I'm trying to use this in a pure Dart package, without Flutter. How can I use WebSockets in a pure Dart package? Also, I don't see anything in the docs that would make it apparent the |
@mtcliatt Gotcha! You need to use a standard Dart SDK for that - the one that was included with/downloaded by Flutter won't work. You can get the standard SDK (which includes all the web bits) from https://www.dartlang.org/tools/sdk. That said - if you're writing a command-line/server app (not browser bsed), then you'll still need to avoid the |
We try to make it clear here – https://api.dartlang.org/stable/2.2.0/index.html That there are a set of libraries that only work on the web. Sorry for the confusion! |
I'm attempting to use the html WebSocket class, which resolves in IntelliJ, but won't build.
I'm even able to jump to the source of WebSocket from my code.
This seemed similar to #35973, so I performed the recommended fix for a corrupted Flutter installation, to no avail. See flutter doctor output below.
Dart SDK Version: Dart VM version: 2.1.2-dev.0.0.flutter-0a7dcf17eb (Tue Feb 12 01:59:15 2019 +0000) on "windows_x64"
OS: Windows 10
Error output:
Flutter doctor output:
The text was updated successfully, but these errors were encountered: