import 'dart:async'; typedef ComputeCallback = Future Function( FutureOr Function(Q message) callback, Q message, {String? debugLabel}); // keep types in sync with [computeCallbackFromRunInBackground] typedef ComputeRunner = Future Function( FutureOr Function(U arg) function, U arg); ComputeCallback computeCallbackFromRunInBackground(ComputeRunner runner) { return (FutureOr Function(U arg) callback, U arg, {String? debugLabel}) => runner.call(callback, arg); }