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 928 forks source link

onUrlChanged on Single page applications apps #713

Open diegonogueira opened 4 years ago

diegonogueira commented 4 years ago

How can I listen Url changed in a single page apps, like Ember, angular?

    flutterWebviewPlugin.onUrlChanged.listen((String url) {
      print("url changed");
    });
hwnprsd commented 4 years ago

use evalJavascript to listen to 'click' events. And based on that, use window.location.href to reload the page to that same URL. Vola now you have a callback

monisnap-julien commented 4 years ago

use evalJavascript to listen to 'click' events. And based on that, use window.location.href to reload the page to that same URL. Vola now you have a callback

Hello, do you have any working example ?