when I try to display the image url from the api for the HTTP image tag format the image does not appear, while for https the image format appears.
the following code i use
WebView(
initialUrl: Uri.dataFromString(
"<meta name='viewport' content='width=device-width,initial-scale=1,maximum-scale=1'/>"
"${HtmlCodeHtpp}",
mimeType: 'text/html',
encoding: Encoding.getByName('utf-8'))
.toString(),
javascriptMode: JavascriptMode.unrestricted,
onWebViewCreated: (WebViewController webViewController) {
_controller.complete(webViewController);
},
),
the data is obtained from existing submissions, for testing I use hard code first
var HtmlCode = '<h1> h1 Heading Tag</h1>' +
'<h2> h2 Heading Tag </h2>' +
'<p> Sample Paragraph Tag </p>' +
'<p><img src="https://flutter-examples.com/wp-content/uploads/2019/04/install_thumb.png" alt="Image" width="250" height="150" border="3"></p>' ;
var HtmlCodeHtpp = '<h1> h1 Heading Tag</h1>' +
'<h2> h2 Heading Tag </h2>' +
'<p> Sample Paragraph Tag </p>' +
'<p><img src="http://ditpsmp.kemdikbud.go.id/wp-content/uploads/2020/09/Irganisasi-Siswa-Intra-Sekolah-03-scaled.jpg" alt="Image" width="250" height="150" border="3"></p>' ;
this when using http format
