Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用颤振来开发一个网站。现在我需要从我的网页跳转到站外的链接。我该怎么做?
首先您需要导入import 'dart:js' as js;,然后您可以打开一个链接,如下例所示:
import 'dart:js' as js;
. . . onPressed: () { js.context.callMethod("open", ["https://google.com"]); }, . . .