You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[webview_flutter] Add option to allow mixed-mode content (http in https page) #43595
changed the title [-]webview_flutter how to load https and http mixed content?[/-][+][webview_flutter] Add option to allow mixed-mode content (http in https page)[/+]on May 21, 2023
if (webViewController.platform is AndroidWebViewController) {
final channel = MethodChannel('nocturne.native.channel/helper');
final setMixedRes =
await channel.invokeMethod('setMixedContentMode', {'viewId': viewId});
}
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
danybuoy commentedon Nov 7, 2019
I got it working by adding this line in the
WebviewManager.javainside the plugin:webView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_COMPATIBILITY_MODE);I'm working on a small PR to give us the option to choose how mixed content is enabled
dotcink commentedon Mar 15, 2020
@amirh What's the meaning of
customer: dream (g3)label please?Cannot find a description at https://github.com/flutter/flutter/labels?q=dream
songfei commentedon Jul 29, 2020
liraku commentedon Dec 14, 2020
godfatherdemon commentedon Jan 15, 2021
hanifmhd commentedon Mar 16, 2022
iusn commentedon Sep 7, 2022
2 remaining items
[-]webview_flutter how to load https and http mixed content?[/-][+][webview_flutter] Add option to allow mixed-mode content (http in https page)[/+]wyhAcc commentedon Dec 5, 2023
heyjunpenn commentedon May 30, 2025
在flutter webview 4.x 中,可以通过下面的方式实现https和http混合加载,在android目录下的MainActivity中添加下面的代码:
然后在webviewcontroller初始化后,通过channel修改调用setMixedContentMode:
feat(webview_flutter): Add Android-specific API for setMixedContentMode
[webview_flutter] Add setMixedContentMode for Android (flutter#9586)
github-actions commentedon Jul 29, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.[webview_flutter] Add setMixedContentMode for Android (flutter#9586)
[webview_flutter] Add setMixedContentMode for Android (flutter#9586)
[webview_flutter] Add setMixedContentMode for Android (flutter#9586)