Open kasyr opened 4 years ago
I use JavascriptChannel to pass a string back to the app form webview. It works perfectly for Android but can't make it work on iOS? Is there anything specific I need to do to make it work?
class WebViewJavascriptChannel { static Set<JavascriptChannel> getChannel(Function(String) handler) { return [ JavascriptChannel( name: 'JavascriptChannel', onMessageReceived: (JavascriptMessage javascriptMessage) { handler(javascriptMessage.message); print(javascriptMessage.message); }), ].toSet(); } } Widget _getBankIDWebView(String url) { return WebviewScaffold( javascriptChannels: WebViewJavascriptChannel.getChannel(_updateString), url: url, withZoom: false, hidden: true, appBar: _getAppBar(), ); }
any update? i have same problem
Is it addJavascriptInterface in Kotlin?
addJavascriptInterface
I use JavascriptChannel to pass a string back to the app form webview. It works perfectly for Android but can't make it work on iOS? Is there anything specific I need to do to make it work?