flutter-plugins icon indicating copy to clipboard operation
flutter-plugins copied to clipboard

Loading an HTML File from Assets

Open bahricanyesil opened this issue 1 year ago • 0 comments

Is there a way to load an HTML file from the assets? I have a plain HTML string and want to load that string as webview.

Examples:

  • webview_flutter: There is a method called "loadFlutterAsset" and it enables us to load a plain HTML file from assets -webview_windows: There is a method called "loadUrl" and we are able to give a URI from a string just as follows:
      await _winController.loadUrl(
          Uri.dataFromString(_uriString, mimeType: 'text/html').toString());

Is there a similar way we can achieve the same result with this package? How can we display the content of a plain HTML string?

bahricanyesil avatar Mar 11 '23 11:03 bahricanyesil