在flutter中使用import'dart:html'-我是否需要其他依赖项? [英] using import 'dart:html' in flutter - Do I need additional dependencies?
本文介绍了在flutter中使用import'dart:html'-我是否需要其他依赖项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我遇到了一个我想使用的websocket示例.但是,它使用 import'dart:html';
.当我在Flutter项目中介绍该项目时,似乎并没有意识到这一点.我是否需要在 pubspec.yaml
中添加其他依赖项?
I came across a websocket example that I would like to use. However it uses import 'dart:html';
. When I introduce that in my Flutter project seems like its not being picked up. Do I need to add additional dependencies to the pubspec.yaml
?
推荐答案
dart:html
不能在Flutter中使用.它仅适用于浏览器应用程序.
dart:html
can't be used in Flutter.
It is for browser applications only.
dart:html
也仅与常规Dart SDK一起提供,而与Flutter随附的Dart SDK无关.
dart:html
also only comes with the regular Dart SDK, not with the Dart SDK shipped with Flutter.
这篇关于在flutter中使用import'dart:html'-我是否需要其他依赖项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文