【发布时间】:2019-01-20 20:36:54
【问题描述】:
在 Flutter 中,我使用 flutter webview plugin 来启动如下网址:
flutterWebviewPlugin.launch(url)
或
WebviewScaffold(
url: url,
appBar: new AppBar(title: Text(title), actions: [
new IconButton(
icon: const Icon(Icons.share),
onPressed: () => Share.share(url),
)
]),
withZoom: true,
withLocalStorage: true,
withJavascript: true,
);
但是,如果打开的网页中的任何链接是应用链接,例如:fb://profile,我会得到 net::ERR_UNKNOWN_URL_SCHEME。
在android中,我发现解决方案是覆盖here中提到的shouldOverrideUrlLoading,但是在flutter中我应该怎么做?
【问题讨论】:
-
你能把你的代码放上来吗?
标签: flutter