Is there a way to use WebView in Web Filter without the need for an iframe? Most of the methods available by iframe display website information and many sites also prohibit the use of iframe .
I'm looking for a way to use website information directly and without the need for iframe
I also tested the lower libraries and it didn't work
easy_web_view2
easy_web_view
webviewx
web_browser
in app webview
and ...
I dont have problem to show webview in Flutter webI have trouble displaying sites that have disabled the iFrame feature on their site .
Introduction. With the WebView Flutter plugin you can add a WebView widget to your Android or iOS Flutter app. On iOS the WebView widget is backed by a WKWebView, while on Android the WebView widget is backed by a WebView. The plugin can render Flutter widgets over the web view.
The flutter web directly not support any web view to load url.
You have to use HtmlElementView
to load URL.
import 'dart:ui' as ui;
@override
void initState() {
super.initState();
ui.platformViewRegistry.registerViewFactory('openstreetmap', (int viewId) {
return IFrameElement()
..style.width = '100%'
..style.height = '100%'
..src = 'https://www.openstreetmap.org/export/embed.html?bbox=-0.004017949104309083%2C51.47612752641776%2C0.00030577182769775396%2C51.478569861898606&layer=mapnik
'
..style.border = 'none';
});
}
@override
Widget build(BuildContext context) {
return HtmlElementView(viewType: 'openstreetmap');
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With