Flutter Webview two way communication with Javascript
Here is an example of communication from Javascript code to flutter. In Flutter build your WebView like : WebView( initialUrl: url, javascriptMode: JavascriptMode.unrestricted, javascriptChannels: Set.from([ JavascriptChannel( name: ‘Print’, onMessageReceived: (JavascriptMessage message) { //This is where you receive message from //javascript code and handle in Flutter/Dart //like here, the message is just being printed //in Run/LogCat … Read more