Conversation
|
@charafau can you please apply this PR so that we can build? |
please migrate to official webview 🙏 https://pub.dev/packages/webview_flutter |
|
the purpose of flutter_webview_plugin is different for methods that webview does not support such as the following: import 'package:flutter_webview_plugin/flutter_webview_plugin.dart';
class FlutterWebviewWrapper {
static void close() {
FlutterWebviewPlugin().close();
}
static void onHttpErrorListen({required void Function() onData}) {
FlutterWebviewPlugin().onHttpError.listen((data) {
onData.call();
});
}
}
|
|
official webview is in the widget tree so you just do normal naviagtion to close the page ( Looks like if you want to listen to http errors it's also easy. From official documentation: controller = WebViewController()
..setJavaScriptMode(JavaScriptMode.unrestricted)
..setNavigationDelegate(
NavigationDelegate(
onProgress: (int progress) {
// Update loading bar.
},
onPageStarted: (String url) {},
onPageFinished: (String url) {},
onHttpError: (HttpResponseError error) {}, //////// THIS ONE
onWebResourceError: (WebResourceError error) {}, //////// and this one
onNavigationRequest: (NavigationRequest request) {
if (request.url.startsWith('https://www.youtube.com/')) {
return NavigationDecision.prevent;
}
return NavigationDecision.navigate;
},
),
)
..loadRequest(Uri.parse('https://flutter.dev')); |
|
@charafau I plan to migrate to webview_flutter. My use case is a form with text fields that needs scrolling. When I tap on a text field, the view will not scroll above the keyboard as it did in flutter_webview_plugin. I tryed the |
to fix buliding for Android on flutter 3.24.>=2