For I/O-bound work, declare the function as an async function,
and await on long-running tasks inside the function:

This is how you would typically do network or database calls, which are both
I/O operations.

On Android, when you extend AsyncTask, you typically override 3 methods,
onPreExecute(), doInBackground() and onPostExecute(). There is no
equivalent in Flutter, since you await on a long running function, and
Dart’s event loop takes care of the rest.

However, there are times when you might be processing a large amount of data and
your UI hangs. In Flutter, use Isolates to take advantage of
multiple CPU cores to do long-running or computationally intensive tasks.