0

I've been struggling with this for a few hours now. I've looked around and I believe I'm doing everything correctly, but it's just not working. Just for fun, I'm taking the sample Dart stopwatch and making it into a Chrome packaged app. It works flawlessly in both Dartium Chrome(via dart2js) when it's a simple web app, however as a packaged app it works in neither. The dart code simply doesn't work. Are there additional steps I need to perform to make Dart work in a web app?

Thank you very much for any help you can provide!

4

1 回答 1

0

在 Dart 中编写打包应用程序时有一些注意事项。一个与符号链接有关(打包的应用程序不喜欢它们,而 pub 使用它们),另一个与 dart2js 有关(您需要使用 --disallow-unsafe-eval 标志进行编译)。

如果您使用的是编辑器,则可以从向导创建一个新的 chrome 打包应用程序。这将建立一个处理上述两个问题的项目。我会这样做并确保它运行,然后将您的网络应用程序复制到该项目中。

于 2013-07-10T15:48:25.650 回答