Design – What is the best way to do web scraping in Flutter / Dart?

I would like to automate some tasks on a website using a Flutter application. Basically, I have to log in to navigate to a specific page to fill out a form and send it. I'm trying to achieve that by using a WebView in flutter, and doing the navigation using Javascript. So I go to a page, I run a bit of javascript (how to complete the login / step and send form), I go to the next page, etc. But in this way, it is very difficult to synchronize the execution of JS on the correct page.

I wonder if there is a better approach to do that. Before that, I tried something using an Http client and running some post Http commands, but I quit because I thought using WebView could be easier. But it was not easy at all.

Is there any other alternative to do what I want?