loadData method

Future<void> loadData({
  1. required String data,
  2. String mimeType = "text/html",
})

Implementation

Future<void> loadData(
    {required String data, String mimeType = "text/html"}) async {
  iframe.src = 'data:$mimeType,' + Uri.encodeComponent(data);
}