isolateCompute method

Future<R> isolateCompute(
  1. IsolateCallback<Q, R> callback,
  2. Q message, {
  3. String? debugLabel,
})

A function that runs the provided callback on the long running isolate and (eventually) returns the value returned.

Same footprint as the function compute from flutter, but runs on the long running thread.

Implementation

Future<R> isolateCompute(
  IsolateCallback<Q, R> callback,
  Q message, {
  String? debugLabel,
}) {
  return _isolate!.compute(callback, message, debugLabel: debugLabel);
}