CodePudding user response:
Are you trying to make an android application with flutter(dart) that support webview?
run
flutter clean, flutter pub get
Have you Explored the parameter that can be used by flutter webview package?
To check what parameters that available, you can press ctrl left click button on the webview class that imported from that flutter package.
const WebView({ Key? key, this.onWebViewCreated, this.initialUrl, this.initialCookies = const <WebViewCookie>[], this.javascriptMode = JavascriptMode.disabled, this.javascriptChannels, this.navigationDelegate, this.gestureRecognizers, this.onPageStarted, this.onPageFinished, this.onProgress, this.onWebResourceError, this.debuggingEnabled = false, this.gestureNavigationEnabled = false, this.userAgent, this.zoomEnabled = true, this.initialMediaPlaybackPolicy = AutoMediaPlaybackPolicy.require_user_action_for_all_media_types, this.allowsInlineMediaPlayback = false, this.backgroundColor, }) : assert(javascriptMode != null), assert(initialMediaPlaybackPolicy != null), assert(allowsInlineMediaPlayback != null), super(key: key);
the default is javascriptMode disabled, you may have to do trial and error until the webview works. Let me know if you still face the error