loadHtmlString method

  1. @override
Future<void> loadHtmlString(
  1. String html, {
  2. String? baseUrl,
})

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}) {
  return webView.loadDataWithBaseUrl(
    baseUrl: baseUrl,
    data: html,
    mimeType: 'text/html',
  );
}