title: How to add JavaScriptInterface in Flutter WebView or InAppWebView?
body: <p>In Android I can add javascript interface:</p>
  <pre><code>class JsInterface(private val onClose: () -&gt; Unit) {
      @android.webkit.JavascriptInterface    
      fun close() {
          onClose()    
      }
  }
  ...
  addJavascriptInterface(JsInterface { this@WebViewActivity.finish() }, &quot;client&quot;)
  </code></pre>
  <p>How can I do <strong>the same</strong> in Flutter WebView or InAppWebView or other packages?</p>