fluttercommunity / flutter_webview_plugin

Community WebView Plugin - Allows Flutter to communicate with a native WebView.
https://pub.dev/packages/flutter_webview_plugin
Other
1.48k stars 933 forks source link

addJavascriptInterface #237

Open LeonidVeremchuk opened 6 years ago

LeonidVeremchuk commented 6 years ago

Will be added the support of a WebView function call to the native part?

This behavior may be similar to: addJavascriptInterface

slightfoot commented 6 years ago

Part of #201

shinriyo commented 1 year ago

In Kotlin

webView.addJavascriptInterface(new JavaScriptInterface(), “native”)
return WebviewScaffold(
  url: url,
  javascriptChannels: <JavascriptChannel>{
    JavascriptChannel(
      name: 'native',
      onMessageReceived: (message) {
        print(message);
      },
    ),
  },
);

but not work.