mirror of
https://bitbucket.org/FransoletThomas/tablet-app.git
synced 2025-12-06 16:41:19 +00:00
allow navigation in web (same host)
This commit is contained in:
parent
b32528048e
commit
11ab21abd9
@ -52,7 +52,10 @@ class _WebViewWidget extends State<WebView> {
|
||||
onPageFinished: (String url) {},
|
||||
onWebResourceError: (WebResourceError error) {},
|
||||
onNavigationRequest: (NavigationRequest request) {
|
||||
if (request.url != webDTO.source_) {
|
||||
Uri sourceUri = Uri.parse(webDTO.source_!);
|
||||
Uri requestUri = Uri.parse(request.url);
|
||||
|
||||
if (requestUri.host != sourceUri.host) { // handle navigation to site
|
||||
print('blocking navigation to $request}');
|
||||
return NavigationDecision.prevent;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user