-
Notifications
You must be signed in to change notification settings - Fork 936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to intercept URL #293
Comments
I have the same issue. Pease help! |
You can intercept on the onUrlChanged event which fires before the WebViewState.startLoad state change. I am using it like this:
|
@JannieT No use. Webview doesn't stop loading. callback come to |
@mohammed90 works great for me on Flutter v1.2.1, Plugin v0.3.3 This is my event trace:
|
@JannieT I am also using Plugin v0.3.3 but flutter 1.0.0+1
|
@mohammedmunaf have you tried intercepting at WebViewState.shouldStart? |
Finally this worked for me! Happy coding 👍 Thanks @JannieT
|
Hello,
How can I intercept a URL before it is loaded into the webview & stop loading?
I tried the following -
_onStateChanged = flutterWebviewPlugin.onStateChanged.listen((WebViewStateChanged state) { if (state.url.startsWith("someScheme")) { flutterWebviewPlugin.stopLoading(); } });
But the onStateChanged is called after the url has loaded into the webview, so I cannot stop the loading.
The text was updated successfully, but these errors were encountered: