'Modify the content of url in webview_flutter

I'm rendering HTML content from an external URL in webview_flutter.

I would like to remove/add/update some HTML content (divs) from the URL before it gets displayed.

One possible solution that I can think of is:

  1. download the page content in a string
  2. update the content
  3. render the content

But this can cause other issues with the follow-up calls made from the page.

Any suggestion on how it could be done?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source