flutter_webview_plugin^0.3.11 I am building a payment gateway and in 3d secure mode I need to use Webview. Launch Webview with a response in type of html string.
return Scaffold(
body: WebviewScaffold(
withJavascript: true,
key: _scaffoldKey,
url: new Uri.dataFromString(widget.d3sc, mimeType: 'text/html').toString(),
),
);
It prints on the screen the security code phase. When I submit the code it redirects automatically to callback url and I can not manage to connect or get response from this url. I need to get response when code is submitted and page is redirected for having token for closing 3d secure payment. Any idea or solution ?
Tried below code. Although it prints the redirected url, there is no json response in response element.
webView.launch(new Uri.dataFromString(widget.d3sc, mimeType: 'text/html').toString() ,withJavascript: true, withLocalStorage: true);
webView.show();
webView.onUrlChanged.listen((String event) async {
print("${event} even eevent");
setState(() {
webView
.evalJavascript("document.documentElement.innerText")
.then((response) => print("$response response response "));
});
});