webview_flutter_plus icon indicating copy to clipboard operation
webview_flutter_plus copied to clipboard

How to open URLs inside webview using web browser?

Open snj07 opened this issue 4 years ago • 4 comments

I have some URLs inside a webview in a listview and when users click on any URL, I want it to be opened inside a browser rather opening inside the webview. Is it possible? Could you please tell me how can I achieve this?

snj07 avatar Jun 26 '20 10:06 snj07

I have some URLs inside a webview in a listview and when users click on any URL, I want it to be opened inside a browser rather opening inside the webview. Is it possible? Could you please tell me how can I achieve this?

Would you elaborate on your question? I didn't get it.

Shahxad-Akram avatar Jul 01 '20 17:07 Shahxad-Akram

I have some <a> in <td> and I want the URLs to be opened in an external browser url_launcher rather than opening it into the webview itself. Could you please let me know how I can achieve this using webview_flutter_plus?

snj07 avatar Jul 03 '20 18:07 snj07

Yeah having the same problem, Are there any ways to know if the URL in webview is clicked?

Example: <a href="https://www.w3schools.com/">Visit W3Schools.com!</a>

boungly avatar Aug 22 '20 09:08 boungly

The process for doing so is the same as for a normal webview. You will need the url_launcher package.

WebViewPlus(
    navigationDelegate: (NavigationRequest request){
        launch(request.url);
        return NavigationDecision.prevent;
    }
)

sebh0602 avatar Jun 11 '21 09:06 sebh0602