I developed an app using flutter. Right now I want to open a website from WebView and It worked but some websites are not loading inside webview. I'm not sure what I've done wrong, Hope someone can help me to solve this problem. Thank you in advance.
plugin: https://pub.dev/packages/webview_flutter/example
URL work: https://flutter.dev/
URL that is not working: https://belanjawan2021.treasury.gov.my/manfaat/index.php/bm/pemulih-bkc
Error
Failed to validate the certificate chain, error: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found.
Widget webView() {
return Stack(
children: [
WebView(
onPageStarted: (String url) {
setState(() {
_showProgress = true;
});
},
onPageFinished: (String url) {
setState(() {
_showProgress = false;
});
},
initialUrl: widget.feed.url,
onWebResourceError: (WebResourceError webviewerrr) {
print("webview_flutter:" + webviewerrr.description);
},
javascriptMode: JavascriptMode.unrestricted,
onProgress: (int progress) {}),
_showProgress
? Center(
child: SizedBox(
child: CircularProgressIndicator(),
height: 200,
width: 200,
))
: Stack()
],
);
}
