How to open app links in flutter webview?

前端 未结 3 664
谎友^
谎友^ 2021-02-03 12:45

In Flutter, I use the flutter webview plugin to launch a url like:

flutterWebviewPlugin.launch(url)

or

WebviewScaffold(
  url:          


        
3条回答
  •  孤街浪徒
    2021-02-03 13:48

    Looks like you can achieve what you need using this plugin : https://pub.dartlang.org/packages/flutter_web_view

    Listen for your redirects:

      flutterWebView.listenForRedirect("fb://profile", true);
    

    Get the value using :

    flutterWebView.onRedirect.listen((url) {
       flutterWebView.dismiss();
        //now you have the url
     });
    

    After you have the url you can use this package https://pub.dartlang.org/packages/url_launcher

提交回复
热议问题