ponnamkarthik / FlutterWebView

Flutter Plugin that Renders Native Webview as a widget in flutter
Other
62 stars 26 forks source link

Crash when open URL Scheme #10

Open Robin-JW opened 5 years ago

Robin-JW commented 5 years ago

Hi, when html code want to open URL Scheme, App will crash in FlutterWeb at line 95.

fix it like: (https://stackoverflow.com/questions/43980740/open-url-in-intent)[https://stackoverflow.com/questions/43980740/open-url-in-intent]

try {
    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setData(Uri.parse(url));
    registrar.activity().startActivity(intent);
} catch (Exception e) {
    e.printStackTrace();
}