run<I, O> static method
Runs task in a separate isolate.
data will be passed to the task.
Returns the result produced by the task.
Implementation
static Future<O> run<I, O>(FutureOr<O> Function(I data) task, [I? data]) {
return Isolate.run<O>(() => task(data as I));
}