How an I spawn an Isolate blocking on an async function in Flutter?
I tried dart:cli's waitFor function, but it seems that dart:cli does not work together with Flutter.
How an I spawn an Isolate blocking on an async function in Flutter?
I tried dart:cli's waitFor function, but it seems that dart:cli does not work together with Flutter.
Copyright © 2021 Jogjafile Inc.
There is no supported way to block on an
asyncfunction.You shouldn't need an
Isolateto block anyway. EachIsolatehas its own event loop and can justawaittheFuturereturned by your asynchronous function before callingIsolate.exit. For example:which prints: