flutter_web_browser
flutter_web_browser copied to clipboard
How can I listen the changes in url and take action on that.
@victorbonnet
I am using flutter_web_browser: ^0.16.0 with flutter version 2.8.1 and I want to listen to the URL and perform some actions.
@victorbonnet I am using
flutter_web_browser: ^0.16.0withflutter version 2.8.1and I want to listen to theURLand perform some actions.
Same question! It appears that it's only supporting close events that's it. Won't catch any redirect event at all. Please update?
Bump
Not sure why this isn't documented. But here is the sample code for it. Note: works only on iOS
FlutterWebBrowser.events().listen((event) {
if (event is RedirectEvent) {
onRedirect(event.url);
}
if (event is CloseEvent) {
onClose();
}
});
@srinivasupadhya The RedirectEvent happens only once when the initial URL passed is opened but not for subsequent navigations.