Man*_*dip 4 openurl dart flutter flutter-web
我正在学习颤振网络。
单击按钮时,我试图打开另一个 url。有没有这样的方法:
onclick: ()=>openurl("https://test.com")
我怎样才能做到这一点?
请帮忙
Mar*_*lla 12
当前最简单的方法是使用href您的html库:
import 'dart:html' as html;
html.window.location.href = "https://www.google.com" // or any website your want
Run Code Online (Sandbox Code Playgroud)
将该代码放入您的onTap方法中,就是这样。
| 归档时间: |
|
| 查看次数: |
5731 次 |
| 最近记录: |