loadHtmlString method
Loads the supplied HTML string.
The baseUrl
parameter is used when resolving relative URLs within the
HTML string.
Implementation
@override
Future<void> loadHtmlString(String html, {String? baseUrl}) async {
final iFrame = _webWebViewParams.iFrame;
final iDocument = iFrame.contentDocument;
if (iDocument == null) {
// WebWebViewWidget will call me later.
_htmlString = html;
} else {
// Reset iFrame and inject HTML.
iFrame.src = 'about:blank';
iDocument.write(html.toJS);
}
}