How to open a link to call or Mail (tel: and mailto:) in flutter. Using flutter_webview_plugin


I am creating a webview app using flutter_webview_plugin. I am stack at allowing the app to launch phone call and mailto links. When I use webview_flutter I get the bottom menus and the address bar at the top does not disappear


I have managed to come up with this simple solution, just add these few lines of code in your initState, you can add ‘mailto:’ and ‘sms’ if necessary.

final flutterWebviewPlugin = new FlutterWebviewPlugin();
flutterWebviewPlugin.onUrlChanged.listen((String url) {
  if (url.contains("tel:")) launch(url);

Answered By – Smartak

Answer Checked By – Gilberto Lyons (FlutterFixes Admin)

Leave a Reply

Your email address will not be published. Required fields are marked *