flutter_webview_plugin icon indicating copy to clipboard operation
flutter_webview_plugin copied to clipboard

Url schemes for applications intents not working

Open rameznabel opened this issue 5 years ago • 6 comments

Url schemes for applications intents not working, for example calling whatsapp://xxxx from web application from webview plugin renders error Screenshot_20200410_222416_com brotinni flutterapp

rameznabel avatar Apr 10 '20 19:04 rameznabel

This worked for me.

flutterWebviewPlugin.onUrlChanged.listen((String url) async {
      if ( ! (url.startsWith("http:") ) 
       {
        flutterWebviewPlugin.goBack();
        _launchURL(url); //use url launcher plugin
      } 
}

deependra227 avatar May 14 '20 21:05 deependra227

@deependra227 where should i put this code?

swarupbhc avatar Jun 27 '21 17:06 swarupbhc

In void initState(){ }

deependra227 avatar Jun 27 '21 18:06 deependra227

@deependra227 I think I'm doing something wrong, can you please tell me image

swarupbhc avatar Jun 28 '21 10:06 swarupbhc

Remove async . check here. image

deependra227 avatar Jun 28 '21 11:06 deependra227

@deependra227 yes it's working, thank you so much

swarupbhc avatar Jun 28 '21 12:06 swarupbhc