I’m sometimes receiving HTML as a response from network requests. I’ve encountered a scenario where I need to display HTML content within the InAppWebView. Is there any short way to do that.
I tried to find answer on the Internet, but couldn’t.
I’m sometimes receiving HTML as a response from network requests. I’ve encountered a scenario where I need to display HTML content within the InAppWebView. Is there any short way to do that.
I tried to find answer on the Internet, but couldn’t.
2
Answers
Turns out we can do it through initialData parameter:
Also with InAppWebViewController:
To display HTML Content you can either use the Html Widget or the Core one with less dependencies. Html Widget Core.
Here an usage example from the pub.dev website: